The lawyer who acted for Alex Salmond during his sex assault trial is to quit as Dean of the Faculty of Advocates.
Gordon Jackson QC was filmed on a train apparently making comments about the former first minister and identifying two of his accusers.
Mr Jackson apologised at the time, and referred himself to the Scottish Legal Complaints Commission.
He has now announced he will stand down as dean of the faculty by 30 June "at the latest".
In a statement, he said: "I have intimated my decision to resign as Dean of the Faculty of Advocates, with effect from 30 June, at the latest.
"It would not, however, be appropriate for me to remain as Dean at a time when the faculty was considering disciplinary proceedings regarding my conduct.
"Accordingly, if, before that date, the Scottish Legal Complaints Commission remits the recent complaint for consideration by the Faculty's Complaints Committee, I will stand down as Dean immediately."
The video recording of Mr Jackson's conversation, which was obtained by the Sunday Times, was filmed by a fellow passenger on a train from Edinburgh to Glasgow at the end of the first week of Mr Salmond's two-week trial.
Mr Salmond was later cleared by a jury of all 13 of the sexual assault allegations against him.
The video appeared to show the QC naming two of Mr Salmond's accusers, despite strict rules that protect their anonymity.
Mr Jackson could also be heard saying: "I don't know much about senior politicians but he was quite an objectionable bully to work with, in a way that I don't think Nicola [current first minister Nicola Sturgeon] is.
"I think he was a nasty person to work for...a nightmare to work for."
He can then be heard using the words "sex pest" but that "he's not charged with that", before going on to say: "Inappropriate, stupid...but sexual? Unfortunately [he then names two of the women accusers] say it's sexual."
When the video emerged, Mr Jackson said he "deeply regrets the distress and difficulties which have been caused" by the footage.
But he added that he did not regard Mr Salmond as a sex pest.