An Uzbek man who carried out a lorry attack which killed five people in Sweden last year has been sentenced to life for terrorist crimes.
Rakhmat Akilov, 40, had expressed sympathy for the Islamic State (IS) group before the attack in Stockholm.
But prosecutors had to prove he intended to harm the state, as IS did not say it was behind the attack.
Akilov, a rejected asylum seeker, fled the scene but was quickly arrested and confessed during police interrogation.
He left Uzbekistan for Sweden in 2014 and sought residency there, but in December 2016 he was told that he had four weeks to leave the country.
He disappeared and, a few months before the attack, was put on an official wanted list.
On 7 April last year, Akilov hijacked a lorry and drove it at high speed down one of Stockholm's busiest shopping streets and into a department store.
Five people were killed and 10 more injured in the attack on Drottninggatan (Queen Street).
Police discovered an explosive device inside the lorry which was made up of gas canisters and nails. It did not explode properly and only caused fire damage to the vehicle.
Akilov reportedly ran from the scene still covered in blood and glass, but was arrested hours later in a northern suburb of Stockholm.
He quickly confessed during police interrogation.
"He acted with the direct intention to kill as many people as possible," the court said in its verdict.
Akilov will be expelled after serving the life term, the court added, which in Sweden is an average of 16 years.
As well as the five murders, he was found guilty of the attempted murders of 119 other people who were at the scene of the attack.
British national Chris Bevington was killed in the attack
Three Swedes, a Belgian woman and a British man were killed in the attack.
The British man was named as 41-year-old Chris Bevington who worked as a director with music streaming service Spotify.
The father-of-two was based in Stockholm with his family and reportedly threw his son to safety as the lorry sped towards them.
Following the attack, his father John described him as a "wonderful husband, son, father, brother and close friend to many".
Swedish national Marie Kide, 66, was also killed. She was a local politician for the Green Party in the town of Trollhattan, in western Sweden.
Party spokeswoman Esther O'Hara paid tribute to her. "Marie leaves a huge void behind her, she was a woman with a big heart and courage in her convictions," she said.
The other Swedish victims were Lena Wahlberg, 69, and an 11-year-old girl, Ebba Akerlund.
A 31-year-old Belgian woman, Maïlys Dereymaeker, from the city of Halle was also killed.
Rakhmat Akilov failed in his bid to get residency in Sweden, lost his job and was hiding from police who wanted to deport him prior to the attack.
According to reports, he had left a wife and four children behind in Uzbekistan to whom he was sending money.
In 2016, he reportedly lost his job after falling asleep at work. Bumping into a former colleague last year, he revealed he was spending his days "sleeping and smoking".
His Facebook page - which has been taken down - was linked to a number of extremists through friends and featured at least two propaganda videos linked to IS, one reportedly showing the aftermath of the Boston bombing.
During his trial, he said he wanted to punish Sweden for its part in the global fight against IS militants.
But he was not considered a threat by Swedish security services, who dismissed him as a "marginal character", apparently on the fringes of larger militant movements.