A judge has sentenced a British teenager to 22 years in prison for plotting to behead a British soldier.

Judge Timothy Pontius says he has no doubt that Brusthom Ziamani, 19, would have carried out the attack had he not been stopped by police in east London. He had researched the location of army cadet bases and was carrying a 12 inch knife and a hammer.

Hours before being stopped, he had told his former girlfriend he would "kill soldiers" and described Michael Adebolajo, the killer of Fusilier Lee Rigby, as a "legend."

A jury at London's Central Criminal Court convicted the London-born teenager of preparing an act of terrorism.

Raised by Jehovah's Witness parents, Ziamani converted to Islam early in 2014 and became influenced by the radical group al-Muhajiroun.