A disused fountain which is reputed to have once run with wine for Bonnie Prince Charlie is set to flow again.

The five-metre King's Fountain in the courtyard of Linlithgow Palace was built by King James V in 1538.

Conservation work was carried out to undo the damage of chemicals used in the 1930s to kill algae.

Historic Scotland, which undertook the fountain's restoration, said water would flow from 0930 BST to 1700 BST each Sunday from 1 July to 26 August.

A masterpiece of Renaissance stonemasonry, water is pumped up through the top of the structure which is shaped like an enormous crown.

The water runs into the first of three tiers of stone bowls, then flows out of eight spouts set into carved figures of mythical beasts - including a griffin and a giant - then out of the second bowl through spouts from carved human heads.

It is an opportunity to get a little closer to what the palace would have been like when it was a favourite residence of Scottish kings and queens

Susan LochHistoric Scotland

It is said to have famously run with wine to celebrate the arrival of Bonnie Prince Charlie in Linlithgow in 1745.

Now returned to working order, visitors to Linlithgow Palace will have the chance to see the elaborate fountain in action.

Susan Loch, head of visitor services at Historic Scotland, said the age and friable condition of the stonework meant the fountain could only run on selected occasions.

She said: "The fountain is a spectacular piece of craftsmanship and we are delighted to give people the chance to see it in action once more.

"It is an opportunity to get a little closer to what the palace would have been like when it was a favourite residence of Scottish kings and queens."

Laser scans

Historic Scotland will carefully monitor the fountain to detect any possible erosion to original and new sections caused by flowing water .

And hi-tech 3D laser scans have also been taken which means that exact comparisons can be made to spot any changes as early as possible.

The fountain was built to demonstrate the importance of the Scottish monarchy, and to prove to Henry VIII that Scotland's young king was as grand and powerful as any of the crowned heads of Europe.

It is nearly 100 years older than its nearest age-rival, the "Diana" fountain at Bolsover Castle, South Yorkshire, depicting the Goddess of hunting.