Small, shy and undoubtedly damaged, Ahmed Hassan attracted no end of kindness and sympathy when he arrived in Britain in the back of a cross-Channel lorry in October 2015, saying he was Iraqi and 16 years old.

His mother had died when he was an infant, he said, and he had been six when his father, a Baghdad taxi driver, had been killed in an air raid. “He used to go to work and come back in the evening, and one day he didn’t come back.” At first he blamed the Americans for this calamity; later he said that he blamed the British.

The staff at a hostel run by the children’s charity Barnardo’s were worried at how depressed Hassan appeared to be: at one point he spent three days in hospital, watched carefully as a suicide risk. Lecturers at Brooklands College in Weybridge, Surrey, recalled him as a disturbed young man who would snap pens and storm out of classes. “Traumatised, on edge and not very trusting,” said one. “Broken,” said another.

Parsons Green tube bomber convicted of attempted murder Read more

But after moving into the home of Penny and Ron Jones, experienced foster parents in nearby Sunbury-on-Thames, Hassan is said to have became calmer. His teachers described him as invigorated.

He showed himself to possess real talent, winning the student of the year award for his film-making achievements. His prize was a £20 Amazon voucher. He was also entrepreneurial, buying and selling mobile telephones to turn a tidy profit.

Facebook Twitter Pinterest Device components recovered from the explosive device left by Ahmed Hassan on a tube train. Photograph: HANDOUT/Reuters

When a Barnardo’s worker accompanied Hassan to an interview with a Home Office immigration official, she was alarmed to hear him say he had spent three months with Islamic State, “being trained on how to kill”. She insisted on a second interview with an interpreter, during which Hassan said Islamic State had taken him by force, after threatening to kill his elder brother and the uncle who cared for them following the death of their father.

Hassan told the Old Bailey jury that this had been a lie, intended to generate sympathy and to secure asylum status in the UK. It was a story that had been suggested to him, he said, while he was at the makeshift refugee camp outside Calais that is known as the “Jungle”. The camp, he told the court, was a place where “so-called people of experience” dreamed up plausible tales, and sold them to people who were trying to smuggle themselves into Britain.

Nevertheless, Hassan was referred to the Prevent counter-terrorism programme around the time of his Home Office interview, and was then given support through the Channel counter-radicalisation project. He continued to engage with the project right up until the point at which he started making his bomb, apparently giving the impression that he was making good progress; that he posed no risk to the public.

Facebook Twitter Pinterest Metal parts from Ahmed Hassan’s bomb. Photograph: HANDOUT/Reuters

Hassan did not dispute that he constructed the bomb. He used the Amazon voucher to purchase one of the ingredients, hydrogen peroxide, and mixed it in his bedroom last August while the Joneses were on holiday in Blackpool.

Giving evidence in near-fluent English, Hassan insisted that he had modified the ingredients so that they would burn, rather than detonate. But he struggled to offer a reason for having planted the device on a packed, rush-hour District line tube train on 15 September last year. The best he could offer was that he thought he was attempting to draw attention to himself. “I wasn’t thinking as a normal person would. I was very bored, very depressed, very confused.”

Asked why he had surrounded the bomb with shrapnel, including five knives, two screwdrivers, and nails and screws, he initially told the London court that this material was intended simply to fill a gap inside the device: “It had to be filled with something.” On second thoughts, he said this was done so that the device “would look serious” when it was found.

Play Video 0:49 CCTV footage of the explosion on the tube in Parsons Green - video

The bomb partially detonated after the train pulled into Parsons Green station in west London, creating a fireball that burned passengers’ skin, hair and clothing. One survivor began weeping while giving evidence at his trial; another broke down before she entered the court, and needed help to reach the witness box, where a curtain ensured she did not have to see Hassan.

The crown’s case was that Hassan intended his bomb to explode fully, killing and maiming those nearby, and that he had been motivated by guilt. “You felt that you had let down people in Iraq, for coming here and accepting safe haven in the country that you held responsible for your father’s death,” said Alison Morgan, prosecuting.

There is another possible explanation for Hassan’s actions, one that had nothing to do with any sense of guilt over the kindness and sympathy he had received in the UK.

The court heard that he had told one of his lecturers at Brooklands that he believed he had “a duty to hate Britain” because of the death of his father. “The anger was really clear,” she said. At one point Hassan had referred to Tony Blair. Glancing at his mobile telephone during one meeting, the lecturer saw a message saying: “Islamic State has accepted your donation.” She had been particularly concerned by the word “duty”.

In July last year, Hassan contacted the same lecturer again, texting to complain: “Your country continues to bomb my people daily.”

A few weeks later he began assembling his own bomb.