IT may be a ruin but if the crumbling walls of Dunbar Castle could talk, there are incredible stories it might tell. Among my favourites is that of Lady Agnes Randolph who successfully defended her East Lothian home from a siege led by William Montagu, Earl of Salisbury in 1338.

Her husband, Patrick, 9th Earl of Dunbar and 2nd Earl of March, was off fighting elsewhere, leaving "Black Agnes" – as she was known for her dark hair and complexion – at Dunbar Castle with only servants and a few guards.

The Earl of Salisbury, an English commander, likely expected that seizing the castle would be a doddle. He would leave five months later, his reputation in tatters.

His troops were frequently taunted by Agnes, who ridiculed their efforts and would employ her maids to dust down the ramparts with dainty white handkerchiefs after an attack. A battering ram driven into the doors was smashed by a boulder Agnes had dropped from above.

READ MORE: River City star Stephen Purdon on falling in love with Arran

The Earl of Salisbury finally admitted defeat and ended the siege. All in, it had cost the English crown an estimated £6,000 and gained nothing.

The first to defend this promontory overlooking the town's harbour are believed to be the Iron Age Celtic people, the Votadini, and their descendants the Gododdin. The name Dunbar is thought to be derived from the Brythonic "dyn barr" meaning "the fort of the point".

Mary, Queen of Scots visited Dunbar Castle several times, including with her third husband, James Hepburn, the 4th Earl of Bothwell, prior to her surrender at the Battle of Carberry Hill on June 15, 1567.

In December that year, Dunbar Castle's edifice and defences were slighted by order of the Parliament of Scotland. The guns were taken to Edinburgh Castle and some stone removed for reuse at the quayside at Leith.

READ MORE: The coded messages and covert meanings hidden within flowers

Fast forward a few centuries to one of Dunbar's most famous sons, the conservation pioneer and explorer John Muir, born in 1838. Muir is said to have first honed his climbing skills by scaling the craggy ruins as a youngster.

What to read

One of the many historical biographies featuring Dunbar Castle is My Heart Is My Own: The Life of Mary Queen of Scots by John Guy. The book inspired the big budget Hollywood film, starring Saoirse Ronan and Margot Robbie, released in 2018.

Dunbar Castle also graces the pages of The Story of My Boyhood and Youth by John Muir, recounting his early childhood growing up in East Lothian.