Police have issued a warning to Scotland's chief medical officer for visiting her second home in Fife during the coronavirus lockdown.
Dr Catherine Calderwood has been heavily criticised after pictures of her family trip to Earlsferry were published in The Scottish Sun.
She apologised "unreservedly" and said she would continue to focus on her job.
The high-profile medic has been among those urging the public to stay at home to save lives and protect the NHS.
Some MSPs have said her position is "untenable" but the first minister said Dr Calderwood's advice and expertise were "invaluable".
She will remain in her role but step out of the public eye, no longer attending the daily press conferences.
Chief Constable Iain Livingstone confirmed that local officers spoke to Dr Calderwood, who is originally from Belfast, on Sunday.
He said they reiterated crucial advice and issued a warning about her future conduct, all of which she accepted.
"The legal instructions on not leaving your home without a reasonable excuse apply to everyone," he said.
"Social distancing is the key intervention to curtail the spread of coronavirus and it is essential the instructions are followed to protect each other, support key workers, take strain from the NHS, and save lives.
"Individuals must not make personal exemptions bespoke to their own circumstances."
Last month, the Scottish government issued a travel warning criticising the "irresponsible behaviour" of people with second homes and campervans travelling to the Highlands in a bid to isolate.
The Scottish Sun reported that Dr Calderwood and her family were seen walking across a golf course in Earlsferry, near their second home, on Saturday.
Earlsferry is a drive of more than an hour from Edinburgh, where they have their main family home.
'I am truly sorry'
In a statement issued on Sunday Dr Calderwood said: "While there are reasons for what I did, they do not justify it and they were not legitimate reasons to be out of my home.
"While I and my family followed the guidance on social distancing at all times, I understand that I did not follow the advice I am giving to others, and I am truly sorry for that.
"I know how important this advice is and I do not want my mistake to distract from that.
"I have a job to do as chief medical officer to provide advice to ministers on the path of this virus and to support the medical profession as they work night and day to save lives, and having spoken with the first minister this morning I will continue to focus entirely on that job."
She later told a press briefing that she had visited her second home last weekend with her husband as well.
Dr Calderwood issued a further apology to the police and to NHS colleagues, but reiterated she would stay in her post.
"What I did was wrong, I'm very sorry and it will not happen again," she said.
Nicola Sturgeon told the media briefing Dr Calderwood's advice and expertise were "invaluable".
She said she did not expect people not to be angry, but asked the public to consider the "wider importance" of Dr Calderwood continuing to help the government through "unprecedented" times.
Monica Lennon, Scottish Labour's health spokeswoman, said the first minister and her top team must "lead by example" as she called for Dr Calderwood to resign.
She said: "Her actions have undermined Scotland's pandemic response and her own credibility. Unfortunately, it means she cannot and should not continue in her role. Her position as CMO has become untenable."
Scottish Conservative leader Jackson Carlaw said Dr Calderwood's position was "very difficult, untenable even, given the damage this has caused to public trust".
"There cannot be one rule for the bosses and another one for everyone else," he said.
Scottish Liberal Democrat leader Willie Rennie, a Fife MSP, said local people in the East Neuk were angry that second-home owners were ignoring advice to stay at home.
"There is real concern that with a swollen population and a virus sweeping through the local health services will just not cope," he said.
"If we are going to get through this pandemic we need medical leaders who everyone can follow. It is with great regret that we say that the chief medical officer will need to go."
Earlier a Scottish government spokesman said Dr Calderwood had been working seven days a week preparing Scotland's response to the Covid-19 crisis and she decided to check on the family home in Fife as she would not be back until after the lockdown.
"She stayed overnight before returning to Edinburgh," he added.
"In line with guidance she stayed within her own household group and observed appropriate social distancing with anyone she was in passing in the village."