Sheriff Richard Davidson’s comments, directed at Tina Monem, have come under fire from race campaigners, who are demanding an investigation.
The sheriff, who has found himself at the centre of controversy over previous comments, told Ms Monem, 26, whose father is from Bangladesh, that if she did not accept his ruling, she could "go to Zimbabwe".
She had repeatedly refused to comply with a court decision allowing her former partner to have access to his child with an adult relative present.
In court papers Sheriff Davidson stressed the importance of upholding "the rule of law".
"If you want an illustration of what happens when the rule of law is undermined by government, you need look no further than what is currently going on in Zimbabwe, where the president, who is scarcely still entitled to be so described, has by brute force and threats of violence completely undermined the democratic process," he wrote.
"You may find the analogy with Robert Mugabe to be distressing and uncomfortable, but if I let you away with continuing to defy the order of the court, then someone else will defy the order of the court citing you as a precedent and, before long, we will have anarchy."
He went on: "If you want to live subject to an anarchic dictatorship, then you can go to Zimbabwe. I will not allow anarchy to rule here."
Ms Monem claims she was acting in the best interests of her child after previous visits to her father had left the girl distressed. She said she wanted access to take place in a contact centre with staff present.
Ms Monem, from Carnoustie, Angus, told The Scotsman she was "deeply humiliated" by the Dundee-based sheriff’s remarks. "I feel horribly upset at being prejudiced against and about being compared to Robert Mugabe. I’m not going out killing people like Mugabe, yet the sheriff thought it perfectly all right to have both our names in the same sentence.
"I was bullied at school because of being mixed race. My mother even made me wear more clothes to stop me going any darker."
Ms Monem, a deputy scheme manager at Bield Housing Association in Dundee, added: "I’ve studied and gone to college and I’ve got a job, but comments like that bring back all the bad memories."
Sheriff Davidson’s remarks have ignited a debate over the extent to which members of Scotland’s judiciary should be held to account for their comments.
The principle of independence within the judiciary means sheriffs and judges are protected from political influence and remain generally free from censure by ministers.
Instead, misconduct matters are usually less formally dealt with by the sheriff principal, with more serious complaints being passed to the Lord President.
The system has led to accusations that sheriffs are "above the law" and largely untouchable – a view reinforced by the fact that only two sheriffs have ever been forced from their posts.
Last year, MSPs approved a more formal tribunal system for disciplining sheriffs and justices – but the legislation is not expected to be enacted until 2010 at the earliest.
Concern has been compounded by the news this weekend that a Scottish judge locked up an alleged rape victim who had tried to flee from a court after breaking down while giving evidence.
Roger Craik, a sheriff acting as a temporary judge, ordered the woman be arrested and detained overnight after she tried to leave the High Court in Edinburgh while under cross examination.
Last night, Robina Qureshi, director of Positive Action in Housing, said: "Sheriff Davidson seems to be taking liberties with the powers invested in him and should be investigated.
"His comments in a case concerning child contact should have been confined to the question of child contact.
"With power comes responsibility and from the comments quoted to me, Sheriff Davidson seems to be in danger of behaving like the very dictator he criticised."
John Scott, a leading human rights lawyer, said the case highlighted the need to have closer scrutiny of Scotland’s judiciary. "The vast majority of sheriffs on most occasions behave entirely appropriately and don’t say anything stupid," he said.
"There is a serious responsibility on them, given their position and their unusual degree of job security.
We shouldn’t have a situation where people simply have to put up with any behaviour a judge or sheriff feels they want to engage in."
Mr Scott said there had been a perception among members of the judiciary that they were "untouchable". He went on: "There is more judicial training now, but if somebody wants to make a name for themselves or has prejudiced views, it is easy enough for them to become a sheriff. We need to do something about that."
He said it should be made easier to remove a sheriff from office "as a last resort".
Responding directly to Sheriff Davidson’s remarks, he said: "This was an exceptionally stupid thing for the sheriff to do. Very few people deserve to be compared to Robert Mugabe, except perhaps someone like Stalin.
"Hundreds of people go through the courts who are more flagrantly defying court rulings than this woman and none of them deserve this comparison either.
"I would also stress that where there has been a racially aggravated crime, the perception of the victim is a vital consideration. This seems to have been disregarded in this case."
Sheriff Davidson, 58, a former solicitor who was appointed to the Dundee bench in 1993, has hit the headlines on a number of occasions. His most recent gaffe was last November he was criticised by Justice for Victims for sentencing John Barrie Hendry, a serial shoplifter to three months instead of four as a "special award" to mark his 50th conviction.
Bill Aitken, the Scottish Tories’ justice spokesman, said: "People do have to follow the orders of the court and Sheriff Davidson may well have had a point.
"He does, however, have a rare line in hyperbole, which I do not think was appropriate in this case. A wise judge says very little and I think he could have got his point across in a more measured manner."
Members of the local legal fraternity said there was a certain amount of "unease" over the sheriff’s outspoken comments and sentencing.
One solicitor, who did not want to be named, said: "He is a modern sheriff who is aware of the impact his words will have. But courting the media is a double-edged sword and you have to take the consequences when you overstep the mark. The problem is that his words reflect on all of us and bring into disrepute the decorum of the court."
Another solicitor said: "He has two sides to his character. He is no fool, and you have to put up a decent argument in court. Some of us are unhappy at his decisions – he is definitely on the harsher side of sentencing and he is always very tough on people in the civil courts who do not follow the court’s orders.
"But despite being basically down-to-earth, he is also a flamboyant character and can’t seem to stop bursting into colour every so often."
Ms Monem wrote to the Lord Advocate last month complaining about the sheriff’s remarks, which were drafted last April but have only now come to light. However, the reply from the Scottish Government’s legal system division said it did not regard the remarks about Mr Mugabe as being an expression of racial discrimination.
The letter added that the Sheriff Principal of Tayside, Central and Fife would be made aware of the matter.
Removal from office will be more transparent under new rules
UNDER the Sheriff Courts (Scotland) Act 1971, a sheriff can be removed from office if found to be "unfit … by reason of inability, neglect of duty or misbehaviour".
However, current disciplinary procedures for less serious behaviour are the responsibility of the sheriff principal.
The Lord President of the Court of Session and the Lord Justice Clerk may, of their own accord or on behalf of the minister, undertake jointly an investigation into the fitness for office of any member of the judiciary. They may report in writing to the First Minister, either that they are:
A, fit for office, or
B, unfit for office.
They shall in either case include in their report a statement of their reasons for so reporting. But concerns have been raised over a number of issues of "transparency", including the fact that there was a lack of formal recording of complaints about sheriffs.
The Judiciary and Courts (Scotland) Act 2008 intends to address such matters. The legislation creates a more formal disciplinary procedure in a bid to make the judiciary more transparent.
It includes powers to create a Judicial Complaints Reviewer, who would oversee the investigations process, and a tribunal to investigate whether a sheriff or judge is unfit to hold the office. No judge has ever been removed from office in Scotland. Only two sheriffs have been forced from their post.
Ewan Stewart served as a sheriff at Wick for 30 years until 1992, when he was removed "by reason of inability". Peter Thompson was disciplined after campaigning for a vote on home rule in the 1970s.