All of St Andrews University's students are going to be offered free coronavirus tests before the Christmas break.
The asymptomatic tests will be available for all students planning to leave St Andrews during the holiday.
Those staying in the town will also be offered the tests.
A survey by the St Andrews Students' Association says around 80% of students are planning to go home.
But the university is preparing to look after up to 1,000 students who have either chosen to stay or are unable to head home.
Despite the tests being voluntary, students have been strongly advised to take them.
It's due to young people in particular being likely not to have symptoms, although still being able to potentially carry Covid-19 back to family or friends.
Lateral-flow tests will be offered and take just a few minutes.
Results can be known within 24 hours by e-mail or text from NHS Test and Protect.
A testing centre will be open at the University Sports Centre at the end of this month.
The Scottish Government is recommending that two tests take place, at least three days apart, but ideally not more than five days.
It's to make sure there's the highest level of confidence that students aren't infectious with the virus before they leave St Andrews.
Any student who tests positive will be asked by NHS Test and Protect to take another type of test at the Coronavirus Testing Centre in the town to confirm the result and then should self-isolate.
If the test is negative, then a student is encouraged to travel as soon as possible, ideally within 24 hours, after receiving the negative test result to minimise the risk of picking up the virus before they make their departure.
A University spokesperson said: "Our priority this term has been to keep our community safe and, in doing so, ensure that the wider community of St Andrews is as safe as possible.
"This has been a very challenging semester for everyone at St Andrews, but the response of the vast majority of our students to the risks of Covid transmission and the necessary restrictions placed on them has been hugely positive and responsible.
"As the end of term approaches, we hope this new testing regime will allow students to travel home for Christmas with the reassurance that they are not taking Covid with them."