On West Sands, it’s hard not to hear the tune in your head, or run in slow motion. The beach played a key role in the 1980s blockbuster Chariots of Fire when it was trampled by a herd of bare-footed runners to the memorable Vangelis soundtrack.

In the film, the beach’s parallel lines of surf, sand and dunes give the illusion of a beach stretching endlessly northwards from St Andrews, even if it had been standing in for Broadsands in Kent. For decades, the iconic scene has brought visitors down to the waterside.

These days, however, the dunes at West Sands are in trouble. Large craters, or ‘blowouts’, are breaking the beach’s defences, leaving the land within exposed to flooding and further erosion. ‘Blowouts traditionally have been great places for the public to shelter in windy conditions,’ says Ranald Strachan, a countryside ranger for the Fife Coast and Countryside Trust. However, the constant footfall removes crucial vegetation – the native lime and marram grasses that anchor the dunes and help them grow. To make matters worse, the dunes are the primary defence for the world’s oldest golf course, the Old Course, which has been here since 1552. Erosion now threatens the course and the beach, two of the town’s major tourism draws.

A disaster in 2010 put the Trust into action. ‘A large storm surge destroyed part of the southern end of the dune system and broke through along several degraded areas,’ says Strachan. That year, a full dune restoration was begun. Strachan began searching for a material to fill the craters, something that could be easily sourced in the winter storm season. Then it occurred to him. ‘Christmas trees,’ he says. ‘They’re often landfilled after a short use at Christmas, so we asked local communities to donate them to coastal protection instead.’ When hundreds of trees arrived, the Trust enlisted volunteers to move them into the craters in a method known as ‘dutch basketing’.

Looking at one of the old blowouts, it’s clear the method works. The class of 2016 – once a pile of green fir trees – are now just a few rust-coloured crowns poking out of the sand. ‘Christmas trees have a great, open structure and trap sand well,’ says Strachan. They are buried in sand now, and with time, will break down allowing grasses to spread over the surface. With more trees needed this year, the practice has become something of a St Andrews tradition, with many locals swapping land fill for sand fill.