LONDON — A British teenager arrested in London carrying a knife, a hammer and a black Islamist flag and inspired by the killing of a soldier was on Thursday found guilty of plotting an attack.

Brusthom Ziamani, 19, was detained in August 2014.

The jury at London’s central criminal court convicted him of “preparing an act of terrorism” and he now faces years in jail when sentenced on March 20.

Get The Times of Israel's Daily Edition by email and never miss our top stories Free Sign Up

The court was told that he had been inspired by the brutal murder of British soldier Lee Rigby on a south London street in 2013.

Ziamani became radicalized by members of extremist organization al-Muhajiroun (ALM), attending their meetings in a halal sweet shop in east London.

During the meetings, Ziamani produced his black flag and said: “I’m going to rock it everywhere I go” and wrote online that he was “willing to die in the cause of Allah.”

Police said they were alerted to his intentions after he showed his weapons to his ex-girlfriend.

He had previously been arrested in June 2014 on an unrelated matter, and police found a ripped-up letter in his trousers in which he wrote about attacking a British soldier.

Ziamani claimed he was only “ranting and raging about the situation in Muslim countries” and that his postings were an attempt to “fit in” with the ALM group.

He said he was carrying the weapons as protection after getting out of a credit card theft operation.