A security guard has been jailed for five years for sending a stream of tweets glorifying Islamic State after his attempts to go to Syria were thwarted.

Mohammed Moshin Ameen, 23, admitted posting material on the micro-blogging site over eight months including a link to an English language IS propaganda video specifically targeting young British men.

The court heard that between March and October last year, he used 42 different Twitter profiles to send 8,000 messages, of which 250 were found to be extreme.

He became radicalised after falling in with well-known radical figures within the community, including some who went on to be convicted of terror offences, the court heard.

And he exchanged views on Islamic ideology with Sydney teenage terrorist Farhad Jabar, discussing their shared desire to travel to IS territory.

Ameen first came to the attention of authorities in December 2013 when it was believed he might try to go to IS-held territory.

When police raided an address in London, they found Ameen with a one-way ticket from Luton to Istanbul for the same day as well as a letter to provide "cover".

Thanks to the intervention of counter-terrorism officers, he was stopped from going, prosecutor Christopher Amis said.

In June 2014, officers from the Prevent unit went to his home in Dagenham, east London, to talk to him about his apparent desire to travel to IS-held territory.

In the autumn of that year, they went back and discovered Ameen had half packed a bag for "immediate departure" - to the shock of the defendant's father.

Ameen told police he was planning to travel to the Syrian border with an aid convoy of ambulances that evening and was going to fly back - even though he did not have a ticket booked.

When officers returned on March 18 last year, Ameen's father said his son had abandoned his ambitions to travel to Syria, Mr Amis said.

Mr Amis said Ameen's activities on Twitter "amount to a sustained effort indirectly to encourage others to engage in terrorism".

He carried on his "prolific support for IS" with "dogged persistence" in the full knowledge of what he was doing, the prosecutor said.

In one tweet he wrote: "The ISIS fighter who chose to drive a truck filled with tons of explosives instead of his Rolls-Royce".

He also posted a picture of masked Jihadi John - aka Mohammed Emwazi - holding out a knife.

He portrayed terrorists as "role models" referring to the "magnificent 19" from the September 11 suicide bombings.

He posted a link to an unusual English language IS propaganda video set to seductive musical chanting.

The "sophisticated" production played in court was one of the first such examples specifically aimed at recruiting young British men.

The video glorified fighters showing them in action interspersed with bloody images of dead jihadis.

Ameen also tweeted cropped selfies posing with a large knife, the court heard. He had searched the internet for updates on Islamic State and news about terror-related cases.

In June, police seized Ameen's phone but the defendant refused to hand over the Pin number.

Then on October 21, more searches were made at another address in Dagenham where Ameen was found to be sleeping on the floor beside two more mobile phones.

On arrest, he again refused to hand over Pin details, saying "I'm not signing anything, mate" and made no comment in police interviews.

The court heard that Ameen had lived at the family home in Steven Road and at the time of his arrest was working as a night shift security guard. He had no previous convictions.

At a hearing at the Old Bailey in March, Ameen pleaded guilty to five counts of encouraging the commission, preparation or instigation of acts of terrorism on Twitter.

He admitted a further charge of inviting support for Islamic State, as a proscribed organisation, between October 4 and 6 2015.

He also pleaded guilty to disseminating a terrorist publication relating to a link to a video entitled For The Sake Of Allah posted on Twitter in September last year.

In mitigation, Tim Moloney QC said his client was of "below average intelligence" and vulnerable to radicalisation by the more sophisticated individuals within the community with whom he had been in contact.

The barrister said: "He does want to put that behaviour behind him. He is genuinely sorry for what he has done."

Jailing him, Common Serjeant of London Richard Marks QC said: "You had a not insignificant following on your accounts, and at the time this case is concerned, you were thoroughly radicalised."

Commander Dean Haydon, of SO15, said: "The harm of spreading of hate and encouraging others to commit offences cannot be underestimated.

"My officers sifted through over four million terabytes of data and collected extensive evidence to build their case and prove that Ameen was behind the thousands of pro-Daesh tweets.

"I urge anyone who is aware of tweets, videos, pictures or any other material they are concerned may be terrorist propaganda to report it, this can be done anonymously."