Scientists have cracked the code of a 400-year-old brass lock found on the coast of Wales near the wreck site of the ship Anne Francis. To do so, specialists used computed tomography and were able to study the lock's internal mechanism without damaging it, the BBC reports.
The find was discovered in 1999 by 69-year-old Peter Hughes, who was searching for metal objects with a metal detector.
“It all happened by chance, on a day off. I was walking along the beach with a metal detector and came across a coin,” Hughes said. “That was the start of a story that stretched over 21 years.”
The lock was found in the sand near Margam in Port Talbot, together with Spanish silver coins and two coin weights.

It is thought that the lock may have been used to protect these items or to secure a chest of valuables. The Anne Francis itself was caught in a storm on 28 December 1583 while returning from Spain, after which its cargo remained buried under the sand for centuries.
The lock is fitted with four rotating rings, each bearing six letters. This gives 1296 possible combinations.
Specialists from the National Museum of Wales and Cardiff University were able to determine the correct combination, ANCE, using micro-computed tomography.
“I tried to open it for about 20 years. I turned the dials and tried out combinations, but nothing worked. However, thanks to modern technology we managed to crack something like the Da Vinci Code,” says Hughes.
According to Cardiff University research fellow David Williams, the specialists saw letters during the first scan, but a subsequent attempt was unsuccessful. After changing the scanning method, they were able to determine the code.

Hughes handed his collection of finds over to the National Museum of Wales in 2017. In July 2026 it went on display at the Swansea Waterfront Museum, where the old lock became one of the centrepiece exhibits.
According to the curators, the lock has survived in unusually good condition. It is no longer possible to establish exactly what object it secured, but specialists believe it may have been a small chest or casket of valuables.