A teenage asylum seeker accused of planting a bomb on a London Underground train told British authorities he was trained "how to kill" in Iraq by the Islamic State group, a court heard on Wednesday.
Ahmed Hassan, 18, denied he was sent to Europe to work for the jihadist group but said they took him by force and "they trained us on how to kill", before Iraqi soldiers freed him, according to details revealed at the start of his trial.
Hassan, who arrived in Britain in October 2015, denies attempted murder and using the chemical compound TATP to cause an explosion on a packed Tube train on September 15.
Many commuters suffered serious burns or were crushed in the stampede after the blast during the morning rush hour, at Parsons Green station in south-west London.
Prosecutor Alison Morgan said it could have been far worse, telling jurors: "Had the device fully detonated, it is inevitable that serious injury and significant damage would have been caused within the carriage."
Hassan claimed asylum when he arrived in Britain on the back of a lorry travelling through the Channel Tunnel from France, saying he was in fear of the Islamic State group.
He revealed his recruitment and training -- as part of a group of around 1,000 people -- in an interview with British interior ministry officials in 2016, the court heard.
Hassan was living with foster parents in Surrey, outside London, when he decided to attack the train, prosecutors said.
He researched online how to make explosives, ordering an ingredient on Amazon, and bought screwdrivers, knives and nails for shrapnel from supermarkets.
He set a timer and left the bomb before getting off one station before Parsons Green, the court heard.
Hassan was arrested at the southern English port of Dover, with £2,320 (2,595 euros, $3,218) in cash, and told police he was responsible for the device, prosecutors said.
The trial continues.