image copyrightAmgueddfa Cymru
This is a shortened translation of an article published on the BBC News website.
Experts managed to unravel the four-letter code and open an ancient lock found on a sunken ship off the coast of Wales. To do this, they used modern scanning technologies.
The brass lock, which is about 400 years old, was discovered in 1999 by Peter Hughes, who was searching for metal objects using a metal detector. The discovery was made in the sand near Margam in Port Talbot.
The castle is part of a larger treasure from the ship Anne Francis, which was caught in a storm on December 28, 1583, while returning from Spain. The ship's cargo remained buried under the sand for centuries.
Museum experts used CT scans to study the lock's internal mechanism, determine the correct combination of letters, and unravel its secret.
Peter Hughes, from Maisteg, said the castle was one of hundreds of finds he had made over decades of searching on Morva Beach.
The lock was discovered next to a collection of Spanish silver coins and two coin weights. It is assumed that it could have served to protect these items or to lock a chest with valuables that have not survived to this day, such as documents or fabrics.
“It all happened by chance, on a day off. I was walking along the beach with a metal detector and came across a coin,” said Hughes, 69. “Thus began a story that lasted for 21 years.”
End of Most Popular
Hughes admitted that he was “delighted” when the National Museum of Wales Amgueddfa Cymru [a network of seven museums in different parts of Wales]. - Ed.] and Cardiff University managed to unravel the code to the lock, which he himself had unsuccessfully tried to open for many years.
“I’ve been trying to open it for about 20 years. I turned the disks, selected the right combinations, but nothing worked,” he said. “However, thanks to modern technology, we were able to solve something like the Da Vinci code. For me it's like opening the Ark of the Covenant. I’m happy, just incredibly happy.”
“Unraveling the code was like solving a puzzle.”
Dr David Williams, a research fellow at Cardiff University's Faculty of Engineering, admitted he was skeptical when he was asked to try and unravel the lock's secret using a scanning device.
“The task was not easy. Our device is not intended for such purposes,” he said.
“This is micro-computed tomography - essentially the same technology that is used in hospitals, only for examining small objects,” the expert continued.
Williams said he is "always up for a challenge" and enjoys solving puzzles.
“We did the first scan to see if we could see anything at all, and we were quite surprised when we saw the letters,” he said. “The second scan was extremely unsuccessful, but during the third we tried a different approach and were able to determine the code. I was just amazed that we actually solved it."
In 2017, Hughes donated the collection of found objects to the National Museum of Wales (Amgueddfa Cymru). In July 2026, it was exhibited at the Swansea Embankment Museum, with the ancient castle taking center stage.
Senior curator Alastair Willis called the discovery of the code, which consists of the letters ANCE, an "incredible event."
“It's really a very complex mechanism because there are so many possible combinations,” he explained. — The lock consists of four rotating rings, each of which has six different letters. Thus, there are 1,296 possible combinations, with the letters having to be correctly aligned with the shackle at the top of the lock.”
“Additional confusion is created by the letters at the ends of the lock, which remain motionless and have no relation to the code. It looks like they were added specifically to confuse a potential burglar,” Willis added.
His colleague at the National Museum of Wales, senior curator Sian Isles, said the castle was in "excellent condition" and provided a better picture of the era.
“This is a wonderful example of an ancient castle that still works exactly the same as it did hundreds of years ago,” she said. “Because it was found very close to the wreck of the Anne Frances, along with other items from this collection, we can establish the historical context of the find and date it very accurately.
I have seen other similar locks, but they are usually badly damaged by corrosion or have fallen apart into separate parts. This one was perfectly preserved.
The lock is small, so it was probably used to lock a chest or small box. We don't know what was stored in it. And this is also part of the story: some things we will never know. But it is quite obvious that for the person who knew this code, the contents had a certain value.”
Find out more
Video playlist
End Video playlist




