King Ferdinand II of Aragon
King Ferdinand II of Aragon Wikimedia

Spain's intelligence service has cracked the code used by King Ferdinand II of Aragon in letters to his top military commander, 500 years ago, solving one of the "great mysteries" of Spanish history, ABC reports.

The code, which consists of more than 200 special characters, has mystified historians for centuries. Researchers say the achievement is significant as it could lead to more of Ferdinand's undeciphered letters being unravelled.

The letters between Ferdinand and Gonzalo de Córdoba include strategic instructions relating to Spanish military campaigns in Naples in the early 16<sup>th Century – part of the kingdom's long-running war with France for control of the Mediterranean. Spain took control of Naples in 1504 and held the territory until 1647.

At the time, it would have taken 15 days for the king's letters to reach his commander in south-eastern Italy. In this context, the code was a useful tool for keeping the instructions secure should they ever fall into enemy hands during the long journey.

After the documents – some of which were more than 20 pages - went on display at Spain's Army Museum in Toledo, where experts from the National Intelligence Centre (CNI) were asked to decipher them. After nearly six months scrutinising letters written between 1502 and 1506, they finally managed to crack the code.

The coding system was incredibly complex, using 237 special "combined letters" and 88 different symbols, including shapes and numbers. Each letter of the alphabet could be represented by between two and six of the combined letters or symbols. In addition, no spaces were used between words and phrases.

King Ferdinand is one of Spain's most famous monarchs, responsible for both completing the centuries-long reconquest – or Reconquista – of the Iberian peninsula from the Moors in 1492, and sponsoring Christopher Columbus' first voyage to the Americas.