An extremist has been jailed for two years for posting an Islamic State propaganda video on Facebook, despite claims he would find prison “a living nightmare”.

Abdul Hamid, 31, who suffers from obsessive compulsive disorder, admitted posting the unedited four-minute video entitled No Respite, glorifying the terror group and its fighters.

The Old Bailey heard that he had seen a short clip of the video in an online news report and believed it was not illegal to share it on social media at the time.

But he later accepted that he had been “reckless” when he posted it in its entirety on Facebook, leading to it being viewed 465 times, “liked” 20 times and “shared” 34 times.

At a hearing last month he pleaded guilty to the charge of disseminating a terror publication on December 13 last year.

Prosecutor Alistair Richardson said his other extremist material included home-made videos showing the defendant making a “single finger salute” commonly associated with IS supporters.

Hamid, of Harts Lane, Barking, east London, also wrote a number of other Facebook entries which exposed his extremist views, the prosecutor said.

He posted a photograph of convicted hate preacher Anjem Choudary, commenting: “Be a real Muslim, be like Anjem.”

In another post in February labelled “women know your place and position”, he warned: “No people will ever succeed who appoint a woman as their leader.”

He also repeatedly attacked “moderate Muslims”, labelling them “pure sell-outs and traitors” who should be murdered “like roaches - smoked out, exterminated and incinerated”.

In November last year he also wrote: “The White Kuffar and Kufirah are the most evil and corrupted creatures that have ever existed on the face of the earth. Tell me something evil they have not been behind?

“You cannot think of anything, can you? I say they are behind 98 per cent, if not all, major evils. The legitimisation of all the vice filth unimaginable under the heavens.”

Alluding to Hamid’s mental conditions, defence barrister Naeem Mian said: “It will be a living nightmare, my lord, a living nightmare.

“If it could be said of anybody, he needs to get out more, it’s Mr Hamid.”

But Judge Peter Rook QC rejected his plea for a suspended sentence and said there needed to be a deterrent.

He said the IS video, produced and edited to a “very high standard” by the media centre responsible for the terrorist organisation’s publications, had glorified its fighters and “goads” the military forces.

The judge highlighted the defendant’s “extensive library of extremist material” which was uncovered by police following his arrest in February.

While acknowledging Bangladesh-born Hamid had said he had learned his lesson, the judge said: “There must be a significant element of deterrent and in my view an immediate custodial sentence is inevitable.”