The Old Bailey has heard how a 19-year-old Muslim convert who threatened to copy the murder of Fusilier Lee Rigby was in possession of a 12-inch knife, hammer and Islamic flag when he was stopped in an east London street.

Brusthom Ziamani, a former Christian whose family came from Africa like one of Rigby's killers Michael Adebolajo, used the Islamic name Mujahid Karim. He only converted to the religion in 2014 and was first arrested on 20 June 2014. Police found he had been researching the Lee Rigby murder and looking for the locations of army barracks around the capital.

They also found a letter addressed to his parents in which Ziamani wrote: "You people will never be safe Brits and americans Russian thousands upon thousands ov muslims due daily.

"Now we will take a thousand ov yours then tens thousands and send you all to hell-fire. You want war you got it British soldiers heads will be removed and burend (sic) u cannot defeat the muslims we love to die the way you love to live.

Michael Adebolajo and Michael Adebowale were found guilty
Michael Adebolajo and Michael Adebowale were found guilty of the muder of fusilier Lee Rigby in Woolwich Reuters

"My fellow muslim brothers these people want war lets kill them slaughter them and implement sharia in our lands and UK.

"Kill every gay, every Shia, every les."

He added: "Lee Rigby is burning in hell woow im dying good for him this is what you get for voting Cameron and democracy."

Ziamani, from Camberwell, was released on bail but continued looking at Islamist propaganda and researching the location of barracks, the court heard. In August he turned up at his ex-girlfriend's house. Their relationship had ended when he began wearing Islamic clothing. In court she said he had shown her weapons.

"I asked why he had these," she told the court, "and he said 'me and the brothers are planning a terrorist attack'. I said what, like a bomb or something and he said 'no, a soldier or a member of government.

"He said things like when the Lee Rigby murder happened, he respected the people that had done it," she added. When she ended their relationship he threatened to "wipe her out." Under cross-examination by defence barrister Naeem Mian, the woman - who cannot be named for legal reasons - admitted Ziamani was prone to fantasies.

Ziamani was picked up a short time later. Prosecutor Annabel Darlow told the Old Bailey: "He didn't say anything when he was arrested but he was remanded and told a security officer that he had been on his way to kill a British soldier at an Army barracks when he had been arrested.

"He said that he was going to behead the soldier and hold that soldier's head up in the air so that a friend could take a photograph. You may think that his aim was to emulate the dubious feats of his hero Michael Adebolajo, who had murdered a British soldier close to the Woolwich barracks where he worked."

The trial continues.