He said specialist prosecutors were investigating the attack, which happened at around 4pm in a covered market by the Market Square and canal in the middle of Mulhouse, an area packed with shoppers at the time, near the borders with Germany and Switzerland.
The suspect arrived in France without papers in 2014, and was arrested and convicted of glorifying terrorism in the wake of the 7 October, 2023 Hamas attack on Israel, Retailleau said.
Retailleau noted Islamic extremist attacks recently in Germany and other countries, and insisted France has made "immense progress" since a wave of attacks in 2015 and 2016 linked to the Islamic State group and al-Qaeda.
Tensions have grown in recent months between France and Algeria – which shook off French rule after a brutal war 60 years ago – over the return of Algerians accused of inciting violence or other crimes in France as well as diplomatic disputes.
One person has been killed and several police officers injured in a knife attack in France that president Emmanuel Macron described as “Islamist terrorism”.