An ornate sword that belonged to a 15th-century warlord in Muslim Spain has been digitized in stunning 3-D.

The sword, which is covered with gold, ivory and precious metals, was used by Ali Atar, a military commander in the service of King Boabdil, the last sultan of Granada. Atar died at age 90 in an unsuccessful attempt by Boabdil’s troops to capture the city of Lucena from Christian forces. Boabdil, also known as Muhammad XII of Granada, was taken prisoner in the battle.

Experts from Spain’s Universitat Politècnica de València (UPV) and 3-D specialist Ingheritag3D created a digital version of the sword, which is in the Toledo Army Museum in central Spain.

SPAIN CRACKS SECRET CODE ON KING FERDINAND'S MYSTERIOUS 500-YEAR-OLD MILITARY LETTERS

Initially, the weapon was photographed from a number of different angles using a technique called photogrammetry. The images were then overlapped and combined with painstaking drawings of the sword’s filigree grip to create the 3-D model.

The experts published their research in the Virtual Archaeology Review.

"These techniques offer the possibility of valuing relevant pieces inside and outside museums, since three-dimensional modelling is prepared both for specialists -who can manipulate the piece virtually, and for being shared publicly and interactively through the Internet," says Margot Gil-Melitón, the study’s co-author, in a statement.

VIKING SWORD DISCOVERY: HUNTER FINDS 1,100-YEAR-OLD WEAPON ON NORWEGIAN MOUNTAIN

The interactive 3-D animation lets viewers rotate a digital version of the sword’s hilt and take a closer look at the elaborate artifact.

Researchers in Spain have shed new light on other aspects of the turbulent period in the country’s history.

Last year, for example, experts announced that secret 500-year-old letters sent by King Ferdinand II of Aragon to one of his military commanders have finally been deciphered. Ferdinand sent the letters to Gonzalo Fernández de Córdoba, known as the Great Captain, during a military campaign in Italy in the early 16th century.

STUNNING 'GAME OF THRONES' SWORD DISCOVERED BENEATH CITY STREET

Spain’s Army Museum called in experts from Spain’s intelligence agency, the Centro Nacional de Inteligencia (CNI), to help decipher the mysterious documents. The letters, which use a combination of 237 letter codes and 88 symbols, had baffled historians.

The king, who is known as Ferdinand the Catholic, is a major historical figure. He played a key role in the ‘Reconquista’ or ‘Reconquest’ that ended centuries of Islamic rule in the Iberian Peninsula. Ferdinand, with his wife Queen Isabelle I of Castile, also sponsored the voyage of Christopher Columbus to the New World in 1492.

CLICK HERE TO GET THE FOX NEWS APP

The monarchs also laid the foundations for the unification of Spain when their two kingdoms were combined in the 15th century. Thanks to his marriage, Ferdinand became King of Castile following Isabelle’s coronation as Queen of Castile in 1474. He also became King of Aragon on the death of his father in 1479.

Follow James Rogers on Twitter @jamesjrogers