Reporting by Bruce McKenzie

There's no doubting that Rowallan Castle is steeped in history, with its original structure believed to date back to the 13th century.

But thanks to major renovation, the main body of the Ayrshire landmark could prove a trailblazer in the way our most precious historic buildings are handled in future.

After years of painstaking work to transform the castle, people will once again be able to eat, sleep, drink and party in the grand surroundings for the first time in more than 70 years.

"It's the jewel in the crown, really, sitting right in the middle of the estate and nothing was being done with it, so we decided we'd like to renovate it and open it up to the public," owner Niall Campbell said.

Reaching that goal, however, started with a lengthy legal battle - which saw Rowallan Castle become the first property under the guardianship of Historic Environment Scotland to return to the private sector.

The property developer bought back Rowallan in 1989, more than two centuries after his ancestors had been forced to sell it to clear a gambling debt.

In the years since, they've also developed the 16th-century main house and built the first UK golf course designed by Colin Montgomerie.

But Mr Campbell found particular satisfaction from seeing the old pile brought back to a liveable state.

He said: "We worked very closely with Historic Environment Scotland and they are very good with guidance on what you can and can't do.

"We wanted to provide a really unique living space - true to its origins but with modern facilities.

"Simple things like adding bathrooms, these days we're looking for a bit more than a jug of water."

Other work behind the scenes included fire protection - brought into particular focus by the recent blaze at the Glasgow School of Art Mackintosh Building.

They also made sure to protect its architectural history - Charles Rennie Mackintosh's celebrated Scotland Street School was partly based on Rowallan and he's believed to have visited it to view and sketch the buildings.

More than a century later, Mr Campbell hopes Rowallan might again provide inspiration for bringing some of Scotland's most historic buildings into different uses.

"I think we're starting to see a change in culture in the way we view our old buildings," he said.

"Before, I think there was a view that we had to preserve historically significant places but these days that can cost a lot of money and there's less of that about.

"So I'd like to think we might now see bodies like Historic Environment Scotland bring its buildings back to some kind of use. For me, that's just a sign of the times we live in."

In a mark of the modern twist on this ancient pile, a stay can be booked via the accommodation website Airbnb, but its owners are keen to stress it's not just a retreat.

Mr Campbell said: "It was important that we create a place that's open to the public, so whilst it is part of our business and will have people staying in it as a holiday let, we also want there to be lots opportunities for people to come and enjoy it.

"That includes open days, but we're also hoping we can host exhibitions, workshops and maybe even some music recitals.

"The first lute performance in Scotland is said to have happened here, so if we could out on a lute player, for example, that might be something really special."