Macron said the attack was a "turning point in the life of our Republic and our nation" - the first time there has ever been a random racial killing like this. The attack unfolded over some 15 minutes with the attacker opening fire from his car - first in Trappes to the south-west of Paris, and then in nearby La Verrière - appearing to target people of migrant origin.

He was subsequently arrested. Three of those injured, including a 12-year-old girl, remain in a serious condition.

The 39-year-old was known to police but not to France's intelligence services, local media report. A member of the suspect's "immediate family circle" was also taken into custody on Friday, it added.

The Mayor of Trappes, Ali Rabeh, said that "an individual fired shots from his vehicle at several people he encountered" on Friday morning. The gunman drove through several neighbourhoods in a grey Renault Clio, according to witnesses.

Rabeh said he had "fired randomly" with the seeming intent of causing "as many casualties as possible... he wanted to cause carnage", he said.

The mayor said people had been targeted at a petrol station, a medical centre and a playground in Trappes before the attacker had driven on to nearby La Verrière. A police union official said the suspect had been detained in La Verrière on the main N10 road that runs through the town.