The Iraqi teenager on trial over the Parsons Green bomb said it was his "duty to hate Britain" and that he blamed the US for his parents' deaths, a court has heard.
Ahmed Hassan is charged with attempted murder for allegedly planting a bomb on a District Line tube train, which injured 30 people when it partially exploded in September last year.
The Old Bailey was told Hassan had raised alarm bells at college.
After arriving in the UK in 2015, Hassan attended Brooklands College in Weybridge, Surrey, and moved in with a foster family in Sunbury.
Jurors were told his teacher and mentor Katie Cable became concerned about his behaviour despite him being named student of the year in June last year.
She told the court she alerted Prevent after she saw a WhatsApp message on the 18-year-old's phone in August 2016, saying: "IS (Islamic State) has accepted your donation."
Ms Cable said Hassan blamed America for the deaths of his parents in Iraq and said: "It's my duty to hate Britain."
She said he was "incredibly conflicted, frightened, confused, plagued by boredom" and added that he would snap pens and walk out of the classroom when he first started school in April 2016.
"I believe Ahmed said his father was blown up and his mother had been shot," Ms Cable said.
She said he talked about Tony Blair and expressed his "anger" at the situation in Iraq.
"I believe the anger was very clear," she said. "He referred to being angry several times."
The court heard he told her "the British" were responsible for his parents' deaths.
Ms Cable said that by September 2017, she had become "really concerned about his mental state".
The day before the bombing, she said Hassan came to see her with presents for her children, which she says she found "strange".
Under cross-examination, Ms Cable said she had believed Hassan was not a supporter of IS. When asked by Tim Moloney QC if it appeared that "he desperately wanted to stay in this country", she said that "it seemed so".
Barnardo's workers also gave evidence to the court on Monday.
Youseff Habibi, from the charity, who met Hassan when he was living in a children's home in Surrey, told jurors the defendant told him his father was a taxi driver who had gone to work one morning when "a bomb fell on him and he died".
He said Hassan's mother had died when he was much younger and that he blamed America for her death, too.
The court heard how another Barnardo's worker, Zoe Spencer, had accompanied Hassan to an immigration interview in January 2016.
She said when he was asked if he had been involved with terrorist groups such as IS, he said: "Yes, I was recruited by ISIS for three months."
Ms Spencer said she stopped the interview as she felt Hassan did not understand the question. During a second interview with an interpreter, Hassan said he was "forced" to go with IS and denied being sent to Europe to work for them.
She also told the court she saw the teenager looking at a picture of people in balaclavas with guns and the black IS flag about a week later.
More from UK
Hassan denies attempted murder and using the chemical compound TATP to cause an explosion that was likely to endanger life.
The trial continues.