Cherif Chekatt, 29, was killed in the Neudorf/Meinau area of the city shortly after a big police operation was launched around 2100 hrs (2000 GMT) on Thursday about 2 kilometres from where he launched his attack on Tuesday.
Chekatt was killed after firing on police officers, who returned fire, one of the sources said.
Interior Minister Christophe Castaner told reporters later three police officers came across a man they believed to be Chekatt and went to arrest him.
He turned to fire on them and they shot and killed him, Castaner told reporters.
“I think it will help to get back to a life that I would describe as normal,” Strasbourg Mayor Roland Ries told reporters after news that Chekatt had been killed.
“With the death of this terrorist … citizens, like me are relieved,” he said
Reuters reporters near the scene heard three to four gunshots after armed police officers and units launched their operation, backed up by a helicopter circling overhead.
The death toll from Tuesday’s attack rose to three while police on Thursday combed the city in the east of France for a second day and manned checkpoints on the German border in their search for Chekatt.
Three others were fighting for their lives on Thursday, Castaner told a news conference before news broke that Chekatt had been shot dead.
Police issued a wanted poster in multiple languages for Chekatt, who was the main suspect in the attack and who had been on a watchlist as a potential security threat.
He had spent time in French, German and Swiss jails for a theft and violence and authorities say he was known to have developed radical religious views while behind bars.
Earlier in the day armed and masked police had swooped on the same Strasbourg neighbourhoods fanning out across three locations in late afternoon, including the area where Chekatt was last seen. He was killed not far from there.
Witnesses had told investigators that the attacker cried out “Allahu Akbar” (God is Greater) as he opened fire on Tuesday on the Christmas market in Strasbourg, a target Paris Prosecutor Remy Heitz suggested may have been chosen for its religious symbolism.
French soldiers, who are part of anti-terrorism patrols across the country, had shot him in the arm but he managed to escape and elude capture for 48 hours.
BFM TV citing investigators said a taxi driver, who had taken him away from the attack site, had told him he had carried out the attack to avenge his brothers in Syria.
Chekatt’s police file photo shows a bearded man of North African descent, with a prayer bruise on the centre of his forehead.
Neighbours on the housing estate where Chekatt family’s lived described the suspect as a typical young man who dressed in jogging pants and trainers rather than traditional Islamic robes.
“He was a little gangster, but I didn’t see any signs of him being radicalised,” said a leader of a community group standing outside Chekkat’s apartment building, who asked not to be identified while discussing him.
The Strasbourg attack was the latest in a succession of attacks linked to Islamist militancy in France going back to March 2012. Since January 2015 more than 240 people have been killed in various attacks, although the last one had been in May.
With the gunman still on the run and officials dubbing the attack an act of terrorism, France raised its security threat to the highest level.
More than 700 police took part in the manhunt. French and German police had manned controls on either side of the Europe Bridge, which spans the frontier running along the Rhine river, causing hours of logjams.
The Christmas market, a hugely popular attraction in historic Strasbourg, will reopen on Friday, Castaner said.
People began returning to the area on Thursday with many marking their respects for the victims by leaving candles in the main Kleber square.