Two people were knifed to death and five more were injured in a French town Saturday in what officials are investigating as a terror attack.

The knife-wielding assailant was apprehended near the scene of the attack in Romans-sur-Isère, south of Lyon, as he was kneeling on the ground and praying in Arabic, according to France’s counter-terrorism prosecutor’s office.

The man, who has not been identified, carried out stabbings as his victims shopped for groceries during the countrywide coronavirus lockdown.

He began his brutal spree by slitting the throat of a man who had just left for a walk — in front of the victim’s girlfriend and son.

He then made his way to a tobacco shop, where he stabbed the tobacconist and two customers before entering a butcher shop.

There, he grabbed another knife and attacked a woman with the blunt end of the weapon as shoppers sought refuge.

The prosecutor’s office said in a statement that initial investigations suggest the attacker had “a determined murderous course aimed at seriously disturbing public order by intimidation or terror,” the BBC reported.

President Emmanuel Macron said the “odious” attack adds to the hardships the country is already facing during the COVID-19 pandemic.

“My thoughts are with the victims of the attack in Romans-sur-Isère as well as the wounded and their families,” Macron tweeted. “All the light will be shed on this odious act…”

The suspect had no identifying documents but claimed to be Sudanese and to have been born in 1987, according to prosecutors. One of his acquaintances was also detained.

While searching the suspect’s home after the attack, authorities found handwritten documents that included arguments about religion and a complaint about living in a “country of unbelievers,” French officials said.

The attacks drew a response from 100 police and 45 firefighters. French Interior Minister Christophe Castaner arrived later to speak with shopkeepers, describing the incident as an act of terror, according to the BBC.

“This morning, a man embarked on a terrorist journey,” he said.

It was not immediately clear if the attacker was linked to extremist groups.

With Post Wires.