THERE is a saying among estate agents that the devil is in the detail.
• Legend says Hugo de Gifford called up goblins to build the spooky Yester Castle
But nowhere could this be more true than for a medieval ruin allegedly built by demonic forces, which has gone on the market for a cool 450,000.
Concealed amid an East Lothian woodland, spooky Yester Castle is said to be the upshot of a Satanic pact.
It is the handiwork of Sir Hugo de Gifford, rumoured to be a warlock and proponent of black magic, who legend says summoned an army of hobgoblins to help erect his fortress in 1267 after doing a deal with the devil.
The original incarnation was destroyed by the Scots army in the early 14th century before a second castle was erected in its place. This was also levelled and on top was built a third castle destroyed by the English army in 1540.
Despite its crumbling exterior, however, a subterranean chamber boasting gothic-style arches remains intact and continues to be known as the Goblin Ha' in a nod to the spine-chilling myth.
• Poll: Would you spend 450,000 on the remains of Yester Castle?
Michael Duffey, founder of Edinburgh Paranormal, which investigates ghost sightings and otherworldly goings-on said he had heard chanting and seen red lights emanating from the chamber in the course of his visit.
He offered some advice to would-be buyers of the estate: "I would say respect this great site and give this place the respect it deserves.
"I hope they uncover a bit more of what this chamber was for and what else lies in and around Yester Castle. This place needs to be put back on the map as I found it to be a hidden gem."
Roy Pugh, an East Lothian historian and author, said: "I have been there once myself and I have to say it was very spooky. I went with a friend and was amazed by how much of it was still standing, although you wouldn't know it was there because it's heavily surrounded by trees.
"De Gifford reportedly dabbled in alchemy and black magic but I wouldn't dismiss the myth out of hand. Legends are often based in fact."
On the cultural importance of the edifice, Mr Pugh said: "I would rank it quite high in the scheme of things."
Meanwhile, a Historic Scotland spokeswoman said Yester Castle was one of the earliest stone castles in Scotland and was "remarkable for the quality of its medieval architecture, including the subterranean chamber".
She said: "It's scheduled as a site of national importance and as such any owner is responsible for its care and maintenance."
Yester Castle, Goblin Ha' and surrounding 321-acre woodland is up for sale at offers over 450,000.