Mr Castaner said authorities are looking at whether to class the attack in the town of Romans-sur-Isere as an act of terrorism.

While more investigating is needed, “it seems that all the risks have been neutralised” because of a quick police intervention, Mr Castaner told reporters at the scene south of the city of Lyon.Police officers investigate after a man wielding a knife attacked residents in Romans-sur-Isere, southern France (AP)

Two people were killed and eight injured, he said.

French media reported that three were in critical condition.

France’s anti-terrorism prosecutor’s office said the attack took place at 11am on a commercial street.

Prosecutors did not identify the suspect.

They said he had no identifying documents but claimed to be Sudanese and to have been born in 1987.

The prosecutor’s office did not confirm reports that the man had shouted “Allahu akbar” (God is great) as he carried out the attack.

The office said it was evaluating whether the attack was motivated by terrorism, but that it has not launched any formal proceedings to treat it as such.Police at the scene in Romans-sur-Isere (AP)

Some 100 police and 45 firefighters were involved in the operation and securing the area, Mr Castaner said.

Like the rest of France, the town’s residents are on coronavirus-linked lockdown.

The victims were carrying out their weekend food shopping on the street that has bakeries and grocers, the office said.

Two-metre distancing is being encouraged there, as in the rest of the country.

Media reported that the knifeman first attacked a Romanian resident who had just left his home for his daily walk – slitting his throat in front of his girlfriend and son.

Following that, they reported, the assailant entered a tobacco shop, stabbed the tobacconist and two customers, and then went into the local butcher’s shop.

He grabbed another knife and attacked a client with the blunt end before entering a supermarket.

Some shoppers took refuge in a nearby bakery.The town is in lockdown along with the rest of France (AP)

There have been a number of knife attacks in France in recent months.

In January, French police shot and injured a man in Metz who was waving a knife and shouting “Allahu akbar”.

Two days earlier, another man was shot dead by police after he stabbed one person fatally and wounded two others in a Paris suburb.

It is unclear whether the suspect in Saturday’s attack had psychological problems or any links to extremism.

Analysts say some extremist groups see the upheaval from the virus pandemic as an opportunity to win over more supporters.