Prosecutor Duncan Atkinson QC said Safaa Boular, who lived with her mother in Vauxhall, London , wanted to “unleash violence and terror in the heart of London”.

But Joel Bennathan QC, representing Ms Boular, said the teenager had been “sexually groomed” and “groomed to be radicalised” online by IS fighter Naweed Hussain.

He said her family had “encouraged” and “celebrated” it.

Mr Atkinson said she declared her love for Hussain in August 2016 after three months of chatting on social media.

The prosecutor told jurors she wanted to join Hussain in Syria where they would wear suicide belts and, in Hussain’s words, “depart the world holding hands and taking others with them”.

The court heard Rizlaine Boular had also tried to go to Syria two years before.

‘Cultural jewel’

After Safaa Boular’s plan was uncovered, she allegedly switched her attention to Britain, contacting Hussain by phone through encrypted Telegram chat.

But British security services had deployed officers to engage in online communication with the pair, jurors heard.

Mr Atkinson said: “It was clear that Hussain had been planning an act of terrorism with Safaa Boular in which she could engage if she remained in this country. Both Hussain and Safaa Boular talked of a planned ambush involving grenades and or firearms.”

She also told an officer posing as an IS fighter that all she needed was a “car and a knife to get what I want to achieve”, the court heard.

Mr Atkinson said: “Based on her preparation and discussion, it appears she planned to launch an attack against members of the public selected largely at random in the environs of that cultural jewel and most popular of tourist attractions, the British Museum in central London.”

‘Chilling intentions’

An attack would have created at least “widespread panic” and was intended to cause injury and death, it was claimed.

When she learned Hussain had been killed in April 2017, Ms Boular’s determination was strengthened, the court heard.

But within days, she was charged with planning to go to Syria so was unable to carry out her “chilling intentions”, the prosecutor said.

He said: “That those intentions were not just chilling but sincere and determined is demonstrated by the fact that she did not abandon them even when she was unable to put them into effect herself.

‘Carry torch forward’

“Rather, she sought to encourage her sister Rizlaine to carry the torch forward in her stead.”

In calls to her sister from jail, Safaa Boular referenced an Alice in Wonderland-themed tea party which was code for an attack, the court heard.