Nicola Sturgeon has disclosed she asked Scotland’s chief medical officer to resign on Sunday night after realising her breaches of lockdown regulations were damaging public confidence.

The first minister told reporters on Monday she reversed her earlier decision to publicly defend Catherine Calderwood after it became clear later on Sunday that the CMO’s position was untenable.

It is understood Calderwood, an obstetrician, could face an investigation by the General Medical Council (GMC), the medical profession’s regulator, for potentially breaching its codes of conduct.

Part 75 of the GMC’s good practice code requires doctors to immediately report any incident where they are cautioned or charged by the police. There is no equivalent of a caution under Scottish law, but the chief constable of Police Scotland, Iain Livingstone, disclosed on Sunday that his officers had visited her at home and issued her with a warning about breaching the lockdown. The Times reported that her husband, Angus Loudon, was also given a warning.

Part 65 of the code says doctors must “act with honesty and integrity”, and “must make sure your conduct justifies your patients’ trust in your and the public’s trust in the profession”.

Facebook Twitter Pinterest Sturgeon and Calderwood at a press conference in March about Scotland’s response to the coronavirus outbreak. Photograph: Reuters

Calderwood apologised on Sunday after admitting that the couple had twice visited their holiday home in Earlsferry, Fife, during the lockdown and had taken their family and gone for an overnight stay last Friday night, visiting the local beach.

Calderwood has been approached for comment. The GMC would not confirm whether any complaints had been made about her conduct.

Sturgeon denied news management was a factor in the timing of the resignation announcement, which came on Sunday night just as it emerged that Boris Johnson had been hospitalised with Covid-19. She said she and Calderwood agreed the CMO should quit after a long conversation to discuss their options.

“What was at the forefront of my mind was how firstly I continue to make sure I have the best advice to enable me to deal with this virus, but also how I ensured that the confidence of the public in the advice we are giving then was maintained,” Sturgeon said.

“Those were things I was weighing up during the day and as you know, I came to a view last night that the CMO had to resign in order to make sure we maintained that confidence.”

Calderwood’s resignation capped a difficult day for Sturgeon and the Scottish government, after the Scottish Sun published photographs of the CMO and her family breaching the lockdown she had been instructing the public to follow in the government’s information films.

The first minister had insisted during her daily coronavirus briefing at 2pm on Sunday that Calderwood could not and should not quit because her expertise was essential to her; Sturgeon hinted the CMO had offered to resign, but she had rejected it.

At 4.40pm Sturgeon announced via press release Calderwood would stand back from all public-facing work on the epidemic. At 9.54pm, the Scottish government announced she had quit.

Sturgeon said on Monday she had seen emails and tweets from the public on Sunday evening that made clear allowing Calderwood to remain in office put the lockdown policy at risk. “That’s not a risk that I, and to be fair to her, she was prepared to take,” the first minister said.

Sturgeon said Calderwood had not told the Scottish government she and her husband had made two visits to Earlsferry during the lockdown on Saturday, when the government was first asked for comment by the Scottish Sun.

That government statement claimed she had visited to “check on” the property. “The statement which went out was a reflection of our understanding at that time of the reasons for her visit that weekend,” Sturgeon said. “She later made clear that there had been a second visit and of course made that clear at the briefing yesterday, so that’s the situation there.”

• This article was amended on 7 April 2020 to remove a reference to Catherine Calderwood being a “member” of the GMC. The GMC’s governing council has members but doctors licensed by the GMC are registrants.