Scotland's chief medical officer has resigned, stating he does not "currently enjoy the good mental health necessary to continue" in the position.
Professor Sir Gregor Smith's statement comes after he faced questions from Holyrood's Health Committee over issues at NHS Grampian, where a 2022 report found 19 avoidable deaths had occurred.
Sir Gregor was first appointed chief medical officer (CMO) on an interim basis in April 2020 after predecessor Dr Catherine Calderwood was forced to quit for breaching COVID regulations by visiting her second home.
He was officially appointed to the role in December 2020.
Just 24 hours after his appearance at the Scottish parliament, he said: "Today, I have taken the decision to step down from the role of CMO on health grounds.
"It has been a privilege to be the CMO of Scotland for the last six and a half years, but it has become very clear to me that the nature and purpose of the role is not generally understood.
"Like many colleagues across the health system, those years of the pandemic and afterwards have taken their toll.
"Events over the last few days have shown me that I don't currently enjoy the good mental health necessary to continue with the exceptional challenges that this role can expose you to."
Sir Gregor was made aware of the 2022 report alongside then health secretary Humza Yousaf, who became first minister just months later.
It is not clear if the deaths were escalated to then first minister Nicola Sturgeon, but it was not until last week First Minister John Swinney and current Health Secretary Angela Constance were told following revelations from Aberdeen Royal Infirmary surgeon Dr Mohammed Habib.
Ms Constance has set up an independent review of how concerns about the health board were handled, including by the Scottish government.
Sir Gregor added: "No one in public life is unaccountable. I am confident, however, that the review initiated by the cabinet secretary will show that I provided my advice in relation to Grampian hepatobiliary (HPB) service consistent with the role of the chief medical officer.
"This is a very personal decision and I'm grateful for the messages of support I've received from colleagues around the country.
"I have gone on the record to parliament about my involvement and now ask further for privacy."
More from Sky News:
What the new documents on Lord Mandelson show
Convicted fraudster and Farage ally questioned by Sky News
Mr Swinney thanked Sir Gregor for his "service to Scotland during COVID and beyond".
The first minister added: "I recognise and respect Gregor's decision to step down."
(c) Sky News 2026: Scotland's chief medical officer resigns on health grounds
UK net migration falls to 77,000, lowest level in three decades, excluding pandemic
Security incident reported at Royal Navy headquarters
Charity set up in honour of Princess Diana placed into administration
UK writes to veterans to ready them for possibility of mobilisation
Dubai wholesaler plans renewed bid for collapsed Poundland
Channel 4 says its documentary allowing Huw Edwards to speak was 'an important film to make'
Myanmar says it will not comply with 'inappropriate' ICJ genocide orders
Asylum hotels, visas, arrivals: Test your migration knowledge