However separate data showed an unexpected weakening of industrial production by 0.1 percent in the same month, giving a mixed picture of the euro zone's second largest economy ahead of a closely-watched preliminary reading of its second-quarter gross domestic product due on Aug. 14.

The June trade deficit fell to 2.7 billion euros (1.75 billion pounds) from a shortfall of four billion the month before thanks to sales of Airbus planes, satellite systems and "a sharp pick-up" in car exports, the office said in a statement.

It noted also the inclusion of a "very large military contract."

France earlier this year signalled that Egypt was ordering 24 Rafale fighter jets, a naval frigate and related military equipment worth a total of over five billion euros.

The domestic situation was less upbeat, with industrial output pulled down by a 0.7 percent fall in manufacturing activity, including a sharp 13.8 percent drop in the coking and refinery segment. A 2.2 percent rise in water, energy and extractive industries output counter-balanced some of the fall.

Economists polled by Reuters ahead of the figures had on average been expecting a rise of 0.2 percent in overall output.

The French economy grew a healthy 0.6 percent in the first quarter but expectations are already more modest for the second quarter, with between 0.2 percent and 0.3 percent targeted.

June consumer spending data released last week rose 0.4 percent but that was not enough to stop a slight contraction of 0.1 percent in spending for the second quarter overall.

"Trade, even if there are lots of one-offs in June, could just about rescue second-quarter growth," economist Christian Parisot at Aurel BGC said. "The picture is one of gradual but relatively weak improvement, France is struggling to get going."

Separately, France's budget deficit hit 58.5 billion euros by end-June, slightly down on the 59.4 billion recorded at the same point last year, the Finance Ministry said.

(Reporting by Mark John and Yann Le Guernigou; editing by Andrew Callus)

Stocks treated in this article : Airbus Group, PEUGEOT, Renault, DASSAULT AVIATION