This is a list of Spanish heads of state, that is, kings and presidents that governed the country of Spain in the modern sense of the word. The forerunners of the Spanish throne were the following:
These lineages were eventually united by the marriage of the Catholic Monarchs, Ferdinand II of Aragon (king of the Crown of Aragon) and Isabella I of Castile (queen of the Crown of Castile). 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 Trastámara, 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–1874), Spain had heads of state known as the President of the Executive Power. However, it is only during the Second Spanish Republic (1931–1939) that the official title of President of Spain (or President of the Republic) existed. Today, Spain is a constitutional monarchy, and there is thus no person holding the title of President of Spain. However, the prime minister holds the official title of President of the Government.