Alfonso's scientific interests—he is sometimes nicknamed the Astrologer (el Astrólogo)—led him to sponsor the creation of the Alfonsine tables, and the Alphonsus crater on the Moon is named after him.
The end of his reign was marred by a civil war with his eldest surviving son, the future Sancho IV, which continued after his death.
Born 23 November 1221[2] in Toledo, Kingdom of Castile, Alfonso was the eldest son of Ferdinand III and Elizabeth (Beatrice) of Swabia.
King Afonso III of Portugal had to surrender,[citation needed] but he gained an agreement by which, after he consented to marry Alfonso X's daughter Beatrice of Castile, the land would be returned to their heirs.
In the end, after Richard's death, the German princes elected Rudolph of Habsburg (1273), Alfonso being declared deposed by Pope Gregory X.
In 1275 Alfonso tried to meet with his imperial vicar in Italy, William VII of Montferrat (who had succeeded Ezzelino) and his Ghibelline allies in Piedmont and Lombardy to celebrate the victory against the Guelph Charles I of Anjou and be crowned in Lombardy; he was however halted in his imperial ambitions in Provence by the Pope who, after a long negotiation, obtained Alfonso's oral renunciation of any claims to the Holy Roman Empire.
According to some scholars Alfonso lacked the singleness of purpose required by a ruler who would devote himself to organization and also the combination of firmness with temper needed for dealing with his nobles although this is not a view taken by all.
[5][additional citation(s) needed] Others have argued that his efforts were too singularly focused on the diplomatic and financial arrangements surrounding his bid to become Holy Roman Emperor.
A bitter civil war broke out resulting in Alfonso's being forced in 1282 to accept Sancho as his heir instead of his young grandsons; only the cities of Seville, Murcia and Badajoz remained faithful to him.
Son and nobles alike supported the Moors when he tried to unite the nation in a crusade; and when he allied himself with Abu Yusuf Yakub, the ruling Marinid sultan of Morocco, they denounced him as an enemy of the faith.
A reaction in his favor was beginning in his later days, but he died defeated and deserted at Seville in 1284, leaving a will, by which he endeavored to exclude Sancho, and a heritage of civil war.
[citation needed] In 1273, he created the Mesta, an association of some 3,000 petty and great sheep holders in Castile, in reaction to less wool being exported from the traditional sites in England.
As a ruler, Alfonso showed legislative capacity, and a wish to provide the kingdoms expanded under his father with a code of laws and a consistent judicial system.
He began medieval Europe's most comprehensive code of law, the Siete Partidas, which, however, thwarted by the nobility of Castile, was only promulgated by his great-grandson.
Because of this, and because the Partidas remain fundamental law in the American Southwest,[7] he is one of the 23 lawmakers depicted in the House of Representatives chamber of the United States Capitol.
"[9] These efforts to make a codified standard of chivalric conduct were likely meant to both encourage strength of arms (prowess) and to restrain the use of violence for only just (state-sponsored) usage.
[11] The very first translation, commissioned by his brother, Fernando de la Cerda—who had extensive experience, both diplomatic and military, among the Muslims of southern Iberia and north Africa—was a Castilian version of the animal fable Kalila wa-Dimna,[12] a book that belongs to the genre of wisdom literature labeled Mirrors for Princes: stories and sayings meant to instruct the monarch in proper and effective governance.
As an intellectual he gained considerable scientific fame based on his encouragement of astronomy, which included astrology at the time and the Ptolemaic cosmology as known to him through the Arabs.
One famous, but apocryphal, quote attributed to him upon his hearing an explanation of the extremely complicated mathematics required to demonstrate Ptolemy's theory of astronomy was "If the Lord Almighty had consulted me before embarking on creation thus, I should have recommended something simpler.
"[15] Gingerich (1990) says that a form of this alleged quotation was mentioned (but rejected) as early as the 16th century by the historian Jerónimo de Zurita, and that Soriano Viguera (1926) states that "nothing of the sort can be found in Alfonso's writings.
[19] Much like his chronicles, the ability of Alfonso's court to compile writings from a variety of cultures and translate them into Castilian left a historic impact on Spain.