A High Court judge has been lambasted for making “wholly inappropriate” comments during a rape trial.

Senior judges have criticised their colleague Judge Norman Ritchie QC over the way he quizzed a complainer in the case, as well as for comments claiming the woman’s previous statements “blew her evidence out of the water”.

The judge was also attacked for failing to intervene when defence counsel carried out “lengthy, unjustified and sometimes insulting cross-examination”, including questions about the complainer “taking up with another man” weeks after the attack.

Rape Crisis Scotland said the handling of the case was “shocking” and claimed it was a prime example of “why women are scared to report rape”.

Read moreSNP attacked as prosecutions and convictions fall despite rising crime

Philip Donegan, from Knightswood, Glasgow, was convicted of two counts of rape and jailed for eight years at the end of the original trial.

The criticism of the judge, as well as defence advocate Joseph Barr, came in an appeal judgment in which Donegan, a former Territorial Army officer, tried unsuccessfully to have his conviction quashed.

In the judgment, the Lord Justice Clerk, Lady Dorrian, Scotland's second highest judge, said: "It was clear from the transcripts of the evidence at trial that the complainer, who was in the witness box for three days, was subjected to a lengthy, unjustified and sometimes insulting cross-examination on issues which included her delay in reporting the offence, the reasons for that, her varying accounts as to what occurred and her failure to shout out or seek help from others during the attack."

Lady Dorrian described the questioning from Mr Barr as "derogatory and insulting", adding that she was surprised that there was no objection from the Crown.

She also stated: "Moreover, rather than being tempered by the bench, the experience for the witness was merely prolonged further by the inquisitorial nature of the trial judge’s own questioning, which in some instances took the form of cross examination in itself."

Judge Ritchie put it to the witness that she could have called the police or left the house to get help, asking her if she considered or did any of these things. The appeal judges considered that this overstepped the mark.

On the comment about previous statements "blowing [the complainer's] evidence out of the water", Lady Dorrian said: "We have had the recording checked, and this was indeed said by the trial judge.

"While the comments were made outwith the jury’s presence, they were made in open court and in the presence of the accused.

"In our view it is quite clear that these should not have been made at all, and were wholly inappropriate."

Read moreRape convictions in Scotland at lowest level in almost a decade

Rape Crisis Scotland called for more action to be taken to protect rape complainers in court.

Chief executive Sandy Brindley said: "No one, and certainly not someone who has already been through a traumatic experience, should be subject to harassing or insulting questioning in court.

"It is precisely because of fear of being treated this way that many women do not feel able to report what has happened to them to the police.

"Everyone in the court room has a responsibility to ensure that complainers are treated with dignity.

"Lady Dorrian’s comments are welcome. Change in how rape complainers are treated is urgently required.

"Many, many women tell us that the experience of giving evidence during their rape trial was one of the most awful experiences of their lives. The cost of seeking justice should not be this high."

Following a case in 2015, in which another defence advocate was criticised for his cross-examination in a rape case, a judgment was issued making it clear that rape complainers should not be insulted or intimidated and should be afforded some respect for their "dignity and privacy".

Lady Dorrian said that improvements have been made since then to address the "myths" surrounding rape cases.

However she claimed this case "has the potential to erode such progress".

"We accept that, to an extent, the matters in question constitute legitimate grounds for inquiry, but the nature, degree and content of the

questioning should be kept within reasonable bounds," she added.

"We therefore wish to remind all involved of their respective roles in keeping examination of a witness within proper and reasonable bounds."

A judiciary spokeswoman said: "Judges have regard to the decisions and observations of the appeal court, and implement them in future cases."

The Herald was unable to contact Joseph Barr.