SCOTLAND's most senior judge has delivered a stinging rebuke to QC's who insult alleged rape victims during cross-examination.

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

His remarks came as he rejected an appeal against conviction by Duncan Begg, 44, who was jailed for eight years in 2014 for the rapes, assaults and sexual assaults of two women in the 1990s.

Lord Carloway sounded his warning after reviewing the 300-page transcript of the examination-in-chief and cross-examination of one of Begg's victims as she detailed abuse that took place over 13 years.

Mr Begg's advocate, Brian McConnachie QC, had begun his cross examination with the opening line of "You are a wicked, deceitful, malicious, vindictive, liar?"

Mr McConnachie, a former prosecutor, 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, at the High Court in Aberdeen, 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.

However, Lord Carloway said that the victim was put under pressure by Mr McConnachie and she had been "generally attempting to answer every question in a positive manner, rather than acknowledging any deficiencies in recollection".

Lord Carloway said: "From the outset of cross-examination, she was subjected not just to in depth questioning testing the veracity of her testimony, but to direct insults of her general character.

"The cross-examination itself then lasted for hours.

"It was conducted in a manner apparently calculated to break the will of the witness, which at times it undoubtedly did."

He added: "In this case, it is doubtful whether the ubiquitous informed bystander would have regarded the conduct of this trial as affording due respect for the complainer's rights.

"Leaving aside a question of whether the correct procedure.. was followed in this case.. it is important to emphasise that a trial judge has a power to control the nature and scope of questioning.

"He is entitled to stop questioning if he considers it to be 'protracted, vexatious and unfeeling'.

"If a proper balance cannot be achieved by the representatives of the crown and defence, the court may have a duty to intervene."

"While not wishing to be over critical of the advocate depute or defence counsel for the manner in which this case was conducted, given the latitude which seems still to be afforded in practice in cases of this type, it has to be said that both the manner and length of examination and cross examination give cause for concern in relation to the treatment of a vulnerable, or indeed any, witness testifying in the criminal courts. "The examination... must have been what can only be described as as a substantial ordeal for the complainer."

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: "Reporting a rape, and giving evidence in court, can take a great deal of courage. 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.

"The public would be horrified if they saw how women in these circumstances can be treated."

Mr McConnachie, nor The Faculty of Advocates, responded to The Herald's inquiries.