A would-be teen terrorist from east London "ruthlessly exploited' an impressionable young man in a plot to carry out a Fusilier Lee Rigby copycat killing, a court has heard.

Kazi Islam, 18, is accused of grooming 19-year-old Harry Thomas with a combination of "flattery and threats" to buy the ingredients for a pipe bomb and to attack one or more soldiers with a knife.

A series of exchanges on BlackBerry Messenger and social media sites were uncovered when police raided the house in Newham where Islam lived with his family, jurors were told.

Prosecutor Annabel Darlow QC said Islam had befriended Thomas in October 2013 by pretending to sympathise with him over a break-up with a girlfriend.

He went on to incite Thomas to kill a soldier with stories of innocent children being murdered by military forces and even suggested he start calling himself Haroon - rather than Harry.

In exchanges, he encouraged him to buy the component parts of an improvised explosive device - referring to it in code as "cake".

Ms Darlow said: "As the messages between Harry Thomas and the defendant expose all too clearly, Thomas was a vulnerable, not particularly bright young man who was desperate to impress Islam and to try and forge some sort of friendship with him.

"Islam ruthlessly exploited to the utmost Thomas' vulnerability and obvious wish to try and ingratiate himself with Islam.

"Firstly he took steps to prepare to make and detonate an explosive device - a home-made bomb. Rather than risk his own neck by going out and trying to assemble the necessary component for a bomb, he tried to exploit others - Thomas in particular to buy the components for a bomb.

"The defendant also researched bomb-making over the internet and on May 1 2014 downloaded a document entitled 'How to Make Semtex'.

"The second strand to the defendants' activities centred upon germinating a plot to attack a soldier. He repeatedly praised the actions of those who had murdered Fusilier Lee Rigby in Woolwich and actively encouraged Thomas to take the life of one or more soldiers."

In July 2014, Islam's home in Meanley Road, Newham, was raided by police who seized his computer and two mobile phones.

The prosecutor read out some of the messages between Islam and Thomas, who will not be giving evidence as a witness in the trial..

In November 2013, Islam asked Thomas: "Did u get the ingredients mate?"

Thomas replies that he got "some pipes" but during the course of the conversation it appeared that he got the wrong ones.

In December 13 2013, Thomas asked: "who're we gonna blow up" and Islam replied "no-one" adding "I'll tell you wen I see you (sic)".

Thomas's unsuccessful attempts to be subtle were exposed in a conversation on December 20 2013, when Islam asked: "So we need to work on this cake."

Thomas responds: "cake? U mean the b o m b."

Islam wrote: "yeah yeah"

Thomas replied: "So when we made the b what we gonna do with it."

Islam ordered: "Just get the ingredients."

Thomas wrote: "Will do all need to get now r the fireworks then we can make it waiting till I get payed so can get them and after we done the b r we gonna kll a soldier with a K I fe (sic)"

Islam replied: "kool mate".

He later tried to incite Thomas to kill a solider, telling him: "When I give you the order I want you to kill a soldier..2 soldiers..not yet though."

Islam is on trial at the Old Bailey for engaging in preparation of terrorist acts. He denies the charge.

In December 2013, Islam ordered Thomas not to talk to anyone after the older youth admitted he had "only told a few mates", the court heard.

The defendant allegedly instructed: "Don't tell anyone....just keep your mouth shut....The brothers are gonna come after me and kill me and they're gonna kill u as well."

That month, Islam asked Thomas if he would carry out an attack like the killing inWoolwich and asked him to "get a meat cleaver or a kitchen knife".

He repeatedly tried to get Thomas to buy hydrogen peroxide from a chemist for another type of explosive device, the jury was told.

Thomas told him he thought it was "perioxide" he had to get from B&Q, the prosecutor said.

The court heard how Islam searched Google for "firework black powder sales UK" and browsed YouTube for "how to make a firework bomb".

And he exchanged extremist views with others on social media sites, including Facebook, the jury was told.

Islam was formally arrested in August 2014 and later charged with a terrorist offence.

But Thomas was not arrested since a search of his home and examination of his electronic devices found nothing to incriminate him.

Ms Darlow told the court that officers had uncovered nothing to suggest that he had in fact gone on to buy any of the items Islam had asked him to get.

The trial continues.