The attack took place Tuesday night around 1900 GMT in the heart of the medieval city as the market was closing, leaving two dead and 13 injured.
Witnesses said the suspect, a 29-year-old Strasbourg native identified as Cherif C., cried "Allahu Akbar" as he opened fire with a handgun and stabbed passers-by, France's anti-terror prosecutor Remy Heitz claimed Wednesday.
The man, who was on a watch list for suspected religious extremists, had already been sentenced 27 times in France, Germany and Switzerland for crimes including violence and robbery.
Four people connected to him were detained in Strasbourg overnight, he added.
Three killed in France Christmas market attack, hunt continues for gunman
The man was flagged by French security forces in 2015 as a possible extremist while in prison, after he "called for practising a radical form of religion," deputy interior minister Laurent Nunez told France Inter radio Wednesday.
He is "known for a number of criminal offences (...) but has never been linked to terrorist offences," Nunez said.
The suspect lived in a rundown housing estate a short drive from the Christmas market, which draws some two million people each year to its wooden chalets selling festive decorations, mulled wine and food.
"His family has lived around here for a while, but he lived on his own nearby," Zach, a 22-year-old in the Poteries area of Strasbourg, told AFP. "He was discreet, not a thug."
Much of the centre of the city as well as the European Parliament building were locked down through night as teams of police and soldiers searched for the gunman.
He is thought to have been injured in an exchange of fire with soldiers who were patrolling the Christmas market as part of regular anti-terror operations.
The gunman then fled the scene in a taxi.
"I heard shooting and then there was pandemonium," one witness, who gave his name as Fatih, told AFP. "People were running everywhere."
The government has raised the security alert level for terrorism to its highest, reinforcing border controls and patrols at all Christmas markets across France.
In pictures: Strasbourg Christmas market shooting
Hundreds of police, two helicopters, officers from elite anti-terror units and soldiers deployed Wednesday for the manhunt.
Among the victims, two were killed outright and another has been declared brain-dead, while 12 more were injured, six critically, Heitz said.
The shooting spree comes as French leader Emmanuel Macron faces the biggest crisis of his presidency after three weeks of anti-government demonstrations sparked by fuel tax rises.
Security forces were already stretched by the often violent demonstrations during which five people have died and more than 1,400 been injured.
Police had wanted to arrest Cherif on Tuesday morning as part of an investigation into an attempted murder, Nunez said.
He was not at home, but police found a grenade, four knives and a pistol.
Strasbourg mayor Roland Ries said most of the victims were men, including one Thai tourist who was among the dead.
"Some were shot in the head," Ries told BFM television.
In Rome, the foreign ministry said one of the injured was an Italian journalist covering the European parliament, but did not confirm media reports that he was in a serious condition.
France has been targeted by a series of attacks by gunmen since 2015, and the Strasbourg market was long considered a target.
Strict vehicle restrictions, security checks and patrols by armed police and soldiers have become the norm.
The SITE intelligence group, which monitors militant activity, said in November that a group aligned with the Islamic State group had warned of a Strasbourg attack with a social media post titled "O Christmas here we come - Strasbourg, 01 January 2019."
In 2016, a 23-year-old Tunisian killed 12 and injured 48 others when he ploughed a truck into a Christmas market in Berlin in an attack claimed by the Islamic State group.
He was shot dead by Italian police three days later after travelling through several European countries.
In November 2015, groups of militants murdered 130 people in Paris on November 13 in a coordinated rampage by Islamic State extremists that shook the country and Europe.
A 20-year-old Chechnya-born man went on a knife rampage in central Paris in May, killing one person and injuring four.
A total of 246 people have been killed in terror attacks in France since 2015, according to an AFP toll.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ