Update: A 29-year-old extremist suspected of killing two people near a Christmas market in Strasbourg shouted "God is great" as he opened fire.
A massive manhunt is underway for Cherif Chekatt after the shooting which left another person brain dead and 12 injured.
Prosecutor Remy Heitz said witnesses heard the gunman shout Allahu Akbar - God is Great in Arabic - during chaotic scenes in the city in eastern France.
One of those killed was named as Thai national Anupong Suebsamarn, 45, who had been on holiday in France with his wife.
They had reportedly planned to be in Paris but the yellow vest protests in the capital caused them to change their itinerary and go to Strasbourg instead.
A young Italian radio journalist who was in the city to cover a session of the European Parliament was critically injured. Antonio Megalizzi, who works for the Europhonica radio consortium linked to universities, was shot in the head.
Police union officials said that Chekatt had a long criminal record for offences including armed robbery and that he was monitored as a suspected religious radical by the French intelligence services.
A judicial official said that Chekatt's father and two brothers were among four people taken into custody as part of the investigation.
He said other members of Cherkatt's family are known for radical views.
A French prosecutor has said witnesses heard the gunman shout "God is great" in Arabic during the shooting spree in Strasbourg that killed two people and left another brain dead.
Prosecutor Remy Heitz said the gunman was shot in the arm during an exchange of fire with French soldiers in the city centre and then took a taxi to another part of the city during the rampage on Tuesday night.
He said the man was armed with a handgun and a knife. He also left 12 people injured.
Previously, French authorities said the gunman killed three people but Mr Heitz said two people were confirmed dead while the third was brain dead.
He also said police found a grenade, a rifle and four knives during a search on Tuesday morning of the 29-year-old's house.
Two French police officials have identified the suspected Strasbourg gunman as 29-year-old Cherif Chekatt.
One police source said Chekatt's criminal record mentions 25 judicial cases, including several serious cases of robbery.
German police say he was imprisoned there in 2016 for theft before being deported back to France.
The official said his apartment was searched by police on Tuesday morning - hours before the shooting - in an investigation over attempted murder. He was not at home at the time.
Chekatt is on the run after the shooting which also wounded at least 13.
A large-scale manhunt is underway for a suspected extremist gunman who killed three near a Christmas market in Strasbourg.
Authorities in France have launched a terror investigation into the shooting, with interior minister Christophe Castaner saying 350 officers are hunting for the man who was already known to security services.
The 29-year-old alleged gunman, from the city in eastern France, has served prison sentences in France and Germany for common law offences and exchanged fire with law enforcement as he "sowed terror", Mr Castaner said.
In the wake of the attack, which has also left 11 injured, of which five are in a critical condition, the French government has increased its security alert system Vigipirate to its highest level.
Mr Castaner said: "Three hundred and fifty police and gendarmes are currently on the ground to apprehend the suspect, supported by two helicopters, the RAID (French anti-terror police), the BRI (anti-gang brigade) and the Sentinel force.
"The government has decided to move the security level to "Emergency Attack" with stricter controls at the borders, and the implementation of reinforced controls on all the Christmas markets that are taking place in France to avoid the risk of copycat attacks."
Authorities have not publicly named the man, but French media have reported he is called Cherif C.
Stephane Morisse, from the FGP Police union, said authorities investigating a robbery went to the alleged gunman's Strasbourg home earlier on Tuesday, but he was not there.
The suspect was shot and injured by soldiers guarding the Christmas market, but he escaped in a taxi, BFM TV said.
He was said to have entered central Strasbourg via the Corbeau bridge to the south of the city centre, before heading to Rue des Orfevres, a popular shopping street close to the cathedral, where he opened fire at around 8pm local time (7pm GMT).
In the aftermath, residents were urged to stay indoors and the nearby European Parliament was placed on lockdown.
Antonio Tajani, the president of the parliament, said: "This parliament will not be intimidated by terrorist or criminal attacks. Let us move on. We will continue to work and react strengthened by freedom and democracy against terrorist violence."
Fans attending a basketball game were also kept behind and began to sing the French national anthem in "homage to the victims".
The mayor of Strasbourg Roland Ries said the Christmas market will be closed today and flags will be lowered to half-mast.
He tweeted: "A book of condolences will be opened at the Town Hall from today.
"I want to thank the people of Strasbourg and visitors to the city for their patience and understanding."
President Emmanuel Macron, who attended an Interdepartmental Crisis Centre meeting, left without speaking to reporters but later tweeted the "solidarity of the entire nation" is with Strasbourg, the victims and their families".
France has been hit by several extremist attacks in recent years, including the 2015 Paris shootings which left 130 people dead and wounded hundreds more.
In 2016 a truck was driven into Bastille Day crowds in Nice, killing 86 people and leaving hundreds injured.
Twelve people were killed and 48 were injured when a man drove a truck into crowds at a Christmas market in Berlin in 2016.
- Digital Desk and PA