French police have arrested the chief suspect in a car attack on soldiers in Paris – and the man was wounded in a gunfight during his capture, an official said.

The judicial official said the man was believed to be the driver of a BMW that rammed into a group of soldiers on Wednesday morning in the Paris suburb of Levallois-Perret.

Six soldiers were injured in the attack.

The official provided no other information about the suspect or his condition.

Two police officials said the arrest occurred on the A16 highway in northern France.

It is the latest of several attacks targeting security forces guarding France over the past year.

A French soldier patrols near the sceneA French soldier patrols near the scene (AP)

While others have targeted prominent sites like the Eiffel Tower, Wednesday’s attack hit a leafy, relatively affluent suburb that is home to France’s main intelligence service, the DGSI.

Three of the soldiers suffered slight injuries while three were more seriously injured – but their lives are not in danger, according to the Defence Ministry. They were from the 35th infantry regiment and served in Operation Sentinelle, created to guard prominent French sites after a string of deadly Islamic extremist attacks in 2015.

Witnesses described seeing a BMW with one person inside waiting in a cul-de-sac near a building used for Sentinelle soldiers, according to two police officials. One official said the attacker hit just as a group of soldiers emerged from the building to board vehicles for a new shift.

Soldiers in ParisAuthorities are checking video surveillance of the area near the city hall in Levallois (PA)

The driver must have known exactly when to strike, said resident Jean-Claude Veillant, 70. Mr Veillant said he saw two uniformed soldiers prone on the ground when he came down to the entrance of his 13-story building at 7:50am on Wednesday morning.

“It was horrible,” he said, explaining that both soldiers appeared to be in bad shape and that one of them was unconscious. They must’ve really planned this.”

Levallois Mayor Patrick Balkany called it an “odious attack” and said it was “without a doubt deliberate”.

“A BMW pre-positioned itself in the alley (where the barracks is located) and barrelled into them,” he said on BFM television.

He said the car “accelerated very quickly when they left” the building.

A French soldier stands near the scene where French soldiers were hit and injured by a vehicle in the western Paris suburb of Levallois-Perret (Kamil Zihnioglu/AP)A French soldier stands near the scene where French soldiers were hit and injured by a vehicle in the western Paris suburb of Levallois-Perret (Kamil Zihnioglu/AP)

A security perimeter was installed around the scene, and the defence minister and interior minister are expected to visit wounded soldiers later.

French counter-terrorism prosecutors opened an investigation aimed at pursuing perpetrators on charges of attempted murder of security forces in connection with a terrorist enterprise, the Paris prosecutor’s office said.

The move means authorities believe the attack was deliberate and planned with a terrorist motive. French President Emmanuel Macron is holding a previously scheduled top-level security meeting.

He has pledged to boost military spending and entrench security measures after a string of Islamic extremist attacks since 2015.