MILAN — The Tunisian man suspected in a deadly attack on a Christmas market in Berlin was killed early Friday in a shootout with police in Milan during a routine patrol, ending a Europe-wide manhunt.
Italian police said Anis Amri traveled from Germany through France and into Italy after the attack, at least some of it by train. French officials refused to comment on his passage through France, despite increased surveillance on its trains after both recent French attacks and the Berlin massacre.
Italian Premier Paolo Gentiloni praised the two young police officers for their courage in taking down Amri during a routine check of ID papers. But he also called for greater cross-border police cooperation, suggesting dismay that Amri was able to easily move through Europe’s open borders despite being Europe’s No. 1 fugitive.
Amri was identified with the help of fingerprints supplied by Germany.
‘‘The person killed, without a shadow of a doubt, is Anis Amri, the suspect of the Berlin terrorist attack,’’ said Italian Interior Minister Marco Minniti.
The Islamic State group has claimed responsibility for Monday’s attack outside Berlin’s Kaiser Wilhelm Memorial Church in which a truck plowed into a crowd of shoppers, killing 12 people and injuring 56 others. It also claimed the Milan shooting.
Milan, Rome and other cities have been on heightened alert since the attack, with increased surveillance and police patrols. Italian officials stressed that the 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 at 3 a.m.
Amri, 24, who had spent time in prison in Italy, was stopped by two officers during a routine patrol in the Sesto San Giovanni neighborhood of Milan early Friday. He pulled a gun from his backpack after being asked to show his identification and was killed in an ensuing shootout.
One of the officers, Christian Movio, 35, was shot in the right shoulder and underwent surgery for a superficial wound and was in good condition. Movio’s 29-year-old partner, Luca Scata, fatally shot Amri in the chest.
Amri’s death doesn’t reduce the terrorist threat to Germany, the country’s top security official said.
The threat ‘‘remains high’’ and security won’t be scaled down, Interior Minister Thomas de Maiziere said.
He said the two Milan police officers ‘‘did excellent work and acted with great bravery.’’
‘‘I'm very relieved that this attacker poses no risk anymore,’’ he said.
Amri passed through France before arriving by train at Milan’s central station where video surveillance showed him at around 1 a.m. Friday, Milan police chief Antonio de Iesu said. A train ticket indicates that he travelled from Chambery, France through Turin and into Milan, an Italian anti-terrorism official said.
De Iesu declined to provide further information, citing the ongoing investigation.
Germany’s chief federal prosecutor, Peter Frank, said his office is in contact with Italian authorities to establish what route Amri took.
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 in a suburb of Milan, which is 7.5 kilometers (nearly 5 miles) from the main train station.
Two police officers became suspicious because it was 3 a.m., the station was closed and Amri was alone. He had no ID, no phone and only a pocket knife on him, as well as the loaded 22-caliber pistol.
‘‘He was a ghost,’’ de Iesu said, adding that he was stopped because of basic police work, intensified surveillance ‘‘and a little luck.’’
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,’’ Frank said.
Prosecutors also want to know whether the gun Amri was carrying in Milan was the same one used to shoot the Polish driver of the truck he had commandeered for the attack, Frank added. The driver was found dead in the vehicle’s cab.
The Milan anti-terrorism official said investigators also are working to determine what contacts, if any, Amri had in Milan. There is no evidence he ever passed through Milan during his previous stay in Italy, where he spent time after leaving Tunisia in the wake of the 2011 Arab Spring uprisings.
Amri’s brother Abdelkader told The Associated Press by telephone that the family wants to find out the ‘‘truth about my brother.’’ He hung up when asked about the family’s reaction to Amri’s death.
The family told a crowd outside their house to leave when news of the police shootout reached the central Tunisian town of Oueslatia, according to neighbor Wiem Khemili. Police stood guard around the impoverished town, where everyone was talking about Amri.
Amri served 3½ years in Italy for setting a fire at a refugee center and making threats, among other things — but authorities apparently detected no signs that he was becoming radicalized. He was repeatedly transferred among Sicilian prisons for bad conduct, with prison records saying he bullied inmates and tried to spark insurrections.
His mother said he went from there to Switzerland and then to Germany last year.
Authorities in Germany deemed him a potential threat long before the Berlin market attack, and even kept him under covert surveillance for six months this year.
They had been trying to deport him 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 say Amri has used at least six different names and three nationalities in his travels around Europe.
Winfield reported from Rome. Frank Jordans and Geir Moulson in Berlin contributed to this report.