LORD Advocate Dorothy Bain's legal argument has been dismissed as "strange" by the courts after a sexual harassment allegation sparked a constitutional row.

In a ruling published late last week, Lord Clark said the law officer could be vicariously liable after a lawyer claimed she was the victim of assaults and harassment at the hands of a sheriff.

Ms Bain’s lawyers had attempted to claim that it was the Advocate General, Keith Stewart, the UK Government’s top Scottish law officer, who should be liable.

However, the judge described her argument as “strange”.

The ruling relates to a case taken by a solicitor, X, against a sheriff, known as Y, the Lord Advocate and Advocate General.

Vicarious liability is when a party is responsible for the actions or omissions of another party. In this case, X argued that the Crown was liable for the alleged attacks on her by Y.

Lord Clark’s ruling does not deal with the harassment allegations but looks at whether or not the Crown has vicarious liability and, if so, who exactly needs to take responsibility.

READ MORE: SNP hustings: Candidates clash over plans for independence

X claims that in 2018 she was due to appear before Y in a jury trial, but that “technical difficulties with evidence” led to the case being delayed.

When she later apologised to the Sheriff, she claims he “told her not to worry and placed his hand on her cheek without her consent.”

Two months later, she claims Y “directed his bar officer to tell the pursuer that he wanted to see her in chambers” where he then “came from behind his desk and hugged the pursuer without her consent.”

He then “engaged her in conversation, using inappropriate phrases such as ‘your pretty face’.”

X considered she was “unable to leave, given the status” of Y and “that the meeting was taking place in the secure area of the court building”.

She claims he then approached her and hugged her and “allowed his face to linger against her shoulder”.

As she went to leave he “patted her twice, and firmly, on the bottom”.

Two other allegations, took place outside the court, including on train when X clams Y put his left hand on her inner thigh, and another time when he attempted to phone her shortly after she had submitted a complaint.

Y denies the allegations.

READ MORE: The secret ministerial register: a conviction, conflicts and whisky

In his ruling, Lord Clark said only the first two allegations – those that took place in court - could be considered.

He accepted that the Crown could have vicarious liability as the sheriff held a “degree of authority over practitioners such as the pursuer”.

Lord Clark’s ruling continued: “The vast majority of judicial office holders will certainly not pose a risk. 

“However, in principle, the risk does arise for individuals coming into contact with judicial office holders and who are subject to their authority or control.

“Authority and control have been relied upon for vicarious liability in cases of sexual abuse. Such an office holder could, in certain circumstances, abuse the special position in which the Crown has placed him.”

On the question of who is responsible, the Lord Advocate argued that it was a question for the UK Government.

Her lawyers said Scottish ministers “have only a formal role in the appointment of a sheriff or in the process for determining whether a sheriff remains fit for office”.

“The appointment is made by the monarch. The First Minister makes a recommendation. 

“Pay and conditions for sheriffs is a reserved matter. 

“The Scottish Ministers are prohibited by statute (and constitutional principle) from interfering with a sheriff’s exercise of his or her functions.”

However, the Advocate General said only the Scottish Government was liable as “its involvement was in the creation and continuation of the service/agency relationship because its First Minister had the contingent powers, in accordance with the legislation that it promoted, to recommend the sheriff for appointment and to remove him from office”.

His legal team argued that the UK Government “has had nothing to do with either the [wrongful acts] or the relationship of service/agency that” X had alleged.

READ MORE: Edinburgh Rose Theatre put up for sale by Danish owner

Lord Clark agreed.

“Standing back from the details, it would be strange that in a devolved nation, with its own legal system, with the Scottish Ministers paying the salaries of judicial office holders and the First Minister recommending who is to be appointed, and being the person responsible for removal of a sheriff from office, and the UK Government having no real interest or involvement (except in determining the amount of salary and pensions, as a reserved matter) that this claim does not arise against the Scottish Administration in respect of the Crown’s liability in this case.”

He dismissed the case against the Advocate General.

A Scottish Government spokesperson said: “The decision has been noted and it would not be appropriate to comment any further on live proceedings.”