The Tunisian man sought as the primary suspect in connection with the truck attack on a Berlin Christmas market this week was killed early Friday morning by Italian police near Milan, Italy.

Anis Amri, whose bid for asylum in Germany was rejected in July, became the subject of a massive manhunt on Thursday morning after authorities discovered his personal documents in the cab of the truck used in the Berlin attack, and his fingerprints on the door.

Italian Interior Minister Marco Minniti said at a news conference that the incident began early Friday morning near the Sesto San Giovanni train station in Milan’s outskirts.

Two police officers stopped the man presumed to be Amri, who was on foot, and asked to see his identification.

A photo published by Italian daily Il Tempo shows Anis Amri, the suspect in the Berlin terror truck attack, dead on the ground after a shootout with police in Milan, Italy, Dec. 23, 2016. Il Tempo

Amri then removed a handgun from a backpack and shot one of the officers in the shoulder before being fatally shot by the other officer, Minniti said. He added that Amri had been identified “without a shadow of a doubt.”

Get Breaking News Delivered to Your Inbox

Minniti lauded the two officers who stopped Amri and said the one shot in the shoulder, Christian Movio, was not seriously injured. According to the interior minister, Luca Scata, the officer who fatally shot Amri in the chest, was just 29 years old, and a rookie on the national police force.

Police officials said later that Amri died 10 minutes after he was shot. They said he tried to hide behind a car after shooting Movio, but was pursued and fatally shot by the rookie officer.

Amri was carrying no ID, no phone and had only a knife and the loaded 22-caliber handgun he used to shoot Movio and, likely, the Polish driver of the truck he used in the Berlin attack.

“He was a ghost,” Milan police chief Antoio de Iesu said, according to the Associated Press. Iesu said Amri was stopped thanks to good old fashioned police work, “and a little luck.”

ISIS, which has claimed responsibility for the attack in Berlin and claimed Amri as one of its own, tried to paint the fatal encounter in Milan as another “attack” by the Tunisian on Italian police. There was nothing to back up that portrayal of events, however.

The terror group also released a new video Friday, in which Amri is seen pledging his allegiance to ISIS leader Abu Bakr al-Baghdadi, and then explaining his actions as vengance against “those who bomb Muslims everyday.”

A photo provided by Italy’s national police force shows Christian Movio, the officer wounded during the encounter with Berlin terror suspect Anis Amri in Milan early on the morning of Dec. 23, 2016. Amri was killed in the shooting after wounding Movio. Italian police handout

Speaking later in Berlin, German Chancellor Angela Merkel thanked the Italian police for bringing the European manhunt for Amri to an end, but vowed the investigation into the market attack would continue until anyone who helped him was aprehended.

Facing myriad questions over how Amri managed to evade German police, make it to France and then on to Italy, and how the Tunisian who had already been on law enforcement radars managed to carry out his attack in the first place, Merkel vows that security measures would be reviewed.

Before coming to Italy in 2015, Amri spent at last three years in an Italian jail after being arrested as a juvenile in connection with a fire started at a center for migrants, according to his brother. In his native Tunisia, Amri’s brother Walid said earlier this week that he and his family were “shocked” by his brother’s alleged involvement in the attack.

“If he can see me now, I would tell him ‘you should not have done this,’” Walid Amri told the Associated Press. In a separate interview, Walid told Sky News Arabia that he believed his brother became radicalized while serving his prison sentence in Italy.

“It’s the time he did in Italy that changed him,” Walid told Sky. “When he left here, he was a normal person; he used to drink alcohol, he did not pray. He got into religion during his time in prison after he’s met with many people inside. He met with Algerians, Egyptians, Syrians, and others from all over the place.”

Sources confirmed to CBS News on Thursday that Anis Amri was placed on the U.S. no-fly list in July of this year, after German authorities advised he was under investigation for links to terrorism.

CBS News correspondent Charlie D’Agata reported Thursday that investigators trying to piece together his past had determined that Amri crossed into Germany in July 2015. He applied for asylum, but was rejected in July 2016.

He was already known to authorities as a possible terror threat, and had been under surveillance until just three months before this week’s attack because of alleged ties to Abu Walaa, an Iraqi who was arrested in Germany only last month, accused of recruiting fighters for ISIS.

Amri should have been deported from Germany after his asylum request was denied. He was even in police custody after being caught with fake papers. But he slipped through Germany’s law enforcement net, and now officials are asking how that happened.