Police dispersed a group of around 50 young people who had gathered at Castle Sands in St Andrews on Friday night.
A Police Scotland spokesperson said: “We received a report around 9.50pm on Friday, September 11, of a large group of youths gathering on the beach at St Andrews Castle, The Scores, St Andrews.
“Officers attended, gave advice and the group dispersed.”
Police said no arrests were made and no penalty notices were issued.
It is not known if the group were students.
Under the Scottish Government’s Covid-19 guidelines, mass gatherings are prohibited.
A spokesman for St Andrews University said it had been a difficult time for young people and most students were behaving responsibly during the pandemic.
“This is an incredibly difficult period for students, not just in St Andrews but across the country,” he said.
“They have experienced a year like no other, far more than their fair share of disruption, and are facing a very different university experience from the one which tradition might have liked to promise.
“It is so important that while we remain cautious and prudent, and encourage our students to observe safe behaviour, we empower and support them to show what they can do during these enormously restrictive times. “