into being de jure after the Nueva Planta decrees of 1707 that succeeded the multiple crowns of its former realms. After the death in 1700 of Spain's last Habsburg king Charles II, the resulting War of the Spanish Succession led to the ascension of Philip V of the Bourbon dynasty and began a new centralizing state formation. History Beginnings of the empire (1504–1521) In 1504, Isabella I of Castile died, and although Ferdinand II of Aragon tried to maintain his position over Castile in the wake of her death, the Castilian Cortes Generales (the royal court of Spain) chose to crown Isabella's daughter Joanna of Castile as queen. Her husband, Philip I of Castile, was the Habsburg son of the Holy Roman Emperor Maximilian I and Mary of Burgundy. Shortly thereafter Joanna began to lapse into insanity, although the extent of her mental illness was the topic of some debate. In 1506, Philip I was declared jure uxoris king, but he died later that year under mysterious circumstances, possibly poisoned by his father-in-law, Ferdinand II. Since their oldest son Charles was only six, the Cortes reluctantly allowed Joanna's father Ferdinand II to rule the country as the regent of Queen Joanna and Charles. Spain was now in personal union under Ferdinand II of Aragon. As undisputed ruler in most of the Peninsula, Ferdinand adopted a more aggressive policy than he had as Isabella's husband, going on to crystallize his long-running designs over Navarre into a full-blown invasion led initially by a Castilian military expedition, and supported later by Aragonese troops (1512). He also attempted to enlarge Spain's sphere of influence in Italy, strengthening it against France. As ruler of Aragon, Ferdinand had been involved in the struggle against France and the Republic of Venice for control of Italy; these conflicts became the center of Ferdinand's foreign policy as king. Ferdinand's first investment of Spanish forces came in the War of the League of Cambrai against Venice, where the Spanish soldiers distinguished themselves on the field alongside their French allies at the Battle of Agnadello (1509). Only a year later, Ferdinand joined the Holy League against France, seeing a chance at taking both Naples—to which he held a dynastic claim—and Navarre, which was claimed through his marriage to Germaine of Foix. The war was less of a success than that against Venice, and in 1516 France agreed to a truce that