Experts have uncovered a rare artifact from World War II, an Enigma machine, used by the Nazis to prevent the Allies from learning their secrets.

The discovery, made by a diving team for the World Wildlife Fund, was made at the bottom of Gelting Bay in northeast Germany, the divers told Reuters. They initially thought it might be a typewriter, but soon realized it was something more significant.

“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,” archaeologist Florian Huber told the outlet.

The Enigma cipher machine found in the Baltic Sea is lying on a table in front of the archaeological office of Schleswig-Holstein. The machine was handed over to the office by research diver Huber after its discovery. (Photo by Axel Heimken/picture alliance via Getty Images)

HIDDEN SILVER FOUND AT 600-YEAR OLD CAST OCCUPIED BY NAZIS DURING WW2

The Enigma machine the divers discovered had three rotors, which means it was used on warships, not German U-boats.

It has since been turned over an archaeology museum in Schleswig.

Enigma machines were a big part of the German effort during the war, used to encode messages about troop movement and other military communications. Several different types of machines were made, but they all had a keyboard and a series of rotors that would alter the letters of those typed in. Other complex additions were added throughout the war. 

Allied efforts to decode the machine, specifically the work of pioneering computer scientist Alan Turing, were depicted in the movie “The Imitation Game.” Turing and his fellow codebreakers at Bletchley Park in southern England developed a machine called the "bombe," which helped decipher the encrypted German messages.

“From mid-1940, German Air Force signals were being read at Bletchley and the intelligence gained from them was helping the war effort,” the Imperial War Museum explained on its website. The German Navy’s communications, however, were more complex and Turing worked to develop a technique he dubbed "Banburismus" to crack the naval Enigma messages from 1941.

Three Poles who worked with Allied codebreakers to crack the German Enigma cipher codes were honored by the Global Institute of Electrical and Electronics Engineers (IEEE) in 2014.

MASS GRAVE OF NAZI SOLDIERS, INCLUDING WWII ARTIFACTS, FOUND IN POLAND

Approximately 250 of them are believed to still be in existence. The Germans were ordered to destroy them at the conclusion of the war, Los Angeles-based auctioneer Nate Sanders, who handled the sale of one such machine, told Fox News in 2019.

CLICK HERE FOR THE FOX NEWS APP

Fox News' James Rogers contributed to this story.