The lawyer who helped secure Alex Salmond’s acquittal over allegations of sexual assault has quit as the head of Scotland’s advocates body after a furore over remarks he made about Salmond and his accusers.

Gordon Jackson QC announced on Friday he was standing down as the dean of the Faculty of Advocates, one of the most powerful posts in Scotland’s legal profession, because he is under investigation for professional misconduct.

Jackson referred himself to the Scottish Legal Complaints Commission (SLCC) on Sunday after footage emerged of him making derogatory and indiscreet remarks about Salmond and several of the complainants on a train from Edinburgh to Glasgow during the trial.

In a brief statement published on the faculty’s Twitter feed, Jackson said: “I have intimated my decision to resign as dean of the Faculty of Advocates, with effect from 30 June, at the latest.”

He said he would resign at an earlier date if the SLCC referred his case back to the faculty for investigation – a step many lawyers, who said privately they were stunned by Jackson’s intemperate remarks, believe is inevitable.

“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,” Jackson said. “Accordingly, if, before that date, the ScottishLegal Complaints Commission remits the recent complaint for consideration by the faculty’s complaints committee, I will stand down as dean immediately. I do not intend to make any further comment.”

The footage was published by the Sunday Times six days after Jackson had helped secure Salmond’s total acquittal on 13 charges of sexual and indecent assault, including an alleged attempted rape and an intent to rape, after a two-week trial at the high court in Edinburgh.

Jackson, a former Labour MSP, was overheard telling another passenger that Salmond was a “quite objectionable bully” and a “nasty person to work for … a nightmare to work for”. He dismissed the complainants’ allegations, saying: “This is hardly sexual … sex offenders’ register? Not for you. Inappropriate, arsehole, stupid … but sexual? Unfortunately, [names one complainer] and [names another complainer] say it’s sexual.”

Referring to one complainant, he said: “We thought that eventually people might think she’s a flake and not like her,” and went on to discuss his defence tactics involving another woman, saying: “All I need to do is put a smell on her.”

After he refused to resign at the weekend, Jackson and the faculty, the representative and rule-making body for Scotland’s advocates – senior lawyers equivalent to barristers in the rest of the UK – came under pressure for him to stand down.

As dean, Jackson was in charge of discipline at the faculty. His colleagues said his powerful position and its arcane procedures made it hard for other members to force his suspension during the SLCC inquiry.

The nine women who accused Salmond of assault have been given personal alarms and police advice after receiving threats and abuse from the former first minister’s supporters.

Sandy Brindley, the chief executive of Rape Crisis Scotland, which has supported the complainants, said Jackson’s naming of at least two of them on the train was a “horrifying and completely unacceptable” breach of their right to confidentiality.