Spain in the 17th century all contributed to the decline of the Habsburg rule of Spain. The end of the 17th century also brought the end of Habsburg rule. The 18th century began with the War of the Spanish Succession, which concluded in the establishment of the Bourbon dynasty in Spain. In 1469, Ferdinand II of Aragon and Isabella I of Castile united the Crowns of Aragon and Castile into one, creating the early modern Spanish state. Although this ensured future Spanish rulers would rule over both Aragon and Castile, both regions had their own administration and legal systems. In addition, Aragon itself was divided
House of Bourbon at least from the beginning of the 13th century, when the estate of Bourbon was ruled by the Sire de Bourbon who was a vassal of the King of France. The term House of Bourbon ("Maison de Bourbon") is sometimes used to refer to this and the House of Bourbon-Dampierre, the second family to rule the seigneury. In 1272, Robert, Count of Clermont, sixth and youngest son of King Louis IX of France, married Beatrix of Bourbon, heiress to the lordship of Bourbon and member of the House of Bourbon-Dampierre. Their son Louis was made Duke of Bourbon in 1327.