It was the day the music died, the squeals of frightened pleasure stilled, the machinery ground to a halt, and the cooking smells of sausages, burgers and fried onions finally drifted away over the rolling Ayrshire countryside.

For years it lay ghostly and abandoned, until the twisting tracks and towers and fairground rides were dismantled and taken away.

Now the only evidence they were ever there is in the scars on the ground and the faded signage on the buildings which are remarkably untarnished after almost a decade.

Loudoun Castle Theme Park closed after 15 years in September 2010, no longer viable, according to the owners.

Austerity and recession had slashed incomes and park attendances in the wake of the economic crisis of 2008 when the banks teetered on the edge of the financial abyss before being bailed out.

Or, perhaps it was also to do with the legacy of an 18-year-old employee’s death, on his first day on the job as an attendant on the terrifying, precipitous rollercoaster called The Rat.

One of the tiny cars stuck on the track and Mark Blackwood attempted to push it clear. It started with a jolt, the lad hung by his fingers as it climbed, then, when it hit a right-angled bend 80ft up, The Rat shrugged him off.

After a two-week trial the owners were found not guilty of failing to provide sufficient training and supervision.

The fairground was set in more than 600 acres of glorious undulating countryside, on a hill above the small town of Galston and the Irvine Valley. You can look down on the buildings and shops from the grounds and the school, Galston Academy, where many of the teenagers came for summer jobs helping in the park.

The centrepiece of the site is the A-listed castle, now fenced around and dangerous as it cracks and crumbles and the vegetation smothers it. The centuries, and particularly the later years of neglect, have not been kind to Loudoun Castle.

The castle is steeped in history and conflict, although the majority of it was built in the 19th century, adding to and engulfing the 17th-century remnants and the 15th-century keep.

It had over 90 apartments inside, with an impressive 100ft library and 11,000 rare books. The structure was dominated by the main tower, now showing a formidable crack.

Loudoun Castle was known, in its time, as the Windsor of Scotland.

It was originally owned by the Crawford family in the 14th century, but passed by marriage to the Campbells.

In 1527, Sir Hugh Campbell of Loudon assassinated Gilbert Kennedy, 2nd Earl of Cassilis, the reason for which is likely to be revenge for the burning down of the original castle by the Kennedys in a clan feud, or perhaps the second event was precipitated by the first.

The Campbells were royalists and supported Charles 1 in the English Civil War. Loudoun was besieged by Oliver Cromwell’s armies in 1650, during which part of the original castle was destroyed, and finally surrendered by General Monck. It is said that a portrait of Charles had its nose cut off by Cromwell’s men.

Robert Burns and his brother Gilbert farmed land belonging to the Earl of Loudon, Mossgiel Farm at Mauchline, which is now an organic farm delivering milk and dairy produce to the surrounding area.

The present castle on the main estate was designed by Archibald Elliot for the then Countess of Loudoun in 1804, with additions to it in 1811.

One million trees were planted on the surrounding land, some of which were imported from Europe and America. The four-acre walled garden was turned into a mini-theme park for smaller children within the larger one, called Pirate’s Cove, with an inverted ship, wheels and merry-go-rounds. It is now locked and chained behind the high walls.

In 1942, on the eve of the castle being handed over to the War Office to be used as a billet for troops, it burned down again, and, without the funds to repair, has never been renovated and was left to ruin for nearly eight decades.

The theme park, operated by a London-based company, opened in 1995, and attracted around 170,000 visitors a year.

However, shortly after the opening it ran into debt and closed temporarily, to be taken over, in 1998, by the well-known travelling showman Raymond Codona, whose family had been in the circus and entertainment business for generations.

When Codona retired in 2002 it was bought for £1.25 million by another showman, one of the Dutch brothers who had run Dreamland Amusement Park in Margate. Johannes Hendrikus Christoffel Bembom is known as Henk. He invested a further £5m into the park and moved most of the Margate rides north.

Some of them can be seen in the 1989 Only Fools And Horses Christmas special, "The Jolly Boys Outing", where Del Boy, Rodney and Grandad visit Dreamland.

After seven years, in September 2010, Henk Bembom closed the park, with the loss of 11 permanent jobs and 160 seasonal ones.

He blamed bad weather, the rise in VAT and the opening of free attractions – like the Burns Centre in Ayr and the Transport Museum in Glasgow – making it “no longer economically viable”.

In 2014, four years after the park closed, plans were submitted for a massive £450m housing and leisure development on the 610 acres.

The ambitious plans included 1,000 new homes, 450 holiday lodges, glamping pitches, indoor sporting facilities, a sub-tropical water park – even a distillery.

Given the go-ahead it would enable the stabilisation and eventual restoration of the castle, it was said, which the developers envisage turning into a five-star hotel.

The plans were rejected by the local council, again by a reporter to a public inquiry and, after being "called in", finally by the Scottish Government last year, over fears it could damage the historic site and that the proposals for housing were inadequate.

There was “no certainty”, said the Scottish Government, that the housing plan would allow the castle to be restored.

The local East Ayrshire Council now wants there to be some kind of leisure development which will also save the castle, and is planning a consultation process.

And there it stands.

Behind the ornate locked gates, and up the long drive and past the booths where visitors used to pay their entrance money, the ruined and dangerous castle is visible through the metal fencing and the greenery overwhelming it.

Whether it can be saved seems unlikely.