An extremely rare and fully operational World War II Enigma machine has just fetched a world record £367,000 at auction.

Beating the previous record of around £2780,000, the M4, is one of the rarest enigma machines and was designed for use by the German Navy during the second World War after it was discovered that the security of the Naval M3 had been compromised.

The M4 was reserved for deployment by U-boat forces on land and at sea to enable secure communication with the U-Boat fleet and this particular model is in such fine condition that it is believed to have been used at an on shore base.

There is only believed to be around 120 or so enigma machines to actually survive the war, out of the estimated 1,500 that were built by Nazi Germany. Most being in the hands of museums or governments, this sale represented a very rare opportunity to own such an iconic piece of history.

Bonhams, who hosted the auction stated that the model M4 was made rarer by the sinking of 70% of German U-boats in the later stages of World War II, in part down to the breaking of the Enigma code.

The early Enigmas had three interchangeable rotors that scrambled plain-text messages to produce a cipher text message, which was then sent via Morse code to a receiver machine with the same settings.

The three rotor code was broken early on in the war by the code breakers at Bletchley Park but when the M4 came into use on February 1, 1942 it took over nine months for Bletchley to crack the new code.

Bletchley Park’s code breaking unit was recently the feature of 2014 movie, The Imitation Game, starring Benedict Cumberbatch as British crypanalyst, Alan Turing, who would become the father of modern-day computer science and artificial intelligence.