LEVALLOIS-PERRET, France — French police are searching for a driver who slammed his BMW into a group of soldiers in a Paris suburb Wednesday, injuring six of them in what appeared to be a carefully timed ambush before speeding away, officials said.

The driver’s motive is unclear, but officials said he deliberately aimed at the soldiers, and counterterrorism authorities opened an investigation. It is the latest of several attacks targeting security forces guarding France over the past year. 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 light injuries while three were more seriously injured, but their lives are not in danger, according to the Defense 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.

Authorities are checking video surveillance of the area, near the city hall of Levallois, northwest of Paris, to identify the vehicle and hunt down the driver.

About four hours after the incident, a police spokeswoman said “verifications are still underway” and that police had not definitively identified the vehicle.

The spokeswoman and the officials were not authorized to be publicly named talking about ongoing operations.

The street is normally guarded by posts that are removed when vehicles move in and out, according to residents. The driver must have known exactly when to strike, said resident Jean-Claude Veillant, 70.

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:50 a.m. 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,” he said.

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 barreled into them,” he said on BFM television. He said the car “accelerated very quickly when they left” the building.

A security perimeter was installed around the scene, and the defense minister and interior minister are expected to visit wounded soldiers Wednesday afternoon.

French counterterrorism 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 Wednesday morning. He has pledged to boost military spending and entrench security measures after a string of Islamic extremist attacks since 2015.