MILAN (AP) — A routine request for ID papers outside a deserted train station in a Milan suburb at 3 a.m. Friday led to a police shootout that killed the Tunisian fugitive wanted in the deadly Christmas market attack in Berlin.

While authorities expressed relief that the search for Anis Amri was over, his four-day run raised fresh questions about whether he had any accomplices and how Europe can stop extremists from moving freely across its open borders, even amid an intense manhunt.

Italian police said Amri traveled from Germany through France and into Italy after Monday night's truck rampage in Berlin, and at least some of his journey was by rail. French officials refused to comment on his passage through France, which has increased surveillance on trains after recent attacks in France and Germany.

Italian Premier Paolo Gentiloni called for greater cross-border police cooperation, suggesting some dismay that Europe's open frontier policy had enabled Amri to move around easily despite being its No. 1 fugitive.

Amri, whose fingerprints and wallet were found in the truck that plowed into Christmas market outside Berlin's Kaiser Wilhelm Memorial Church, killing 12 people and injuring 56 others, was caught seemingly by chance after eluding police for more than three days.

"He was a ghost," Milan police chief Antoio de Iesu said, adding that Amri was stopped because of basic police work, intensified surveillance "and a little luck."

Like other cities, Milan has been on heightened alert, with increased surveillance and police patrols. Italian officials stressed that the two young officers who stopped Amri didn't suspect he was the Berlin attacker, but rather grew suspicious because he was a North African man, alone outside a deserted train station in the dead of night.

Amri, who had spent time in prison in Italy, was confronted by the officers in Sesto San Giovanni, a suburb of Milan. He pulled a gun from his backpack after being asked to show his ID and was killed in an ensuing shootout.

Story continues

One of the officers, Christian Movio, 35, was shot in the right shoulder and had surgery for what doctors said was a superficial wound. His 29-year-old partner, Luca Scata, fatally shot Amri in the chest.

The suspect had no ID or cellphone and carried only a pocket knife and the loaded .22-caliber pistol he used to shoot Movio, police said. He was identified with the help of fingerprints supplied by Germany.

The Islamic State group has claimed responsibility for Monday's attack. On Friday, it noted his death in Milan and released a separate video showing Amri swearing allegiance to the group's leader, Abu Bakr al-Baghdadi, while vowing to fight non-Muslims.

The video, which appeared to have been taken by Amri himself, showed him on a footbridge in northern Berlin, not far from where the truck used in the attack was hijacked. It was not known when the video was taken.

German authorities were suspicious of Amri and had put him under covert surveillance for six months following a warning from intelligence agencies that he might be planning an attack. But the surveillance ended in September after police found no proof of his alleged plans.

Separately, German authorities tried to deport Amri after his asylum application was rejected in July but were unable to do so because he lacked valid identity papers, and Tunisia initially denied that he was a citizen. Authorities said he has used at least six different names and three nationalities.

Even as she voiced relief at the news from Milan, German Chancellor Angela Merkel ordered a comprehensive investigation to determine whether mistakes had been made and legal hurdles had hampered the authorities' handling of the case.

"We can be relieved at the end of this week that one acute danger has been ended," she said in Berlin. "But the danger of terrorism as a whole remains, as it has for many years — we all know that."

Amri passed through France before arriving by train at Milan's central station where video surveillance showed him at about 1 a.m. Friday, de Iesu said.

A Milan anti-terrorism official, who spoke on condition of anonymity because he was not authorized to talk publicly about the investigation, said Amri made his way to the piazza outside the Sesto San Giovanni train station that is 7.5 kilometers (nearly 5 miles) from the main station.

Authorities are still trying to determine how Amri arrived at the piazza because only a few buses operate at that hour.

"It is now of great significance for us to establish whether the suspect had a network of supporters or helpers in preparing and carrying out the crime, and in fleeing, whether there were accessories or helpers," said Germany's chief federal prosecutor, Peter Frank, who heads the investigation.

Holger Muench, the head of the Federal Criminal Police Office said Amri's name "has come up in the past" in connection with the network centering allegedly run by Ahmad Abdulaziz Abdullah A., also known as Abu Walaa.

The Germany-based preacher was arrested Nov. 8 with four other men and accused of leading a group whose aim was to steer people to the Islamic State group in Syria. Prosecutors say the network smuggled at least one young man and his family to Syria.

Family members in Amri's central Tunisian hometown of Oueslatia said he wasn't particularly religious before leaving for Europe in the wake of the 2011 Arab Spring.

In Italy, where Amri first lived, he served 3½ years in jail for setting a fire at a refugee center and making threats, among other things — but authorities apparently detected no signs of radicalization. He was transferred repeatedly among Sicilian prisons for bad conduct, with records saying he bullied inmates and tried to spark insurrections.

After learning of his death, Amri's mother said she feared the world would never know why he allegedly rammed a truck through a holiday crowd.

"Within him is a great secret. They killed him, and buried the secret with him," Nour El Houda Hassani told The Associated Press. She begged for his remains to be brought home, and said, "I want the truth about my son — who was behind him, those who indoctrinated him."

Under pressure to show that her government is taking seriously the threat posed by young extremists who, like Amri, slipped into Germany along with an influx of migrants in the past two years, Merkel said her country would step up the deportation of Tunisians who aren't entitled to residency in Germany.

Last year, Germany deported just 17 to Tunisia. That figure increased to 117 so far this year.

___

Associated Press writer Colleen Barry reported this story in Milan and AP writer Frank Jordans reported from Berlin. AP writers Geir Moulson in Berlin, Nicole Winfield in Rome, Angela Charlton in Paris and Bouazza ben Bouazza in Tunis, Tunisia, contributed to this report.

___

This story has been corrected to show that San Giovanni is a suburb of Milan.