After the Spanish general election of 23 July 2023 failed to deliver an overall majority for any political party, extensive negotiations ensued to form a government in the country. As a result, the previous cabinet headed by Pedro Sánchez was forced to remain in a caretaker capacity for 116 days until the next government could be sworn in.
The election failed to provide a majority for either the left-wing bloc, comprising the Spanish Socialist Workers' Party (PSOE) and Sumar, with the support of the Republican Left of Catalonia (ERC), EH Bildu, the Basque Nationalist Party (PNV) and the Galician Nationalist Bloc (BNG), or the right-wing bloc, comprising the People's Party (PP), Vox, the Navarrese People's Union (UPN), and Canarian Coalition (CCa). As a result, Together for Catalonia (Junts) was left as the kingmaker in negotiations. The unexpectedly good result for Sánchez's PSOE and the underperformance of the PP-led right-wing bloc triggered speculation over the future of PP leader Alberto Núñez Feijóo.
Following weeks of political tensions, which saw Sánchez accepting an amnesty law for Catalan separatist politicians convicted or investigated for events related to the 2017–2018 Spanish constitutional crisis and the 2019 Catalan protests, he was able to secure the support of Sumar, ERC, Junts, EH Bildu, PNV, BNG and CCa to be re-elected as prime minister by an absolute majority on 16 November 2023. This was the first time since 2011 that a repeat election was not needed, as well as the first time since that date that a candidate was elected in the first ballot of investiture. Sánchez's re-election and proposed amnesty law sparked protests that lasted for several months into 2024, but were also said to contribute to deflating support for Catalan pro-independence parties in that year's regional election, allowing Socialists' Party of Catalonia (PSC) leader Salvador Illa to become Catalan president.
Legal provisions The Spanish Constitution of 1978 outlined the procedure for government formation, which started with the monarch summoning representatives of the various political groups in the Congress of Deputies to a round of talks or consultations, after which a candidate was to be nominated through the President of the Congress to attempt investiture as prime minister.
Nominated candidates are required to secure the support of an absolute majority in the Congress, or of a plurality in a subsequent vote held 48 hours later. If any of such ballots was successful, the monarch would appoint the elected candidate as prime minister. Otherwise, a two-month period would begin in which new investiture proposals could be attempted under the aforementioned procedure, with parliament being automatically dissolved and a snap election held if no candidate was successful in securing the confidence of parliament.
The procedure for investiture processes was regulated within Articles 170 to 172 of the Standing Orders of the Congress of Deputies, which provided for the investiture debate starting with the nominated candidate explaining their political programme without any time limitations. Subsequently, spokespeople from the different parliamentary groups in Congress were allowed to speak for thirty minutes, with an opportunity to reply or rectify themselves for ten minutes. The nominated candidate was allowed to take the floor and speak at any time of their request during the debate.
Post-election developments Initial positions
Ahead of the 2023 Spanish general election, opinion polls predicted a majority for the People's Party (PP) and Vox. When this failed to materialize, both the PP and the ruling Spanish Socialist Workers' Party (PSOE) claimed the right to form a government. The possible outcomes discussed following the election were: An alliance of PP, Vox and the Navarrese People's Union (UPN), comprising 171 seats. A PSOE–Sumar coalition with support from the Republican Left of Catalonia (ERC), EH Bildu, the Basque Nationalist Party (PNV) and the Galician Nationalist Bloc (BNG), comprising 171 seats. Parliamentary deadlock lasting for two months from a first failed investiture ballot, leading to a new general election to be held towards the end of 2023 or in early 2024.
The Canarian Coalition (CCa) was seen as a possible part of either bloc, depending on negotiations. Other possible solutions, such as a grand coalition or the abstention of PP or PSOE in the other's investiture, were seen as unfeasible. As a result, Together for Catalonia (Junts), led by the fugitive former Catalan president Carles Puigdemont, was widely regarded as the kingmaker, with both blocs needing their seven seats to form a government, likely in exchange for concessions on Catalan independence. Míriam Nogueras, the Congress spokeswoman for Junts, said that her party "was not born to stabilise the Spanish State, but so that Catalonia may be an independent country", adding that her party's vote for Sánchez's investiture would not be given for free.
Feijóo expressed his intention to seek investiture if tasked by the King to form a government, despite difficulties. Having previously called for an end to sanchismo, the PP then asked PSOE to allow Feijóo's investiture, as they had done for Mariano Rajoy during the 2016 government formation process. The PSOE promptly rejected this request as impossible after "years of insults", and described it as an attempt by Feijóo to "cover up his failure" by pretending he could command sufficient support. Feijóo warned of the "breakup" of Spain if Sánchez was confirmed as prime minister with the support of pro-independence parties.
On 24 July, CCa spokeswoman Ana Oramas expressed her party's initial refusal to support a "ghost government" of Feijóo, stating that "there is no possibility that Feijóo will be prime minister". This rejection was echoed hours later by Andoni Ortuzar, the president of the PNV, which refused even to enter talks with the PP. Vox stated on 26 July that they could enable Feijóo's investiture "if he could convince a couple of PSOE's deputies" to vote for him, while warning that they would not give the "patriotic vote" of their 33 deputies for free. On 25 July, Arnaldo Otegi, the leader of EH Bildu, announced that his party's six deputies would vote for Sánchez and the PSOE during the investiture vote. ERC said it was favourable to Sánchez's investiture, pending a vote among its membership, while the BNG announced it could vote for Sánchez to avoid a right-wing government, but without granting him a "blank cheque".
Feijóo's unlikely alliance The PP's result in the election—well below expectations of reaching above 150 or 160 seats—triggered criticism of Feijóo's performance as party leader. During election night, party supporters interrupted Feijóo's hastily reworked victory speech with chants of "Ayuso, Ayuso!", in reference to Isabel Díaz Ayuso, the Madrilenian president, who some within the party and the Spanish right-wing saw as a possible successor as PP leader.
Former Madrilenian president Esperanza Aguirre said during an interview that the election result was attributable to Feijóo's strategy of "seeking to reach out to the PSOE rather than governing with Vox", and commented that Ayuso was the future of the party and of Spain. Ayuso herself acknowledged on 26 July that she had received messages asking her "to take a step forward", but said she was not thinking of challenging Feijóo's leadership. "It cannot be that on Thursday we are giving him our support and applauding him [at a rally], and now throwing him off a bridge", she said. However, she warned Feijóo against seeking an agreement with the PSOE, commenting that "you cannot reach a deal with the disaster". On 27 July, party secretary-general Cuca Gamarra criticized Aguirre's remarks as outside the party's unity and discourse.
Some commentators voiced doubts over whether Feijóo would be willing or able to remain in opposition in the event that Sánchez was able to secure a second term in office. Following the counting of the expat vote, one seat in Madrid was flipped from PSOE to PP, meaning that Sánchez's investiture would require an affirmative vote from Junts, not just an abstention. The PP then U-turned on its previous hardline stance towards Junts on 29 July, expressing willingness to engage in talks with Puigdemont's party "within the Constitution's framework" in order to invest Feijóo as prime minister, though this was later ruled out by Gamarra. That same day, Puigdemont tweeted that his party would not be convinced by "political blackmail", and saw only three possibilities out of the deadlock: Junts voting in favour of Sánchez, the PSOE allowing Feijóo's investiture, or a repeat election. Sánchez and the PSOE were said to be in no hurry, instead allowing Junts time to "reflect" on their options as Feijóo exhausted himself looking for support.
On 30 July, Feijóo sent an official letter to Sánchez, softening the tone his party had maintained against him for years, and asking for a meeting the following week to negotiate a solution that allowed the party with the most votes to govern. Sánchez wrote back the same day noting that, in a parliamentary democracy, "it is whoever secures the most support in Congress, and not the most votes, who is entitled to govern", and reminding Feijóo of the multiple PP–Vox agreements reached in previous years throughout Spain in which the PP did not finish in first place. Sánchez said he would wait until the Congress convened for the new parliamentary term on 17 August, and the King nominated a candidate for investiture, before meeting Feijóo, "as well as the rest of spokespersons of the parliamentary groups with representation".
By 31 July, Feijóo's investiture became increasingly unfeasible. CCa, until then considered as a likely Feijóo ally, expressed its willingness to negotiate an investiture agreement with Sánchez, on the grounds that, while it rejected any government that included either Sumar or Vox, it felt closer to Yolanda Díaz's party than to Santiago Abascal's. UPN leader Javier Esparza, who had pledged his party's support to Feijóo, acknowledged that, while it was legitimate for Feijóo to continue seeking support for his investiture, it was unlikely for him to be elected prime minister "in any of the scenarios", and said Feijóo could not "keep fooling people". The same day, Vox attacked Feijóo, blaming him for the failure to win a right-wing majority in the election and accusing him of "deceiving all Spaniards". The party's secretary-general Jorge Buxadé said that "Feijóo spent the campaign talking about how he was close to an absolute majority, encouraged by his own rigged opinion polls". This came after it was revealed that Feijóo and Abascal had met secretly after the election to analyze the results.
On 6 August, Abascal offered to support Feijóo's investiture for a minority government without demanding cabinet posts for his party "in order to prevent Sánchez from being elected with the support of Spain's enemies", a reference to pro-independence parties. However, party members acknowledged this unconditional support was offered due to Feijóo having no chance of being elected. The next day, the PP attempted to use the possibility of a government without Vox as leverage to gain the PNV's support, to which the PNV replied that they had expressed their opposition to Feijóo's investiture "with crystal clarity" on 24 July.
Parliamentary setup Media focus centered around the possible outcome of the vote for the Congress bureau when the chamber reconvened on 17 August, while the PP's absolute majority in the Senate ensured control of the latter's bureau. Both PP and PSOE attempted to secure the support of minor parties for their candidates to the post of president of the Congress of Deputies: the PP fielded Cuca Gamarra as their candidate, while the PSOE nominated former president of the Balearic Islands, Francina Armengol.