French authorities have arrested a man suspected of stabbing a 22-year-old French soldier. Prosecutors say that he has admitted to the attack and was probably motivated by "religious ideology".

Paris prosecutor Xavier Molins said the man, named as Alexandre D and who turns 22 on Thursday, was a convert to Islam who had bought two knives and said a Muslim prayer shortly before stabbing Private First Class Cedric Cordiez in the neck on Saturday.

The suspect, who was detained on Wednesday, carried out the attack just days after the killing of a British soldier in London by men shouting religious slogans.

"He was known [to police] but we cannot speak of radical Islamism," Manuel Valls, French interior minister, told iTele television. I remain very cautious."

The suspect, known to police for crimes such as theft and possession of firearms, was arrested in a Paris suburb early on Wednesday after being identified through fingerprints, a police source told Reuters news agency.

AFP news agency identified the site of arrest as Yvelines, just west of Paris.

Cedric Cordiez was attacked from behind with a knife or box-cutter while patrolling the La Defense business neighbourhood, a busy underground shopping and transport hub, west of Paris.

He was released from hospital on Monday.

Al Jazeera's David Chater, reporting from Paris, said: "We have a few details that have been released by both the Interior Ministry and the French police

"Apparently they got to him by having very, very clear CCTV images of the actual attack, and they saw this 22-year-old man praying before the attack.

"He was wearing a black sweater apparently with a belt around it. They say the indications are that this was a pre-planned attack, then he launched the attack on the soldier, stabbing him in the left of the neck."

French police have said the knife attack may have been inspired by off-duty British soldier Lee Rigby's murder in London on May 22 by two men shouting religious slogans.

The key suspect in the London attack, Michael Adebolajo, was captured on video carrying bloodied knives and a meat cleaver after the attack, saying he had murdered Rigby because British troops were killing Muslims.