A QC who accused a rape complainer in court of being a “wicked, deceitful, malicious, vindictive liar” has been backed by his peers.

Former prosecutor Brian McConnachie received a stinging rebuke from Scotland’s most senior judge for insulting the woman.

In a clear warning to zealous defence agents, the Lord Justice Clerk, Lord Carloway, said judges must step in to protect complaining witnesses such “protracted or vexatious questioning”.

However, the Scottish Criminal Bar Association said Mr McConnachie, and other defence agents had a duty to act on their clients’ behalf.

Thomas Ross, who chairs the association, said: “We have approximately 150 members and none of them is respected more than Brian McConnachie QC.

“The Scottish criminal justice system is extremely lucky to have him and the unfortunate publicity that this difficult case has attracted does not lessen our respect for him one iota.”

Mr McConnachie has not commented publicly. Lord Carloway – who in the absence of a sitting Lord President, is the most senior member of the judiciary – made his remarks after he rejected an appeal against conviction by Duncan Begg, 44.

Begg was jailed for eight years in 2014 for the rapes, assaults and sexual assaults of two women in the 1990s. One of them endured two and a half days of tough exchanges with Mr McConnachie.

Mr Ross said: “Lord Carloway made much of the time that the cross-examination took, but two people were involved in that process – apparently the behaviour of only one merited intervention by the trial judge.

“The Scottish Criminal Bar Association of course recognises the right of the Lord Justice Clerk to comment upon matters of professional practice.

“That said, it is extremely important to recognize also that our members perform this extremely difficult task every day, under the heavy weight of client’s expectations, in a manner that respects the dignity of the complainer and the right of the accused to a fair trial. Emotions on both sides run high, and while attempting to do justice to the task, I have been sworn at, shouted at, threatened and had witnesses turn their back upon me and walk out of the court – even though I have never abused or insulted any of those witnesses.

“Judges are, understandably, reluctant to chastise witnesses for that type of conduct, in case it makes things worse and throws the trial completely off the rails.

“On top of all of that, you have the heavy responsibility of representing a citizen who claims to be completely innocent.

“In short, if you do not take the cross examination to the absolute limit of what can be achieved, you may be contributing to an innocent person going to prison for upwards of five years.

“For that reason, only the most experienced and skillful cross-

examiners are trusted to perform it. Brian McConnachie QC undoubtedly falls into that category.”

During Mr Begg’s initial trial at the High Court in Aberdeen last year Mr McConnachie repeatedly accused the woman of “making things up” and trying to get Mr Begg in to trouble.

At one point the victim responded: “You can believe whatever you want. I’m not caring no more. I’ve given up on yous lot …”

By the end of the second day of her evidence, the women appeared unwell and the case was adjourned. She admitted “her head was all over the place”.

The jury eventually found Begg guilty of some of the charges detailed in the complainer’s testimony but not others after a two-week trial.

Crucially, the evidence of one complainer helped to corroborate that of the other under the Moorov principle.

Questioning her credibility was a key plank of the defence and the subsequent appeal.

Victims’ rights groups have long warned that perceptions of shaming and bullying it the witness box put rape victims off going to the police.

Sandy Brindley of Rape Crisis Scotland said: “While we accept that evidence needs to be tested, our experience is that at times the defence can cross the line from testing evidence to harassing the complainer. At times, The manner in which defence counsel can speak to complainers is unnecessarily aggressive and cruel.”