It is a send-off the departing sixth-years at Bell Baxter High are unlikely to forget.
Their stern-looking headteacher, Philip Black, strides through a packed dining hall, scanning tables for some miscreant or other. He stops and jabs a finger at a colleague, who points back - and joins arms for a birl round the room.
Seconds later, Mr Black throws his coat to the floor in best Saturday Night Fever-style, and leads pupils and teachers at the Fife school in a mass dance as YMCA blares from the tannoy.
"We're one of the biggest schools in Scotland, so it's a big event when our sixth-years leave," explained Mr Black. "There are about 200 of them, and they wanted to finish on a high."
A group of the S6 students, led by keen dancer Chloe Simson, wanted a week of activities for leavers to climax with a "flash dance" - where a troupe assembles in a crowded place, unbeknownst to the people milling around them, and suddenly breaks into a routine.
The cherry on the top was to be the participation of their headteacher. Mr Black, a PE teacher by training, was happy to oblige.
The buzz around the Cupar school, and online, has not dissipated in the week since the event: "This video makes me smile so much, we've left school in style. Something that will be remembered for years!" says somethinginmyliberty online. Particularly effusive was another post by JediMasterDarkman: "OH MY GOD! MR BLACK, YOU'RE AWESOME!!!!"
But Mr Black reserved his praise for the pupils who pulled off the stunt, after only one full rehearsal. "What it's done for goodwill and relationships across the school is tremendous," he said.
The video evidence on YouTube has been viewed tens of thousands of times, and reported upon extensively by newspapers and on television.
Mr Black, who also showed his moves to Thriller and The Time Warp, has been taken aback by the interest, but did not rule out taking part in whatever next year's leavers might be plotting.
"I'm up for anything that will help my school," he said.
Type "Bell Baxter flashmob" into the search box on YouTube
Original headline: A `flash' send-off that will drive you insa-a-a-ane