500-year-old code used by Spanish King Ferdinand II cracked King Ferdinand II used the code to talk about war strategy.

 -- A secret code used by the famed Spanish King Ferdinand II to discuss wartime strategy has been cracked, Spanish officials confirmed to ABC News.

In 2015, experts asked CNI to help in their attempt to decipher the codes of two letters written in 1502 and 1506, according to a spokesperson for The Army Museum of Toledo.

The codes were used during the wars of Italy by the "Catholic King."

"These two letters now analyzed, allow experts to fully understand the military instructions and tactics discussed by the King Ferdinand II and his commander," the spokesperson for The Army Museum of Toledo confirmed. "We also understand better the kind of threats they were fearing."

The mysterious coding system was deciphered by The Spanish Intelligence Agency called El Centro Nacional de Inteligencia, or CNI. The agency said the centuries-old code was used by the King of Aragon at the beginning of the 16th century to transmit informations and strategies to his army commander Gonzalo de Cordoba, during the Italian campaigns.

The Catholic King expressed his disagreements with his commander's strategies during the Naples campaign, in which the French tried to make an incursion, in the texts.

"In these letters, we understood the King was feeling threatened for the future of his Kingdom," the spokesperson said. "The King of Aragon was a perpetual conqueror and was also sponsoring Christopher Columbus and his path of the New World."

The type of code used was called "Vigenère" with a method of encrypting alphabetically, the agency said.

The first attempt to decipher the letters appears to have been made in the 19th century by Gustave Bergenroth, a German historian and "patient non professional decipher," who found the code key of the "Great Captain" of the King Ferdinand II.

A copy of the book is still at the National Library of Madrid and is called "Cartas de Gonzalo Fernandez de Cordoba a diferentes personas," which translates to "Letters of Gonzalo Fernandez de Cordoba to different people."

Since the coding system has been fully decoded and disclosed by CNI, experts can now translate several different letters exchanged by the King and his commander during the time in history when Spain and France were fighting for territory.