Some 350 people, including police, troops and helicopters were on the heels of the attacker who had "sowed terror" in the city, Interior Minister Christophe Castaner said.
The killer opened fire at around 8pm on one of the city's busiest streets, sending crowds of evening shoppers fleeing for safety.
Castaner said the gunman had killed three people and wounded 12.
Soldiers patrolling the area as part of regular anti-terror operations exchanged fire with the suspect and wounded him, but could not stop him escaping, police sources said. A soldier was slightly injured by a ricohet from a shot by the gunman.
Castaner also said France had raised its security alert level to "emergency attack" with "the implementation of reinforced border controls and tightened controls on all Christmas markets in France to avoid the risk of a copycat" attack.
The gunman has been identified and was on a watchlist of suspected extremists, a statement from local security services said.
France's security forces, already on high alert after a series of terror attacks since 2015, are particularly stretched at the moment due to anti-government protests that have swept the country.
"I heard shooting and then there was pandemonium," one witness, who gave his name as Fatih, told AFP. "People were running everywhere."
He said he had seen three people injured on the ground only a few metres from the giant Christmas tree in the centre of the city.
Shortly after the shooting, lines of police vehicles and ambulances streamed into the market area, under festive lights declaring the city the "capital of Christmas."
"We heard several shots, three perhaps, and we saw people running," one witness told AFP, asking not to be named.
"One of them fell down, I don't know whether it was because she was tripped up or if she was hit," the witness said.
President Emmanuel Macron expressed on Twitter the solidarity of the whole nation after holding a crisis meeting with cabinet officials in Paris.
Solidarité de la Nation tout entière pour Strasbourg, nos victimes et leurs familles.
— Emmanuel Macron (@EmmanuelMacron) December 12, 2018
Two separate security sources told AFP on condition of anonymity that the shooter was believed to be a 29-year-old from the city, whose name was given as Cherif, and who was set to be arrested on Tuesday morning.
He was being investigated over an attempted murder, one of the sources said.
Several areas neighbouring the Christmas market were sealed off on Tuesday night and residents were being told to stay indoors.
Many people took refuge in local restaurants and bars which pulled down their shutters.
"We let everyone inside, down into the wine cellar. They're locked in there," local restaurant owner Mouad, 33, told AFP.
A police source, again speaking on condition of anonymity, said security forces had opened fire in an area of the city where the suspect was thought to be hiding.
The source did not give the address and it was unclear if the shooter had been located.
Specialist anti-terror prosecutors have opened an investigation into the incident in Strasbourg, which lies on the border with Germany.
Several residents of the city have been detained in recent years for trying to reach militant groups in Syria, or have been arrested upon their return.
"Shocked and saddened by the terrible attack in Strasbourg. My thoughts are with all of those affected and with the French people," British Prime Minister Theresa May wrote on Twitter.
Shocked and saddened by the terrible attack in Strasbourg. My thoughts are with all of those affected and with the French people.
— Theresa May (@theresa_may) December 11, 2018
The Strasbourg-based European Parliament was also on lockdown, with MEPs, staff and journalists unable to leave the building.
In a parliament bar usually reserved for MEPs, EU commissioners, powerful legislators and staffers huddled in small groups waiting for developments.
"Our first thought was for colleagues who had already made it to the centre of town, who are safe," Belgian MEP Kathleen Van Brempt told AFP. "Now we just wait."
The Christmas market in Strasbourg and the city's illuminations are an annual attraction that draws hundreds of thousands of people.
Security has been stepped up in recent years after a series of attacks in France by militant gunmen and the Strasbourg market was long considered a possible target.
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.
Special anti-terror army units have been deployed in Strasbourg, and soldiers and armed police are regularly seen patrolling among the 300 wooden Christmas market chalets.
Clashes after French police shoot young man dead
Three years after groups of militants gunned down and blew up 130 people in Paris on November 13, 2015, French counter-terror officials say their focus has shifted.
Rather than coordinated attacks, their main concern is attacks by "lone wolves" -- self-radicalised individuals acting without links to terror groups such as Islamic State.
Three die in French shooting rampage
Most recently a 20-year-old Chechnya-born man went on a knife rampage in central Paris last May, killing one man and injuring four other people on a Saturday night.
A total of 246 people have been killed in terror attacks in France since 2015, according to an AFP toll.
COMMENTS (2)
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ