The Strasbourg gunman yelled "Allahu Akbar" ("God is greatest" in Arabic) as he opened fire on people at a Christmas market, France's anti-terror prosecutor has told reporters.
Rémy Heitz said two people were killed and one left brain-dead in Tuesday's attack in the eastern French city.
Twelve were wounded, six seriously.
The main suspect, named by local media as Chérif Chekatt, is known to authorities as someone who was radicalised in prison.
The 29-year-old was armed with a gun and a knife and escaped the area in a taxi, Mr Heitz said.
The attacker boasted to the driver - who has spoken to police - that he had killed 10 people, and said he had been injured in a firefight with soldiers.
Four people connected to the suspect had been detained overnight in Strasbourg, Mr Heitz added. Sources close to the investigation quoted by Reuters news agency said they were the suspect's mother, father and two brothers.
Strasbourg shooting: What we know so far Face to face with the gunman
Hundreds of officers are currently involved in the search for the gunman.
France's Deputy Interior Minister Laurent Nuñez earlier acknowledged he might no longer be in France. Strasbourg is close to the border with Germany.
Interior Minister Christophe Castaner said the country had moved to the highest level of alert, expanding police powers and increasing vigilance.
He added that border controls had been strengthened and security at all Christmas markets would be stepped up.
The mayor of Strasbourg, Roland Ries, has said the Christmas market will be closed on Wednesday and Thursday, with flags lowered to half-mast at the local town hall. What happened?
The attack unfolded at around 20:00 local time (19:00 GMT) on Tuesday close to Strasbourg's famed Christmas market near one of the central squares, Place Kléber, which attracts thousands of visitors at this time of year.
A woman called Audrey told France's BFM TV how she came face to face with the killer after watching him shoot a man in the head. Image copyright Getty Images Image caption The new alert level heightens powers of the police
The gunman then opened fire for a second time, and another man fell to ground.
Her friends began to run to safety, but Audrey was frozen to the spot. The gunman turned, and faced her - but then he too ran.
"Why didn't he shoot at me?" she told the TV channel. "I don't know. I think I was extremely lucky. As everyone was screaming he fled."
According to Mr Heitz, as he fled he came into contact with four soldiers. He began firing at them and they fired back, apparently hitting him in the arm.
He managed to reach a taxi which drove him away from the scene and dropped him in the vicinity of the police station in Neudorf, the area where he lives which sits on the border between Germany and France.
When he got out the vehicle, he fired at police officers. What do we know about the gunman?
According to police - who refer to him as Chérif C - the gunman was born in Strasbourg and was already known to the security services as a possible Islamist terrorist threat.
He was the subject of a "fiche S", a watchlist of people who represent a potential threat to national security. Image copyright Getty Images Image caption Armed police secure the area after the deadly shooting incident on Tuesday
He has 27 convictions for crimes including robbery spanning France, Germany and Switzerland, and has spent considerable time in prison as a result.
Police were seeking him on Tuesday morning in connection with another case, but did not find him at home.
Mr Nuñez said his crimes had never before been terrorism-related. But, he added, it was during one period in prison that he was indentified as having become radicalised.
The papers are dominated by Theresa May's last-minute delay to the meaningful vote on her Brexit deal.
The headlines make grim reading for Number 10. The "Lady IS for Turning" declares the front page of the Daily Telegraph, reversing Margaret Thatcher's famous statement; "May Running Scared" in "new Brexit shambles" is the Daily Mirror's take.
"Mayday!", declares the i, describing Mrs May's decision as an "extraordinary climbdown". Quentin Letts, in the Daily Mail, captures the highly-charged atmosphere in the Commons: "Has indecision ever been so dramatic?", he asks, writing that MPs on Monday "gawped" at Mrs May "rather as wildlife programme viewers will watch the slow demise of a baby hippo."
There's also little confidence that the prime minister's European meetings will change things.
The Times says Mrs May will "beg European leaders to rescue her Brexit deal", but the Economist points out the EU is unlikely to offer anything beyond "bland reassurances", which won't be legally binding in any case.
That won't satisfy her sceptical MPs, the Guardian argues, with even cabinet sources "voicing concern" about the strategy.
I live in what I call anelective dictatorship. The governmant is right and will make decisions for you The peoples will comes second. For example Brexit, the people voted for out, some members of government, didn't like the democraticvote and want us to vote again until we get it right their way.
Allahu Akbar
I think you've got it the wrong way around