Scotland's Chief Medical Officer, Catherine Calderwood speaks at a coronavirus briefing in Edinburgh on March 29. Jeff J Mitchell/AFP/Getty Images

Scotland’s Chief Medical Officer Dr. Catherine Calderwood has resigned after being caught leaving her home without a proper excuse during the coronavirus pandemic.

Calderwood initially said in a news conference apologizing for her actions that she intended to stay in the role. But by late Sunday night, she had resigned “with a heavy heart."

“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,” she said in a statement.

“Having worked so hard on the government's response, that is the last thing I want.”

Calderwood was photographed by a Scottish newspaper near her second home, in a different part of the country from her Edinburgh address.

Police issued her with a formal warning on Sunday for breaking Scotland’s strict measures aimed at limiting the spread of coronavirus.

Scotland’s First Minister Nicola Sturgeon said Monday that she had hoped that Calderwood would be able to stay in the position, "because at this point in dealing with the pandemic, continuity of advice from somebody who’s been immersed in this from the very outset was very important."