French investigators say they have found "jihadist propaganda material" in the computer of a man who drove his car into troops guarding a mosque in southern France on New Year's Day.

Alex Perrin, the prosecutor, said however that it did not prove he had links with "terrorist groups".

He said the 29-year-old French citizen of Tunisian descent appeared to have acted alone as he rammed his car into four soldiers guarding a mosque in the southeastern city of Valence.

A soldier and an elderly man were injured in the incident.

"The inspection of his computer led to the discovery of jihadi propaganda images," Perrin told Reuters news agency.

"These are downloadable images that are a few weeks old. Not the worst type of images, but rather bellicose slogans," he said. "It shows he had an appreciation of that but it does not prove he had links with terrorist organisations."

The man, who is still in hospital, could be charged with "attempted murders against persons holding state authority".

He was seriously wounded when the soldiers shot at him during his second attempt at ramming into them, but his injuries are not life-threatening, the government said in a statement.

The injured passerby was said to be a 72-year-old man who was hit in the calf by a stray bullet shot by the soldiers.

Q&A: 'Muslim minorities are first victims of terror'

"When he was apprehended, he mentioned the fact that he wanted to kill troops because troops killed people," Perrin said. "He said he wanted to be killed by troops."

There was also no indication that the man was suffering from mental illness, he said.

He had been unemployed for several years and was not known to police or intelligence services.

The imam of the mosque, Abdullah Imam Dliouah, said in a statement posted to Facebook : "The mosque officials and worshippers are deeply shocked by this act. The soldiers protecting the mosque are appreciated by the worshippers and we condemn this aggression towards those who ensure our safety.

"We wish to reiterate that this act, despite its gravity, will not dampen our resolve to promote us living together, as we have always done."

France has been on high alert since the November 13 attacks in Paris in which 130 people were killed by armed attackers who claimed they were linked to the Islamic State of Syria and the Levant (ISIL) group.

Soldiers are protecting sensitive places across the country, including official buildings and religious sites.