Students who are struggling in university accommodation following a series of Covid outbreaks have been told they can return home.
New guidance has been published after controversy over coronavirus cases in student halls around the country.
Ministers say they do not expect a “mass exodus” from campuses, and that short indoor home visits remain barred.
First Minister Nicola Sturgeon said the “vast majority” of students had “coped well” and complied with guidance.
And she said it was “absolutely our priority” to make sure that students are able to return home for Christmas.
Hundreds of students have tested positive for the virus as universities begin the new term, and thousands more have been told to self-isolate in halls.
The government issued fresh guidance over the weekend amid confusion over whether students would be allowed to return home to their families.
This states that they can move home permanently or to self-isolate, but only if other members of the household also go into quarantine for 14 days.
Shorter visits are permitted if there is a “reasonable excuse” such as a bereavement or family emergency – but visits without one are still deemed an “offence”.
Ms Sturgeon said the rules were “tough for everybody”, but were “necessary to reduce the risk of the virus spreading between different households”.
However, she added that people should not assume the rules in place at the moment on home visits would still be in place for Christmas.
Restrictions are reviewed every three weeks, although the first minister stressed that any changes “depend on the future course of the pandemic”.
She said: “It is absolutely our priority to make sure students are able to return home for Christmas, as I know everybody will want to do.”
No ‘mass exodus’
Earlier, Education Minister Richard Lochhead said he did not large numbers of students to move home in light of the updated guidance.
Speaking on BBC’s Good Morning Scotland programme, Mr Lochhead said: “I know many students are struggling at the moment but I also know many students accept that they want to be at university.
“It is challenging at the moment, especially if they are self-isolating, but they are enjoying the opportunity of making new connections, of at least meeting their tutors, albeit a lot of their learning is online.
“So I don’t expect a mass exodus from Scotland’s campuses but the opportunity is there for those that are struggling.”
The guidelines say that students can move to another home permanently, which means they would have to change household.
Students who decide to do this have been asked to follow self-isolating rules and not use public transport – as well as to “consider how you may benefit from in person learning”.
Notice periods have also been introduced for those permanently leaving student halls – either seven days’ notice or 28 days if the tenancy began after 28 September.
The new guidelines have been welcomed by the students’ union NUS Scotland.
Its president Matt Crilly said: “Today’s guidance provides welcome clarity to the students in halls, who will be considering their next steps.
“We welcome that students will be able to return home on a permanent basis. However, we are disappointed that the government continues to talk up in-person teaching, which may keep students on campus and increase risks unnecessarily.
“We continue to call on the Scottish government to strengthen teaching guidance so remote learning is the default, and a reality for as many students as possible.”
‘Halls of horror’
But Scottish Conservative leader Douglas Ross said the picture was still one of “confusion” and criticised the fact the guidance was published so late on Sunday.
He told BBC Radio’s Good Morning Scotland: “On one hand students are being told they can go home, then they are being told they can go home if there are certain circumstances and I think there are still questions over what those circumstances are.”
Mr Ross also said ministers should have anticipated the problems given the spike in cases witnessed in the US when colleges and universities returned for the new academic year.
He added: “This guidance should have been absolutely crystal clear before these young people left home and certainly before they got to university and were, in many cases, locked up in halls of horror.”
Scottish Liberal Democrat leader Willie Rennie said the guidance had provided some clarity for students but called on ministers to go further.
Speaking on the programme, he said: “We do need to have that asymptomatic routine testing to make sure that people know if they are negative so they can home and continue their studies.”
Mr Rennie also called for rent rebates and mental health support for students after a spate of outbreaks across the country, which he claimed were predictable
He added: “This was the biggest movement of people since the start of the lockdown so it was inevitable that we would have this.”
The body representing Scottish universities said student welfare must be a priority.
Prof Gerry McCormac, Convener of Universities Scotland, said: “With the support of their universities, students need to choose what is right for their own physical and mental health.
“Unfortunately the current situation with this pandemic means these choices do need to be balanced within the wider public health context.
“There is a real benefit, we believe, in staying at university this semester and benefiting from the blend of both digital and in-person learning and the wider range of services and support that is available.”
Prof McCormac added: “It has been a very difficult start to the new academic year for the entire student community, both those returning to university and in particular, those attending for the first time.”