A stained glass window at an historic Welsh castle has been restored, almost 30 years after it went for repairs.
Margam Castle's 16-panel Heraldic stained glass window was damaged by fire in 1977 and an early plan to return it to its former glory failed.
It lay in the vaults of Swansea Institute until a conservation scheme was approved in 2002.
The window, which depicts the lineage of the Mansel-Talbot family, was first installed in the castle in 1834.
The Victorian-era Tudor-Gothic castle fell into a semi-derelict state after World War II and began to be targeted by vandals.
Then came the fire that damaged every panel of the window, which was created by the stained glass artist, David Evans, from Shrewsbury.
The remaining panels were taken to the stained glass department at Swansea Institute. An initial repair plan did not work out.
It was not until the late 1990s that a restoration programme was proposed which was to win the support of Neath Port Talbot Council and the Welsh heritage body Cadw.
The repair work was carried out by the Architectural Glass Centre, the commercial arm of the institute's stained glass department, and involved current and former students.
The centre's Alun Adams researched and oversaw the project to restore the 172-year-old window.
He said: "The restoration of the Margam panels has been a major project, always demanding, sometimes frustrating but ultimately extremely rewarding.
How the window looked before its repair
"For the first time in many years, possibly within living memory, the panels are complete, undamaged and restored to their former glory.
"A wonderful example of stained glass of the 1830s and one of a very few windows by David Evans of Shrewsbury to be found in south Wales."
The Grade I Listed castle is now set in the 1,000-acre Margam Country Park, run by Neath Port Talbot Council.
Councillor Colin Morgan, cabinet member for community and leisure services at Neath Port Talbot Council, said: "This is the start of an exciting period for the future development of Margam Castle."
He said there were plans for a National Centre of Photography, a heritage training centre and catering and merchandising areas which should be complete within two years.
The window is on view to the public over the summer.