When Belfast-born Islam, formerly known as Mark Townley, confessed to police he had “advanced plans” to kill the Prince hedescribed Drummer Rigby as a “soft target” and said he didn’t agree with the attack on the serviceman.

He eventually revealed he intended to kill Prince Harry because he “had blood on his hands”.

A document found on Islam’s computer said: “Aim for target. No civilians to be injured.

"Dress code is the the biker look. Use low-calibre pistol at close range. Not to be viewed as Islamist extremist.”

judge McGregor-Johnson said during today's brief hearing: "This was not a threat made in isolation.

"The examination of your computer revealed you conducted research on his (Prince Harry's) whereabouts and intentions.

"You had given the matter considerable thought."

He added: "The reason behind that is that you thought he and other serving officers had some moral guilt, and you thought you had a moral right to judge.

"I accept that there is nothing here that could be described as professional plans as to your expressed intentions.

"Your plan was vague and unlikely to succeed."

But the judge said police would have intervened had Islam, who has previous convictions for dishonesty and for involvement in an attempted robbery, attempted to carry out his plan.

The judge said he considered a longer sentence, but said it would have been deemed "excessive".

"I would have wished to consider an extended sentence," he said. "But the authorities are clear, even if a court finds that the person does represent a danger to the public, that doesn't justify a longer sentence."