Sir Gregor Smith has resigned as Scotland’s chief medical officer on mental health grounds, saying the pandemic and its aftermath had taken their toll, as scrutiny continues over his handling of advice concerning avoidable deaths at NHS Grampian.

Smith, 55, said he did not “currently enjoy the good mental health necessary” to continue. He became interim chief medical officer in April 2020 and took the post permanently that December. Dame Anna Dominiczak has been appointed interim successor.

His departure follows questions about an unpublished 2022 review which found 19 avoidable deaths among 45 patients in liver and pancreatic surgery at Aberdeen Royal Infirmary. Surgeon Dr Mohammed Habib leaked the review and has called for a corporate homicide investigation into NHS Grampian.

Smith defended his conduct: “No-one in public life is unaccountable.” He said he was confident the review initiated by the health secretary would show that his advice concerning Grampian’s liver and pancreatic service was consistent with his role as chief medical officer.

Health Secretary Angela Constance announced the independent review on Saturday. She denied there had been a “cover up” surrounding the 2022 report and promised the review would be “100% transparent”. A spokesperson for Humza Yousaf said he would answer questions about his briefings and subsequent actions at the review.

The wider patient-safety concerns include allegations published by The Times that a surgeon at Dr Gray’s Hospital in Elgin attempted to take over a knee operation while recovering from a medical procedure and under the influence of drugs. A separate allegation concerns a physical altercation between a surgeon and a registrar who reportedly warned that the wrong hip was about to be replaced on an unconscious patient.

A healthcare watchdog report published on 12 November identified serious management and leadership shortcomings at NHS Grampian. Its medical director, Dr Simon Watson, called it “the most serious review” the watchdog had written.

Reform UK health spokeswoman Helen McDade said she expected further resignations. She accused Smith of withholding information, while also suggesting he might be made a scapegoat.

First Minister John Swinney said he respected Smith’s decision and thanked him for crucial clinical advice during the pandemic and recovery. Constance praised his public service and advocacy for prevention and reducing health inequalities.

Dominiczak, the Scottish government’s chief health scientist since July 2022 and regius professor of medicine at Glasgow University, now takes charge temporarily. Smith’s departure changes the leadership; the independent review still has to examine the advice and decisions under scrutiny.