More than 400 years after an English merchant ship ran aground off the coast of Wales, researchers have deciphered the combination of a lock recovered from the wreckage — and successfully opened the latch.

The researchers determined the code, “ANCE,” using micro-CT scanning to peer into the lock’s mechanisms without harming the centuries-old device. The technology allowed them to clearly distinguish the lock’s individual rotating rings and internal components.

“We could see the shapes of the letters on the outside of the rings in the CT scans, as they were impressed into the brass,” David Williams, a research associate at Cardiff University’s School of Engineering, said in an interview. “By identifying the internal notches and matching their positions to the letters on each ring, we were able to determine the correct four-letter combination.”

What ANCE means, if anything, remains a mystery. Still, the revelation offers a vivid historical detail of the goods that sailed on the , which met its end on December 28, 1583 as it returned to Norfolk from Spain. A fierce storm blew the Elizabethan vessel off course and it wrecked on Margam Beach, near Port Talbot, killing 14 sailors.

The lock is believed to have fastened a wooden chest that may have contained valuable items that didn’t survive the wreck, like documents and textiles.

Artifacts from the wreckage that did endure are currently on view as part of Tides of Treasure, an exhibit at the National Waterfront Museum in Swansea, Wales, displaying relics from the Ann Francis publicly for the first time. These remnants include a boatswain’s whistle and historic gold coins dating back to the reign of Ferdinand and Isabella of Spain.

Between 1996 and 2017, metal detectorist Peter Hughes found a bulk of the ship’s hoard — about 870 gold and silver coins, maritime equipment, utensils — after storms stripped away layers of sand on Margam Beach. Among scattered Spanish coins, he spotted the lock, whose rings could still rotate despite spending more than four centuries buried in the sand.

“When I moved the ring dials of the combination they turned with ease after over 400 years beneath the sands and I was left in disbelief.” Hughes said in a statement.

Turning the ring dials proved exciting, but opening the lock posed challenges. That’s where Cardiff University’s Musculoskeletal Biomechanics Research Facility came in. Although its researchers primarily study human biomechanics, they also use the lab’s advanced scanning equipment to examine fossil fragments and animal remains for archaeology and conservation projects.

Amgueddfa Cymru, a charity that runs seven museums in Wales, worked with facility researchers to open the lock.

“In principle, the combination could have been found through trial and error,” university researcher Williams said. “However, with four rings and six letters on each, there were 1,296 possible combinations, and this assumes you knew exactly where the letters needed to align. Repeatedly manipulating such a delicate historical object could also have risked damaging it.”

ForbesCT Scans Reveal Hidden Ailments Of 2,300-Year-Old Egyptian Mummies

Micro-CT works on the same principle as computed tomography medical scanners, which use rotating X-ray beams and computers to create multiple cross-sectional images, allowing doctors to see inside patients slice by slice to gauge injuries, diseases and degeneration without cutting them open. In February, radiologists at the University of Southern California conducted full-body CT scans on two ancient Egyptian mummies to investigate what ailments they may have suffered from.

Imaging dense materials such as brass can pose a challenge for CT scanners because they absorb X-rays differently than less dense materials like bone. For that reason, Williams was skeptical when first approached about using the university’s equipment to unlock the artifact’s mysteries.

“I was amazed that we’d actually cracked it,” Williams said, “and it was particularly satisfying to hear from the museum team later that evening that the combination had worked and they’d managed to open the lock.”