The politics of Spain takes place under the framework established by the Constitution of 1978. Spain is established as a social and democratic sovereign country wherein the national sovereignty is vested in the people, from which the powers of the state emanate.

The form of government in Spain is a parliamentary monarchy, that is, a social representative democratic constitutional monarchy in which the monarch is the head of state, while the prime minister—whose official title is "President of the Government"—is the head of government. Executive power is exercised by the Government, which is made up of the prime minister, the deputy prime ministers and other ministers, which collectively form the Cabinet, or Council of Ministers. Legislative power is vested in the (General Courts), a bicameral parliament constituted by the Congress of Deputies and the Senate. The judiciary is independent of the executive and the legislature, administering justice on behalf of the King by judges and magistrates. The Supreme Court of Spain is the highest court in the nation, with jurisdiction in all Spanish territories, superior to all in all affairs except constitutional matters, which are the jurisdiction of a separate court, the Constitutional Court.

Spain's political system is a multi-party system, but since the 1990s two parties have been predominant in politics, the Spanish Socialist Workers' Party (PSOE) and the People's Party (PP). Regional parties, mainly the Basque Nationalist Party (EAJ-PNV), from the Basque Country, and Convergence and Union (CiU) and the Republican Left of Catalonia (ERC), from Catalonia, have also played key roles in Spanish politics. Members of the Congress of Deputies are selected through proportional representation, and the government is formed by the party or coalition that has the confidence of the Congress, usually the party with the largest number of seats. Since the Spanish transition to democracy, when parties failed to obtain absolute majorities, the tendency was to form minority governments. However, this tendency was broken in 2020 with the formation of the Second government of Pedro Sánchez, formed by members of the Spanish Socialist Workers' Party and Unidas Podemos, as well as independents proposed by both parties. This was the first nationwide coalition government to be formed in Spain since the Second Spanish Republic.

Regional government functions under a system known as state of autonomies, a highly decentralized system of administration (systematically ranked 2nd in the world after Germany at the Regional Authority Index, since 1998). Initially framed as a kind of "asymmetrical federalism" for the regions styled as "historic nationalities", it rapidly evolved into the creation of regions throughout Spain and the devolution of powers to all, widely known as "coffee for everyone". Exercising the right to self-government granted by the constitution, the "nationalities and regions" have been constituted as 17 autonomous communities and two autonomous cities. The form of government of each autonomous community and autonomous city is also based on a parliamentary system, in which executive power is vested in a "president" and a Council of Ministers, elected by and responsible to a unicameral legislative assembly.

The Economist Intelligence Unit downgraded Spain from full democracy to "flawed democracy" in 2022, because of concerns about its judicial independence, given the "political divisions over the appointment of new magistrates to the General Council of the Judiciary (CGPJ)". Spain returned to the label of full democracy in 2023.

According to the V-Dem Democracy indices, in 2026 Spain was the 19th most electorally democratic country in the world.

The Crown

The King and his functions

The Spanish monarch, currently, Felipe VI, is the head of the Spanish State, symbol of its unity and permanence, who arbitrates and moderates the regular function of government institutions, and assumes the highest representation of Spain in international relations, especially with those who are part of its historical community. His title is King of Spain, although he can use all other titles of the Crown. The Crown, as a symbol of the nation's unity, has a two-fold function. First, it represents the unity of the State in the organic separation of powers; hence he appoints the prime ministers and summons and dissolves the Parliament, among other responsibilities. Secondly, it represents the Spanish State as a whole in relation to the autonomous communities, whose rights he is constitutionally bound to respect.

The King is proclaimed by the – the Parliament – and must take an oath to carry out his duties faithfully, to obey the constitution and all laws and to ensure they are obeyed, and to respect the rights of the citizens, as well as the rights of the autonomous communities.

According to the Constitution of Spain, it is incumbent upon the King: to sanction and promulgate laws; to summon and dissolve the (the Parliament) and to call elections; to call a referendum under the circumstances provided in the constitution; to propose a candidate for prime minister, and to appoint or remove him from office, as well as other ministers; to issue the decrees agreed upon by the Council of Ministers; to confer civil and military positions, and to award honors and distinctions; to be informed of the affairs of the State, presiding over the meetings of the Council of Ministers whenever opportune; to exercise supreme command of the Spanish Armed Forces, to exercise the right to grant pardons, in accordance to the law; and to exercise the High Patronage of the Royal Academies. All ambassadors and other diplomatic representatives are accredited by him, and foreign representatives in Spain are accredited to him. He also expresses the State's assent to entering into international commitments through treaties; and he declares war or makes peace, following the authorization of the .

In practical terms, his duties are mostly ceremonial, and constitutional provisions are worded in such a way as to make clear the strict neutral and apolitical nature of his role. In fact, the Fathers of the Constitution made careful use of the expressions "it is incumbent upon of the King", deliberately omitting other expressions such as "powers", "faculties" or "competences", thus eliminating any notion of monarchical prerogatives within the parliamentary monarchy. In the same way, the King does not have supreme liberty in the exercise of the aforementioned functions; all of these are framed, limited or exercised "according to the constitution and laws", or following requests of the executive or authorizations of the legislature.

The king is the commander-in-chief of the Spanish Armed Forces, but has only symbolic, rather than actual, authority over the Spanish military. Nonetheless, the king's function as the commander-in-chief and symbol of national unity have been exercised, most notably in the military coup of 23 February 1981, where King Juan Carlos I addressed the country on national television in military uniform, denouncing the coup and urging the maintenance of the law and the continuance of the democratically elected government, thus defusing the uprising.

Succession line The Spanish Constitution, promulgated in 1978, established explicitly that Juan Carlos I is the legitimate heir of the historical dynasty. This statement served two purposes. First, it established that the position of the King emanates from the constitution, the source from which its existence is legitimized democratically. Secondly, it reaffirmed the dynastic legitimacy of the person of Juan Carlos I, not so much to end old historical dynastic struggles – namely those historically embraced by the Carlist movement – but as a consequence of the renunciation to all rights of succession that his father, Juan de Borbón y Battenberg, made in 1977. Juan Carlos I was constitutional king of Spain from 1978 to 2014. He abdicated in favor of his son Felipe VI.

The constitution also establishes that the monarchy is hereditary following a "regular order of primogeniture and representation: earlier line shall precede older; within the same line, closer degree shall precede more distant; within the same degree, male shall precede female; and within the same sex, older shall precede the younger". What this means in practice, is that the Crown is passed to the firstborn, who would have preference over his siblings and cousins; women can only accede to the throne provided they do not have any older or younger brothers; and finally "regular order of representation" means that grandchildren have preference over the deceased King's parents, uncles or siblings. Finally, if all possible rightful orders of primogeniture and representation have been exhausted, then the General Courts will select a successor in the way that best suits the interest of Spain. The heir presumptive or heir apparent holds the title of Prince or Princess of Asturias. The current heir presumptive is princess Leonor de Borbón.

Legislature

Legislative power is vested in the Spanish Parliament, the (literally "General Courts", but rarely translated as such). "Cortes" has been the historical and constitutional name used since Medieval Times. The qualifier "General", added in the Constitution of 1978, implies the nationwide character of the Parliament, since the legislatures of some autonomous communities are also labeled "Cortes". The are the supreme representatives of the Spanish people. This legislature is bicameral, made up of the Congress of Deputies () and the Senate (). The General Courts exercise the legislative power of the State, approving the budget and controlling the actions of the government. As in most parliamentary systems, more legislative power is vested in the lower chamber, the Congress of the Deputies. The Speaker of Congress, known as "president of the Congress of Deputies" presides a joint-session of the .

Each chamber of the meets at separate precincts, and carry out their duties separately, except for specific important functions, in which case they meet in a joint session. Such functions include the elaboration of laws proposed by the executive ("the Government"), by one of the chambers, by an autonomous community, or through popular initiative; and the approval or amendment of the nation's budget proposed by the prime minister.

The Congress of Deputies

The Congress of Deputies is made up of a minimum of 300 and a maximum of 400 deputies (members of parliament) – currently 350 – elected by universal, free, equal, direct and secret suffrage, to four-year terms or until the dissolution of the . The voting system used is that of proportional representation with closed party lists following D'Hondt method in which the province forms the constituency or electoral circumscription and must be assigned a minimum of 2 deputies; the autonomous cities of Ceuta and Melilla, are each assigned one deputy.

The Congress of Deputies can initiate legislation, and they also have the power to ratify or reject the decree laws adopted by the executive. They also elect, via a vote of investiture, the prime minister (the "president of the Government"), before being formally sworn to office by the King. The Congress of Deputies may adopt a motion of censure whereby it can vote out the prime minister by absolute majority. On the other hand, the prime minister may request at any time a vote of confidence from the Congress of Deputies. If the prime minister fails to obtain it, then the are dissolved, and new elections are called.

Senate