A man who sent former health secretary Shona Robison threatening emails and social media messages has been ordered to be returned to a psychiatric clinic.
Ala Elbilbaisi, 35, called for Ms Robison to be "terminated" in the posts.
He also described her as an "abuser" and attempted to meet her in person.
Elbilaisi, a Palestinian businessman from Glasgow, was found guilty of stalking the Dundee East MSP earlier this year.
The father-of-one was also banned from contacting Ms Robison or anyone connected with her when he appeared for a mental health assessment at Dundee Sheriff Court.
Elbilaisi was brought back to court in handcuffs from the medium-security Rowanbank mental health clinic in Glasgow where he had been undergoing an assessment.
Special bail condition
Sheriff Lorna Drummond QC said he had a psychiatric background and was already the subject of an order under the Mental Health Act.
She told him: "I've finally got a psychiatric report and it indicates you are suffering from a mental disorder and you do need treatment.
"There is a compulsion order and you're going to need to be taken back to the Rowanbank Clinic to be treated."
She imposed a special bail condition banning Elbilbaisi from contacting Ms Robison, "or her offices, or anyone connected with her" and deferred sentence until February to allow his treatment to proceed.
She added: "You must understand if you breach this condition, that's a separate offence."
The court heard that Elbilbaisi had made a series of "bizarre" posts on Facebook about the 53-year-old MSP.
One said, "This is who truly Shona Robison is, an abuser, and must be terminated at the earliest possible point."
The post on 18 February was followed by another seven days later, which read: "That's what the SNP gang is using to rape civilians."
Earlier, on 10 January, Elbilbaisi had emailed Ms Robison and accused her of pursuing him.
That email led to him being made the subject of a Mental Health Act compulsion order in July.