PARIS — In what was described as a potential terrorist attack, a knife-wielding man killed two people and wounded five others on Saturday morning in a town in southern France with only a few shops open under a national lockdown to stem the coronavirus pandemic.

The assailant randomly attacked bystanders on the street, first slitting the throat of a man in his 40s in front of his companion and his son, in the center of Romans-sur-Isère, just south of Lyon, according to the French authorities and news media.

He then attacked two workers and a customer inside a tobacco store before heading to a butcher’s shop.

The suspect, a 33-year-old man of Sudanese origin, was arrested by the police as he was “found on his knees on the sidewalk while praying in Arabic,’’ said the country’s antiterrorism prosecutor’s office, which is handling the investigation into the attack.