Chirk Castle built for King Edward I's chain of fortresses across north Wales
A medieval castle has abandoned its dark ages roots and entered the 21st Century age of solar energy.
Chirk Castle, near Wrexham, has installed solar panels onto its historic roof, thanks to an award from the National Trust's green energy fund.
The trust owns the castle but some of the building is still lived in by descendants of its 16th Century owner.
It is hoped solar energy will save the castle 8,000 kw of energy per year and reduce its carbon footprint.
The castle was built in the late 13th Century by the 1st Earl of March, as part of King Edward I's chain of fortresses across the north of Wales.
It is now under the care of the National Trust.
"We have ensured that the panels are only fitted where appropriate to this grade one listed building, but it just goes to show that even in the most fragile of sites we all can do our bit," said Keith Jones, environmental practices adviser with the National Trust in Wales.
Descendants of Sir Thomas Myddleton, who bought the castle in 1595, still live in parts of the building, although it is also open to the public.
It is the last King Edward I building in Wales with residents.
The new solar thermal system will provide them with hot water during summer months.
"The residents of Chirk Castle will notice both financial and environmental benefits once the panels have been installed which will ultimately decrease both energy consumption and, in turn, energy bills," said Chris James, solar expert with npower.
"We're sure King Edward I would be proud to see his castle embracing the 21st Century."
Although a listed building, Mr Jones explained that large buildings with large roof areas were "ideal for this type of technology."
The installation of solar panels is one of several projects which has provided small scale renewable energy generation and other carbon saving projects at some of the trust's most sensitive heritage sites across England and Wales.