A teenage asylum seeker said it was his "duty to hate Britain" before he planted a bomb at Parsons Green Tube station, a court has heard.
Iraqi Ahmed Hassan, 18, arrived in Britain in October 2015, two years before he left 400g of TATP on a Tube train, which partially exploded, the Old Bailey has heard.
During that time, he studied media at Brooklands College in Weybridge, Surrey, and was found a foster home with a couple in Sunbury, the court heard.
Even though Hassan had been named student of the year in June 2017, his lecturer and mentor Katie Cable became concerned about his behaviour, the court heard.
Ms Cable even alerted the Prevent team after she saw a WhatsApp message on his phone saying: "IS has accepted your donation" in August 2016.
He also told her he blamed Britain for the death of his parents in Iraq and said: "It's my duty to hate Britain," the court heard.
Giving evidence, Ms Cable said Hassan was initially "incredibly conflicted, frightened, confused, plagued by boredom".
When he first started at Brooklands in April 2016, he would snap pens and walk out of the classroom, she said.
Ms Cable told jurors: "I believe Ahmed said his father was blown up and his mother had been shot."
He talked about Tony Blair and expressed "anger" at events in Iraq, she said: "I believe the anger was very clear. He referred to being angry several times."
He allegedly told her "the British" were responsible for his parents' death.
He would suffer "flashbacks" and "depression", so she organised a place on the National Citizenship Scheme during the summer of 2016.
But he declined holiday offers in the 2017 break and by September 7 last year, Ms Cable said she was becoming "really concerned about his mental state".
The day before the bombing, he gave her presents for children, which she found "strange".
Ms Cable told jurors Hassan was "very clever" and made great academic progress.
Prosecutor Alison Morgan asked: "Did you think he was straight with you?"
She replied: "I don't know. If you had asked me in September I would have said yes."
She added that he could be "very secretive" and once went to Wales to visit "a friend" without telling anyone where he was going.
He made a video for college about destroying a mobile phone, and she said: "Why would anyone be so keen to erase their data?"
The court heard Hassan had earlier given Barnardo's workers differing accounts about his background while at a children's hostel.
And in an immigration interview in January 2016, he told officials that IS had trained him "to kill".
Barnardo's worker Youseff Habibi told jurors: "His father was a taxi driver and one morning he went to work and a bomb fell on him and he died.
"And his mum died when he was much younger. He said 'I don't remember my mum'."
Ms Morgan asked: "Did Mr Hassan ever say who he blamed for that?"
Mr Habibi replied: "America." He said it was American soldiers and American army bombing.
Another Barnardo's worker, Zoe Spencer, accompanied Hassan to an immigration interview at Lunar House in Croydon in January 2016.
Officials asked Hassan: "Have you previously or are you any part of a terrorist group, for example, Isis?"
He replied: "Yes, I was recruited by Isis for three months."
Asked how she felt about it, Ms Spencer said: "Disheartened, sickened, as if he did not understand the question, so I stopped the interview."
During a second interview, with an interpreter, Hassan added that he had been "forced" to go with IS, and denied he had been sent to Europe to work for them.
Miss Spencer said Hassan was "very nervous" afterwards and told her he was not OK, adding the man at the interview was "no good".
About a week later, Miss Spencer said she saw Hassan looking at a picture of people in balaclavas with guns and the black flag of Isis.
Hassan denies attempted murder and using the chemical compound TATP to cause an explosion that was likely to endanger life.