Parchments dating back to medieval times are among hundreds of documents secured
BBC News website
The future of records dating back more than 700 years has been secured - with the help of the taxman.
Estate ledgers, royal edicts and personal correspondence are to stay at Bangor University after a deal with Her Majesty's Revenue and Customs (HMRC).
The deal agreed with executors of the Penrhyn Castle estate will see the archives accepted for the British people in lieu of inheritance tax.
They reveal the history and politics of the families of the castle in Gwynedd.
The decision to allow the records to stay at their temporary home at Bangor University was made this week.
Castle owners over the centuries have ranged from medieval power brokers through to them having a role in the Owain Glyndwr rebellion.
They also had a prominent part in the slate industry and its controversial links with slavery.
The documents, which range from 13th Century parchment to 20th century typed papers, chart hundreds of years of history.
Their future has been secured thanks to the the little-known assets in lieu scheme.
This means goods with a strong historical or cultural value to the country can be accepted in place of the 40% death duties which would ordinarily accrue on any estate worth more than £325,000.
When the current owners took possession of the historical contents of the castle, they were faced with a bill for almost £290,000 and, had it not been for the scheme, may have been forced to cover the demand by selling the collection to private or foreign enthusiasts.
The deal was negotiated by Gerry McQuillan, who heads up HMRC's acquisitions, exports and loans unit.
"This has to be my dream job," said the former Inland Revenue official.
"My bosses knew I loved anything historical and, without meaning to blow my own trumpet, that I had a fair bit of knowledge on the subject, so when they were looking for someone to lead the unit, they asked me to apply.
"The rest, as they say, is history!
"The thing I love about it isn't just being paid to study fascinating pieces of our culture and heritage, it's the fact that I actually get to help people.
"The whole of the UK gains by being able to secure the future of beautiful artefacts, documents and paintings, and the executors of wills have a way out of their inheritance tax demands without having to raise hundreds of thousands of pounds in cash.
Mr McQuillan added that the legislation allowing this has been in place since 1901.
"Until World War II, the Inland Revenue, as was, took the attitude of 'thanks all the same, but I think we'll just take the cash!'" he said.
"In 1946 the chancellor of the day, Hugh Dalton, created a fund to compensate the exchequer to the equivalent of the value, if they chose to accept historical artefacts, but the problem with that was that they could only really take items with a high monetary value.
"In 1998 Gordon Brown set up our unit, and we were for the first time allowed to break the direct link between items and their market value.
"Now I'm allowed to consider not only the price but also the intrinsic historic and cultural worth to the nation when I decide whether to accept something into the scheme."
Penrhyn Castle is operated by the National Trust
The earliest item in the Penrhyn archive is from 1288 and details the sale of the township of Karnechan, along with all its goods and people!
There are more than 120 similar legal documents dating from the 14th and 15th Centuries, written in Latin on parchment.
They provide a vital understanding of the Griffiths of Penrhyn, vassals to the princes of Gwynedd and key allies in attempts to form a single Welsh principality.
The Griffiths seem to have successfully trodden a fine line between the political reality of Anglo/Norman dominance and their sworn loyalty to the Welsh royalty.
However, it's a tightrope they appear to have fallen off around the time of Owain Glyndwr, as they backed first one side and then the other and eventually fell in influence and prominence.
The parchment documents from this period are cared for at Bangor University's library by Einion Wynn-Thomas.
"Even though the archive has been with us at the University for some considerable years now, it's still a massive relief to have their long-term future secured," he said.
"Something as important as this to the history of north Wales really needs to remain here, for the benefit of the local people.
"Without this scheme the danger was that the archive would have been sold to a private collector and would have been lost to the public for good.
"Even worse than that, it's possible that it could have been broken up into different lots, destroying the continuity of this phenomenal resource.
"It's such a thrill to handle something written over 700 years ago and, given the age of some of the documents, their condition is amazing.
"It is perfectly possible to take them out and read them but obviously we have to take the greatest care with something so old and valuable, so they're stored in a humidity-controlled case, well away from direct sunlight.
"The value to our understanding of the history of Wales can't really be estimated. They provide one of the most complete documentary pictures of medieval Wales anywhere in the country."
In the 17th Century, the castle passed into the hands of the Pennant family.
Hundreds of documents relate to the family's estates in Jamaica and their controversial involvement in the trade of slaves, sugar and rum, the profits from which financed the expansion of Penrhyn slate quarry into the biggest such operation in the world.
"Obviously slavery is such a horrifying prospect to any right-thinking modern person, but the documents around this time would suggest that the Pennants took an amoral rather than immoral stance on it," said Einion Wynn-Thomas.
"The ledgers talk of units of slaves in the same way as they mention cases of rum and tons of sugar.
"This is precisely why this archive is so valuable to the future as well as the past.
"If we're going to make sure that nothing like that can ever happen again and guarantee that society has moved on, then the key is not to condone or condemn the actions of the day but to understand and interpret them through resources like the Penrhyn archives."