A Scottish IT programmer turned Muslim convert screamed "Allahu Akbar" as he was jailed for posting a vile rant on Facebook the day after the Manchester Arena bombing.

Hamza Siddiq - born Andrew Calladine - took to social media while colleagues held a minute's silence to remember the 22 people killed in the terror attack on May 22, 2017.

The day after the atrocity, Siddiq posted on Facebook, blaming the UK for the attack and calling on Britain to release Muslim prisoners.

The post caused anger in the small Scottish town where he lived, and Siddiq, 37, was confronted in a local Tesco.

He fled to England where he was arrested by Nottinghamshire Police on May 26, 2017.

In the post, Siddiq wrote: “I do not think the attack in Manchester was the best choice of action to take but I refuse to apologise for it or pretend I don't know the cause.

“The blame for it lies at the feet of the politicians, their police and their armies.

“It was an inevitable consequence of British foreign and domestic policy towards Muslims.”

The court heard Siddiq was born into a Christian family but converted to Islam after reading Malcolm X and the Koran.

The father-of-three also posted support for IS and expressed glee at terrorist attacks including the Charlie Hebdo massacre which left 12 dead.

READ MORE: Aaron Campbell: Alesha MacPhail's teen killer named in court

He was charged with one count of encouraging terrorism and another of failing to disclose information to police, and pleaded guilty to both charges midway through a trial at Birmingham Crown Court.

When asked how he pleaded, Siddiq told the court: "I have committed no crime under Sharia, the only law acceptable to Allah.

"I believe and accept Sharia and do not accept man made law.

"However I accept that according to English and Welsh law I have committed this charge."

Judge Melbourne Inman QC said: “The prosecution has said that you have long been a supporter of terrorism.

"In June 2014 you were writing posts about a prescribed terrorist organisation IS - and about the establishment of the Caliphate.

"Thereafter in 2015 you had tweeted [a picture of] a t-shirt showing support for the attack on the Charlie Hebdo office.

"In 2017 you said after the Manchester Arena bombing that Manchester should be apologising and not the other way around.

"You have expressed you support for IS and expressed support for them around the world.

"You have sent letters to convicted terrorists and said they have been an inspiration to you.

"You have asked people to pray for a man who travelled to the Philippines for Jihad.

"Against that background is your message of August 16 last year - they are clearly supportive of terrorist activities that seek to impose an interpretation of Islam on others.

READ MORE: Damon Kelly: Self-appointed 'monk' bombarded priest with anti-LGBT hate mail

"It is clear, because of your association and inference you are sufficiently deeply involved that you know who shares such beliefs, who are themselves deeply involved in terrorist activities.

"You made it clear that you reject the laws of this country and you consider that you live outside the law - given you support for terrorism that makes you a very dangerous individual.

"You clearly believe that you are above the law.

“Your cellphone was the only way the police would have been able to find the posting, in the end they found it by going through Facebook.

"It relates to national security and is therefore very serious.”

The court heard that Siddiq had been on the radar of the security services since 2014 after he made a series of alarming social media posts.

Prosecutor Simon Davis said: "When he was interviewed he claimed that the only valid form of Government was Sharia and he rejected man made law - he was in support of armed struggle.

"The defendant was on the police radar in 2014 about the nature of his posts and after the Charlie Hebdo terrorist attack in 2015.

“He was back on their radar in May 2017 after the Manchester Arena bombing.

"He'd declared that everyone who resists the prophet should be killed.

"On May 25 he had 1,293 followers on Facebook, this had risen to 1,439.

“The messages he posted were not just about the religion of Islam but it was to get across the complete and perfect message of Islam and that it would one day dominate the world.

"The violent struggle of Islam was referenced in the Jihadi content. He declared support for the Caliphate.

"In 2016, in the company he worked for, there had been a request for two minutes silence but on social media he said ‘my respect is for the Mujahedin who fight the enemies of Islam.’

"In 2017, after the Manchester Arena bombing he also demanded an apology from the people of Manchester for acts of terrorism by the Government.

"It is here that indicates the issue of intention. These are anti-democratic.

"It was at his company where there was another minute’s silence requested where he made the Facebook post in 2017 after the Manchester bombing.

"Other posts include him saying Allah has shown the Martyr his place in paradise - he'll be married to 72 maidens of paradise and permitted to intercede for 70 members of his family.

"There is references to the violent struggle and the global fight against the crusader.

"There are others that reference the Koran as the perfect word of God and that anyone who doubts a single verse is an unbeliever.

"The language the sense and the tenor are the same and indicates the issue of intention.

"He has also been in communication with known terrorists and formed a close association with them.

"The defendant is an IT software programmer and his IT skills signal his culpability.

"On his public order offence in 2016 [Old Market Square Nottingham] on March 4 - he shouted ‘Allahu Akbar’ and threw a ration box at soldiers."

Alex Rose, defending, said: "He has a strong religious belief and there are many varied interpretations of Islam.

“He has an orthodox belief, it does not mean he is politically minded.”

Siddiq pleaded guilty to both charges and was jailed for four-and-a-half years at Birmingham Crown Court on Friday. He will also be monitored for ten years after release.

Detective Inspector Jon Scurr, of Nottinghamshire Police’s Special Branch, said: "Let’s put this case into context. The Facebook post made by Hamza Siddiq was published just months after many people, young and old, lost their lives in UK terror attacks in both London and Manchester.

"The statement was inflammatory and inciting. It was certainly a statement that could have been interpreted by some as an encouragement to plan and carry out violent acts of terrorism.

"The fact that Siddiq’s potentially harmful rhetoric was liked numerous times is an exacerbating factor, with his extreme viewpoint seen by and possibly influencing countless people.”

Read more of today's top Glasgow stories.