A prison officer sparked chaos at a jail by waving a Union flag in front of inmates.
Stuart Richardson held the flag aloft on a pole days after he also had it tied around his neck at HMP Low Moss in Bishopbriggs.
One colleague describe raging prisoners being "very angry" amid fears Richardson could have caused a fight.
The 33 year-old pleaded guilty at Glasgow Sheriff Court this week to acting in a threatening and abusive manner between June 29 and July 1 2022.
The claims that he had made sectarian remarks and that the offence was aggravated by religious prejudice were deleted by prosecutors.
Richardson's lawyer stated that the now ex-guard had been "absolutely stupid" and his lost his job of three years as a result.
Richardson, of Bearsden, will be sentenced in the New Year.
He had originally gone on trial before his guilty plea was accepted.
Former prison worker Vincent Stewart gave evidence.
He first recalled a day that he could hear inmates "having a laugh" at the jail's waste management area.
Mr Stewart said: "I saw Stuart coming through the door with the Union flag tied around his neck carrying on with the other boys."
Fiscal Leo McGinn asked if anything was said at the time.
Mr Stewart replied: "There was a bit of carry on with the other boys.
"Someone said 'Get the flag out, the prisoners are coming down' and Stuart replied 'it's my flag, it's my country'."
CCTV was also shown to the court where Richardson was seen to fly the flag from a pole.
The hearing was told that Richardson was again seen with the Union flag days later.
Mr Stewart said: "I was sitting in the office - you can see the prisoners day area.
"I saw a commotion going on and I could see Stuart coming through the back door with a Union flag on a pole.
"He made his way through to the day area and prisoners were all reacting to it.
"Stuart left through the back door and a few prisoners came into the office."
Mr McGinn asked: "Could you see him doing anything with the flag?"
Mr Stewart said: "He was waving it above his shoulders."
Mr McGinn asked: "Could you hear any reaction from the prisoners?|
The witness said: "Yes, very angry, they were shouting - some tried to jump off tables in the day area to get to the door.
"I thought s***, something serious has happened - I was looking to see if there had been a fight in the day area."
After the plea was accepted, Judith Hutchison, defending, told the court: "He always accepted his behaviour that day.
"He was a prison officer and had been for about three years - he accepts the position in respect of the flag."
Sentence was deferred pending background reports until February by Sheriff Andrew Cubie.
Richardson was bailed meantime.
The sheriff said: "You pled guilty and you will be given credit for that. I want more background before giving the appropriate penalty.
"I take account that this conduct has resulted in the loss of your job."
Why are you making commenting on The National only available to subscribers?
We know there are thousands of National readers who want to debate, argue and go back and forth in the comments section of our stories. We’ve got the most informed readers in Scotland, asking each other the big questions about the future of our country.
Unfortunately, though, these important debates are being spoiled by a vocal minority of trolls who aren’t really interested in the issues, try to derail the conversations, register under fake names, and post vile abuse.
So that’s why we’ve decided to make the ability to comment only available to our paying subscribers. That way, all the trolls who post abuse on our website will have to pay if they want to join the debate – and risk a permanent ban from the account that they subscribe with.
The conversation will go back to what it should be about – people who care passionately about the issues, but disagree constructively on what we should do about them. Let’s get that debate started!
Callum Baird, Editor of The National
Comments: Our rules
We want our comments to be a lively and valuable part of our community - a place where readers can debate and engage with the most important local issues. The ability to comment on our stories is a privilege, not a right, however, and that privilege may be withdrawn if it is abused or misused.
Please report any comments that break our rules.
Read the rules hereComments are closed on this article