Edinburgh Castle is a world-famous landmark that's loved and treasured by locals and tourists alike - but imagine if it was accidentally destroyed due to an administrative error.
While it's hard to believe this could happen to a scheduled monument of such renown, this is precisely what befell another of the capital's ancient fortresses not so long ago.
First documented in 1479, Granton Castle was the home of Scottish nobility for hundreds of years before falling into disrepair in the early Georgian era.
READ MORE: Edinburgh's forgotten plan to scrap the Forth Road Bridge for a massive dam
Perched on a rocky outcrop at Royston with panoramic views of the Firth of Forth, the castle was perfectly situated to resist attack - or so it was thought.
During the war of the Rough Wooing in 1544, an English army landed close to Granton Castle and wrought devastation upon its walls. The damage was so severe that it effectively brought an end to the castle's tenure as a genuine fortress and, under the ownership of Lord Advocate, Sir Thomas Hope, it was remodelled as a medieval stately home.
In the 18th century, the building fell into a state of dereliction to the point that it was abandoned and became little more than a picturesque ruin. Throughout the Victorian era and into the 20th century, numerous surveys were conducted around the Granton Castle site and there was certainly no talk of the structure being demolished.
On the contrary, the 500-year-old structure was well on its way to becoming a protected landmark - then the unthinkable happened.
Sign up to our Edinburgh Live nostalgia newsletters for more local history and heritage content straight to your inbox
Just prior to the outbreak of the First World War, the castle was recommended to be scheduled as an ancient monument, only for its future protection to be thwarted by an administrative error of epic proportions.
Mistaken identity
It's understood that, upon receiving the listing request, the Office of Works instead scheduled Granton House, a relatively modern building in the same district.
With the battle for the Western Front raging on, the mistake was overlooked and the castle and its grounds sold to a Leith building firm, Messrs Bain & Brown. Unfortunately for Granton Castle, Bain & Brown had little interest in preserving the medieval site.
To the horror of conservationists, the company proceeded with quarrying operations around the site of the castle and its rocky outcrop.
In a letter to The Scotsman, one irate and heartbroken local wrote: "The Town Council, the Cockburn Association, and many distinguished citizens and lovers of Edinburgh from all parts of the country have allowed one of the most charming and valuable of all its natural features and attractions to be almost irretrievably ruined.
"We are, in this so-called 'enlightened' twentieth century, actually allowing a private company to pull down the artistic remains of the ancient castle that was built in the 15th to the 17th centuries, and is the only medieval building in the whole district, and to quarry even its ideal rocky site on the seashore for the purpose of making road metal and concrete, as if there were not enough rock in any other quarry hole that would serve this purpose."
Granton Castle Walled Garden
Despite considerable protests and noise in the media for a number of years, the castle gradually disappeared and, by 1928, had been almost entirely demolished, save for a portion of its garden walls. As for Granton House - the 1807-built stately home that had been confused for Granton Castle - it was badly damaged by a fire in 1954 and subsequently razed to the ground.
In recent years, the historic walled garden at the former Granton Castle has been revitalised and brought back into use by green-fingered locals. The site, which relies on volunteers to keep it going, continues to attract more and more locals keen on cultivating their own produce, from fruit and vegetables to flowers and other garden crops.
READ NEXT:
34 Edinburgh photographs that perfectly capture life in the city in the 1970s
Retro cookbook that was a must-have for every Edinburgh kitchen back in the day
The Edinburgh internet cafes we all used in the pre-smartphone era
Eerie Edinburgh wreck of yacht once owned by famous author left to rot in harbour
18 Edinburgh places that have changed beyond recognition in the last 30 years