By ELAINE GANLEY, Associated Press

PARIS (AP) — A man rammed his car into four soldiers guarding a mosque on Friday in the southeast French city of Valence, but was stopped when a soldier fired and wounded him, authorities said.

His motives were unclear, but with France on high alert after the coordinated attacks in Paris on Nov. 13, determining what, or who, was behind the attack carried a sense of urgency.

One soldier was slightly injured in the leg, and a passerby was hit in the leg by a stray bullet, the interior and defense ministers said in a joint statement.

The man, who was alone in the red car and not immediately identified, was arrested and hospitalized, according to the statement by Interior Minister Bernard Cazeneuve and Defense Minister Jean-Yves L Drian.

The attacker twice rammed his car into the soldiers guarding the main mosque in Valence, the mayor and a spokesman for the prosecutor's office said, charging once then putting his car into reverse to try to ram the soldiers again. The soldiers, some thrown to the ground, fired warning shots and one then fired to disable the driver, who was hit in the arm and leg, Mayor Nicolas Daragon told iTele TV.

The man's motives were being investigated.

France is on high alert after the Nov. 13 Paris attacks, claimed by the Islamic State group, that killed 130 people and injured hundreds more. The soldiers are part of the reinforced security guarding places of worship and other sensitive sites around France.

The secretary-general of the prosecutor's office, Frederic Ouiseau, told iTele that authorities must be "extremely prudent about the motive" for the attack.

France was jarred days before Christmas in 2014 by random attacks that followed threats by the Islamic State group. A driver barreled into a crowd in Nantes, near the Atlantic coast, striking 10 people, just days after a man used his vehicle to ram into small groups of people in Dijon, east of Paris. Both suspects had histories of mental illness. In a third incident, a man attacked police with his knife at a police station and was killed. The case hasn't been resolved.

During his New Year's Eve address to the nation, President Francois Hollande spoke frankly.

"The threat is still there ... It remains in fact at its highest level, and we are regularly disrupting planned attacks," the president said.

Daragon, the Valence mayor, said the soldiers were attacked between two prayer services, and hundreds of people were at the mosque. Some were in the nearby parking lot at the time.

"Even if this happened near a mosque, the target was the soldiers," the mayor said.