A man posted comments on Facebook in support of the IRA and called for police to be executed.

Glasgow High Court heard Andrew Kinnon, 38, uploaded images of masked gunmen and wrote: "Execute all police service of Northern Ireland / Royal Ulster Constabulary personnel."

He also supported the proscribed terrorist organisation by posting "free the prisoners of war" and "Brit scum out".

A total of 47 images showing Kinnon's support for the IRA, Real IRA, Continuity IRA and Provisional IRA were found.

Information was passed to police who searched Kinnon's flat in Knightswood, Glasgow, in January 2016, when he admitted: "I knew that would bring it on top for me one day."

At Glasgow Sheriff Court, Kinnon, of Kirkton Avenue, Knightswood, pleaded guilty to committing an offence under the Terrorism Act 2006 between January 2014 and January 2016.

He admitted publishing statements "urging acts of violence", intending encouragement for terrorism or being reckless as to whether his actions would lead to terrorism.

Kinnon also pleaded guilty to being in possession of cannabis worth around £1500.

The court heard police received information in May 2015 that Kinnon's Facebook account had a picture with a threat to police in Northern Ireland and the British Army.

Procurator fiscal depute Elizabeth Aitken said: "An image posted on March 15, 2015, depicted a masked individual wearing a balaclava and combat jacket pointing a scoped firearm out of a window/door.

"Over this image were the phrases 'Brits out now, execute all police service of Northern Ireland/Royal Ulster constabulary personnel, 'free the prisoners of war, UTR TAL32 81/32/4'.

"Along the bottom of the image was the message 'sniper at work...Brit Army beware'."

The post was liked by 56 people, with two people replying "Up the RA" and "Takes time - but it can be done".

Ms Aitken added more images were found that demonstrated Kinnon's support of the IRA and dissident republican cause.

Another image from November 2014 was of a gunman in a balaclava and combat jacket with the words "never surrender, our day will come IRA" and was liked by 55 people.

The court was told: "Whilst making enquiries it was recognised that on the majority of his postings, Kinnon used the phrase 'ANDYTAL32GB'.

"During interview the accused defined this statement as being his name followed by TAL32 which means Tiocfaidh ar La, 32 being significant to a political movement and gb meaning God bless.

"The images from March 2015 and November 2014 along with other images on the account clearly shows professed membership and support for a proscribed organsation."

Tiocfaidh ar La is an Irish phrase which translates as "our day will come".

It was said that while some of the images between October and November 2014 are not criminal, they demonstrated Kinnon's ideology.

His conduct escalated from posting republican-themed murals to direct threats.

On November 30, 2015, Kinnon posted a masked gunman in military-style jacket with phrases including "End internment, by remand, from the British Crown. Brit scum out. F**k the talks. No justice no peace."

It continued: "Our aim is to force British withdrawal from Ireland and establish a democratic socialist republic based on the Easter proclamation."

A search warrant was granted in January 2016 and Kinnon's house was searched.

While reading the warrant to him, Kinnon told officers "Oh whit man, I knew that would bring it on top for me one day, I understand why you're here."

Along with laptop and internet router, police found a box with the words: "Stay out. Real Irish Republican Army OK God Bless the Pope".

After interview he made no reply to the terrorism charge and said "I want my lawyer" in response to being charged with possessing cannabis.

Sheriff Andrew Cubie deferred sentence until next month and continued Kinnon's bail.