PARIS, (Reuters) - French business activity has held up better than expected in July despite the Bastille Day truck attack in Nice and concerns about Britain's decision to leave the European Union, a survey showed on Friday.

The preliminary purchasing managers index for the manufacturing and service sectors rose to 50.0 from 49.6 in June, data compiler Markit said, confounding a Reuters poll forecast for a slight drop to 49.2. Fifty is the mark dividing contractions in activity from expansions, meaning activity has held steady in the month after shrinking a little in June.

"In the face of the terrorist attack and the Brexit vote, to have the index coming up to 50.0 in a stable economy is perhaps a good result," Markit chief economist Chris Williamson said.

The resilience came largely from the service sector, where the index rose to a better-than-expected 50.3 from 49.9 in June as the flow of new business improved and firms increased headcount.

The index for manufacturing remained in contraction territory, although it improved to a four-month high of 48.6 from 48.3 in June instead of the deterioration expected by economists polled by Reuters.

New orders from abroad grew for the first time in seven months, which Williamson said might reflect a weaker euro or that French firms might be picking up some business from British competitors after the Brexit referendum in June.

The resilience seen in the PMI survey chimed with a broader business confidence poll published on Wednesday by France's INSEE statistics agency showing morale rebounding unexpectedly in July.

(Detailed PMI data are only available under license from

Markit and customers need to apply to Markit for a license.

To subscribe to the full data, click on the link below:

(Reporting by Leigh Thomas; Editing by Michel Rose and Hugh Lawson)