 Although their kingdoms continued to be separate, with their personal union they ruled them together as one dominion.Spain was thereafter governed as a dynastic union by the House of Trastamara, the House of Habsburg, and the House of Bourbon until the Nueva Planta decrees merged Castile and Aragon into one kingdom.During the First Spanish Republic (1873–74), Spain had heads of state known as the President of the Executive Power.