This lovely castle is a dream find for lovers of history or golf: it's just a few miles from St Andrews, was built by the descendants of Robert the Bruce, and once hosted Mary Queen of Scots.

A beautiful location, a fascinating history, and some of the finest hedges in Britain – Earlshall Castle, close to St Andrews in the Fife village of Leuchars, is a truly amazing place.

The agents, Savills, describe it as ‘one of the best-kept 16th century houses in Scotland’, and it’s hard to disagree. Considering the age of the place – it was begun in 1546 by Sir William Bruce, a descendant of Robert The Bruce – the state that it is in today is remarkable.

A lot of the credit for the condition of Earlshall goes to Robert Mackenzie, who bough the castle in 1890, and the architect he hired to renovate. That architect was the newly-qualified Robert Long, a family friend of Mackenzie.

Long went on to have a long, hugely-successful career, becoming one of Scotland’s most distinguished architects and earning a knighthood. Yet he continued to regard his work at Earlshall to be among his finest.

The castle, as it stands today, is a 10-bedroom building with a great hall, dining room, gun room, library, study and 10 bedrooms, among other things. Without doubt the most eye-catching of the interior spaces is the Long Gallery, whose painted ceiling is justly famous for its intricacy. It dates back to the 17th century, and is a phenomenal and unusal work.

Painted the full length of the 50-foot long roof in grey and black tempera, it depicts the coats of arms of the principal noble families of Scotland as well as those of European royalty. There are also marvellously-imagined coats of arms for all manner of other great figure from history and even myth: King David of Jerusalem, Hector of Troy and King Arthur all have ‘their’ arms included.

When it was painted, such flourishes must have seemed more than justified: not only did the residents trace their line directly to The Bruce, Earlshall had also hosted the likes of Mary, Queen of Scots and James VI (later James I of Britain) in its then-fairly-short history.

As famous and extraordinary as the Long Gallery’s ceiling is, the gardens are perhaps even more so thanks to the topiary lawn. The 36 yews were already mature plants when brought in from Edinburgh in the late 19th century – they’re now over 125 years old, and are clipped into exotic shapes which come together to form the shape of four Saltires. At one end of the lawn there is a gateway with an inscription from As You Like It: ‘Here shall ye see no enemy but winter and rough weather’.

As well as the topiary lawn there is plenty more land, and several more buildings included in the sale – among them a Gate House and a ‘Cottage’, both of which are around 2,000sq ft. There is also a building known as ‘Dummy Daws’, the oldest building on the estate, which has a billiard room on the ground floor.

Earlshall is located in 34 acres of its own parkland close to the middle of Leuchars, a village well-known for its RAF base, and which boasts a mainline station that connects direct to Edinburgh and Aberdeen.

That station is also famous for its connection to St Andrews: the world-famous golf courses and university are just a few minutes down the road.

Earlshall Castle is on the market via Savills – read more about the wonderful history and see more pictures and details here.