Students at the University of Edinburgh have been told they will be suspended if they continue to breach social distancing rules.
The warning comes after police were called to break up several parties at Pollok Halls.
The top university has warned of “immature” students facing punishment for “reckless” behaviour which wastes police time.
Officers recently attended the accommodation building when students refused to disperse after being asked to do so and outdoor seating has now been taken away.
Gavin Douglas, deputy secretary of student experience said: “Neither the university nor the police can accept this sort of reckless and immature behaviour, which puts the health and safety of others at risk and wastes police time.
“As a University of Edinburgh student you are bound by the University’s Code of Student Conduct. Behaving in a way that impairs safety is an offence under the Code.
“The University will take the strongest possible action under the Code if there continue to be illegal gatherings of our students.”
He confirmed any student taking part in gatherings of more than six people from a maximum of two households, whether on or off campus, risks immediate suspension from the university and exclusion from university accommodation.
Anyone who flouts the current coronavirus rules is at risk of being fined on the spot.
And Police Scotland confirm that repeat offences will lead to prosecution.
Mr Douglas added: “As a result of the problems in recent nights, we will be removing all outdoor seating from around the Pollock site.
“We are also ceasing the option to take food away from the John MacIntyre Centre and we will review this position regularly.
“The Covid-19 pandemic requires all of us to make changes to the way we live in order to stop the spread of disease and keep others safe.
“Life for all of us has to be different as a result.
“As the newest members of the University of Edinburgh community, I ask you all to accept your new responsibilities and abide by the rules.”
Follow STV News on WhatsApp
Scan the QR code on your mobile device for all the latest news from around the country