A group of divers from the World Wildlife Fund found more than they bargained for last month during a routine removal of abandoned fishing nets near Denmark’s Gelting Bay.

After believing they had found an old typewriter, the group soon realized that they had, in fact, stumbled upon a rare Nazi encryption device used during the Second World War—an Enigma machine.

“I’ve made many exciting and strange discoveries in the past 20 years. But I never dreamt that we would one day find one of the legendary Enigma machines,” underwater archaeologist Florian Huber told Reuters.

During World War II, “the Germans placed their faith in Enigma, a machine capable of generating a code so complex that they considered it unbreakable,” writes historian Mark Grimsley. “Yet the British did manage to break it.

By April 1940 the Allies were beginning to crack some of the German codes, thanks in large part to the Polish secret service, which, during the interwar period, managed to create a copy of the basic German enciphering machine before smuggling it across the border to France and eventually to Britain.

In April 1940, a team of British team codebreakers at Bletchley Park, led by Alan Turing, managed to decipher portions of code used by the Wehrmacht. Still, the Kriegsmarine was tougher to crack. By February 1942, the Germans had “shifted to Triton, a more complex Enigma variant the British couldn’t read,” writes Grimsley.

It wasn’t until October of that year—when the Royal Navy captured the German sub U-559—that the Allies caught a break. On board the sub were—by chance—the exact documents the British needed to crack the Triton code.

The work done by Turing and other codebreakers is credited with shortening the war by several years and saving hundreds of thousands—if not millions—of lives.

With the impending defeat of the Axis powers, German crews were ordered to scuttle their U-boats and destroy all other intelligence and encryption devices on board. Of the more than 200 destroyed in the North and Baltic Seas by war’s end, nearly 50 submarines were scuttled in Gelting Bay.

“We suspect our Enigma went overboard in the course of this event,” Huber told Reuters.

Although thousands of these encryption devices were made over the course of the war, very few exist today.

On Friday the Enigma machine found by the WWF was given to an archaeology museum in Schleswig where Ulf Ickerodt, the head of the state archaeological office in Germany’s Schleswig-Holstein region, told AFP the museum hopes to restore the rusted machine after seven decades on the sea floor.