Scotland's chief medical officer, Dr Catherine Calderwood, has resigned from the Scottish Government.
It comes after she admitted to twice breaking strict non-essential travel rules to visit her second home in Fife over recent weekends, 44 miles away from her normal residence in Edinburgh.
It is despite calls from First Minister Nicola Sturgeon to stay on in her role to help the coronavirus pandemic.
In a statement tonight she said: “I am deeply sorry for my actions and the mistakes I have made.
“The First Minister and I have had a further conversation this evening and we have agreed that the justifiable focus on my behaviour risks becoming a distraction from the hugely important job that government and the medical profession has to do in getting the country through this coronavirus pandemic. Having worked so hard on the government’s response, that is the last thing I want.
“The most important thing to me now and over the next few very difficult months is that people across Scotland know what they need to do to reduce the spread of this virus and that means they must have complete trust in those who give them advice. It is with a heavy heart that I resign as Chief Medical Officer.
“I will work with my team over the next few days to ensure a smooth transition to my successor.”
First Minister Nicola Sturgeon said: “Dr Calderwood’s advice to me, to the government and to people across Scotland over the past few weeks has been the right advice. People should continue to stay at home to protect the NHS and to save lives.
“It is however clear that the mistake she made - even though she has apologised sincerely and honourably for it - risks distracting from and undermining confidence in the government’s public health message at this crucial time. That is not a risk either of us is willing to take.
“Catherine has been a transformational CMO, bringing changes to the way medicine is delivered in Scotland and in particular using her experience to bring an overdue focus to women’s health. Also, as I said earlier, her advice to me on coronavirus will be missed - which is why she will work to ensure a smooth transition in the days ahead.
“While she has made a very serious mistake in her actions, that should not detract from the fact that as CMO she has made a highly valuable contribution to the medical profession and to health in Scotland, and I have no doubt she will continue to do so in future. She leaves office with my thanks and admiration.”