The man who carried out Monday's deadly lorry attack on a Christmas market in Berlin has been shot dead by police in Milan, Italy's interior minister says.
German prosecutors named Anis Amri as the driver in the attack that left 12 dead and 49 injured after discovering his identity papers under the seat in the cab of the lorry.
His fingerprints were also later discovered in the cab.
He was shot on Friday after he opened fire on Italian police who asked him for ID during a routine patrol in the Sesto San Giovanni area.
The Italian authorities said the man killed in the shootout was "without a shadow of a doubt" Amri.
Amri, 24, was known to German police and had used a number of identities. He had travelled to Germany from Italy, where he served four years in prison over a fire at a school and refugee reception centre.
Ralf Jaeger, interior minister of North Rhine-Westphalia state, said the man had been under investigation for planning an attack.
He said counter-terrorism officers had exchanged information about him, most recently in November, suspecting him of preparing "a serious act of violence against the state".
Security sources in Tunisia say he was born in the city of Tataouine before moving to the city of Kairouan.
His brother Walid Amri, speaking outside his home in Ouslatiyah, said that Anis had done odd jobs including farm work when growing up.
"He used to get drunk and go around," he said, choking back emotion. "He didn't pray, he grew up like most youngsters here."
Walid Amri said that when his brother was in Europe, they would talk via phone and social media.
"I would always ask how he was and he would say he was fine and ask about everyone and say that he wanted to come back, but he was saving money so he could come here and buy a car and start a business.
"That that was his dream and we assumed he would be coming in January. I last spoke to him 10 days ago before this attack. I said, 'Anis, are we going to see you?' and he said, God willing, he would be back in January. He was laughing and being playful. Nothing seemed wrong."
Italian officials said Amri had arrived in Italy in 2011 along with tens of thousands of other young men who fled Tunisia during the Arab Spring revolutions.
But in October of that year he was arrested in connection with a fire at a building and later convicted of vandalism, threats and theft.
The Italian justice ministry says he displayed bad conduct and was transferred among Sicilian prisons. Prison records indicate he tried to spark insurrections and also bullied other inmates.
However, there is no evidence that he was becoming radicalised.
Italian sources said that in 2015, at the end of his jail sentence, efforts were made to deport Amri to Tunisia but authorities there said they could not be sure he was Tunisian. Instead, he was released and merely asked to leave the country.
His other brother, Abdelkader, told Sky News Arabia that Anis had left prison a changed man.
"He went into prison with one mentality and when he came out he had a totally different mentality," he said. "He doesn't represent us or our family."
Amri then travelled to Germany where he applied for asylum in April of this year.
He was granted temporary leave to remain and was registered at an asylum centre in Emmerich in North Rhine-Westphalia.
Emmerich is about 140km (87 miles) north of the city of Cologne, near the border with the Netherlands.
What the Tunisian interior ministry says about Anis Amri
- His full name was Anis Ben-Mustafa Ben-Outhman Amri
- He was born in the city of Tataouine
- Before he left home for Italy illegally by boat in 2011, he had a reputation for being socially conservative
- From Italy he made his way to Germany - it is not clear at what date
However, Mr Jaeger said Amri's asylum request was rejected in the summer by the federal office for migration and refugees.
He added: "The man could not be deported because he had no valid identification papers."
German officials said Amri's documentation showed he had used six different names under three different nationalities.
In Germany, he moved between North Rhine-Westphalia and Berlin. In July this year police investigated him over a knife brawl in the capital, according to Bild newspaper.
The Sueddeutsche Zeitung said Amri was arrested in August in the southern town of Friedrichshafen carrying a false Italian identity document but was released shortly afterwards.
The newspaper said he moved in the circle of Islamist preacher Ahmad Abdelazziz A, known as Abu Walaa, who was arrested in November.
Amri is also said to have shared a home with a man who was arrested at the same time as Abu Walaa. That person, named by the media as Boban S, is accused of recruiting for armed jihad and having links to so-called Islamic State.
According to the Sueddeutsche Zeitung, Amri is said to have asked a man - who was a police informant in North Rhine-Westphalia - if he could get hold of guns.
One investigator quoted by the newspaper said he did not know why Amri should have escaped police notice.