An 18-year-old Iraqi asylum seeker on Friday received a life sentence with a minimum 34-year jail term over the botched bombing of a rush-hour London Underground train that injured 30 people.
Judge Charles Haddon-Cave said Ahmed Hassan had constructed a homemade bomb "to kill as many members of the British public as possible".
"I am satisfied...that the offence of attempted murder of which you have been convicted was an act of terrorism on your part by the use of explosives aimed at advancing a political, religious, ideological or racial cause," said the judge on sentencing.
Hassan left the improvised bucket bomb filled with screwdrivers, knives, nuts, bolts and "Mother of Satan" TATP explosives in a carriage carrying 93 passengers on September 15 last year.
It partially exploded at Parsons Green Tube station in west London, one stop after he had alighted, triggering a stampede that injured tens of other passengers.
The judge at England's Old Bailey central criminal court in London called Hassan a "dangerous and devious individual" who had let down the country that gave him shelter, the foster charity that cared for him and the college he attended.
Hassan had benefited from "every kindness" since arriving in the UK in October 2015, yet was consumed with "dark thoughts" against Britain.
"One can only imagine the sense of betrayal felt by all those at Barnardo's and Brooklands College whom you duped," said Haddon-Cave.
The judge said he believed Hassan had trained with the Islamic State (IS) jihadist group in Iraq, and that he may be older than 18.
John Conaghan, from British Transport Police, "thoroughly welcomed" the lengthy sentence.
"His appalling attack could have claimed many lives on that busy rush hour train. Thankfully, no one was killed and his imprisonment will prevent him from posing any further threat to the public," he said.
Hassan told jurors that he did not intend to hurt people, and that he was "bored and stressed" and wanted to start a fire.
"It became kind of a fantasy in my head. I was thinking about it," he said.
"I was watching documentaries as well, about fugitives and just the idea of being a fugitive got into my head."
Prosecutors earlier showed the jury Hassan's online purchase history, which included chemicals, along with security camera footage from the day before the attack showing him buying shrapnel items.
Hassan told authorities he was in fear of IS, which he said had taken him by force in Iraq and trained him "how to kill".
He was given a home by foster parents Penny and Ron Jones, and studied media and photography at Brooklands College in Weybridge, southwest of London.
His college mentor contacted the anti-terror programme Prevent after Hassan said it was his "duty to hate Britain".
He assembled the bomb while his elderly foster parents were on holiday, using money from a school prize to buy the chemicals.
The partially exploded bomb sent a fireball down the carriage, which left passengers with burns.
Commuter Stephen Nash told court that he was on his way to work when he experienced a "blinding flash" before being "engulfed in flames".
"I was thrown to the ground," he said. "The flames were overwhelming... It was intense heat, I thought I had lost my ears, I thought my head was on fire."
Fellow witness Aimee Colville said she heard a "loud bang" and "cracking" before "a wall of glass came across".
Hassan then destroyed his phone and fled to the port town of Dover, where police arrested him. He was carrying more than £2,000 ($2,800, 2,270 euros) in cash.