2019–2020 Spanish government formation

Attempts to form a government in Spain followed the Spanish general election of 28 April 2019, which failed to deliver an overall majority for any political party. As a result, the previous cabinet headed by Pedro Sánchez was forced to remain in a caretaker capacity until the election of a new government.

Despite the April 2019 election delivering a clear plurality for left-of-centre parties, with the Spanish Socialist Workers' Party (PSOE) and Unidas Podemos being able to command a majority together with regionalist and nationalist parties, negotiations were frustrated as a result of conflicting positions between the two parties on the future government's composition. Both parties' opposite stances saw Pedro Sánchez trying and failing to pass an investiture vote on 23–25 July. Subsequently, a political impasse set in as King Felipe VI could not find a new candidate to nominate with sufficient parliamentary support. As a result, a snap election was held on 10 November.

The second election delivered a diminished plurality for PSOE and Unidas Podemos, which ended up accepting their shared responsibility and agreed on a joint government two days after the vote. A new investiture attempt on 5–7 January 2020 saw Sánchez re-elected as prime minister after days without an operational government, which would see the formation of the first nationwide coalition cabinet in Spain since the Second Spanish Republic.

Legal provisions
The procedure for government formation in Spain was outlined in Article 99 of the 1978 Constitution: 1. After renewal of the Congress of Deputies, and in other cases provided under the Constitution, the King, after consultation with the representatives appointed by the political groups with Parliamentary representation, and through the Speaker of Congress, shall nominate a candidate for President of the Government. 2. The candidate nominate [sic] in accordance with the provisions of the foregoing paragraph shall submit to the Congress of Deputies the political programme of the Government that he intends to form and shall seek the confidence of the Houses. 3. If the Congress of Deputies, by vote of the absolute majority of its members, invests said candidate with its confidence, the King shall appoint him President. If an absolute majority is not obtained, the same proposal shall be submitted for a new vote forty-eight hours after the previous vote, and it shall be considered that confidence has been secured if it passes by a simple majority. 4. If, after this vote, confidence for the investiture has not been obtained, successive proposals shall be voted upon in the manner provided in the foregoing paragraphs. 5. If within two months after the first vote for investiture no candidate has obtained the confidence of Congress, the King shall dissolve Congress and call new elections, following endorsement by the Speaker of Congress.

Election aftermath
While the April 2019 general election produced a hung parliament, the resulting parliamentary arithmetics coupled with the scale of the People's Party (PP) collapse ensured that the Spanish Socialist Workers' Party (PSOE) of incumbent Prime Minister Pedro Sánchez was the only party that could realistically form a government. The outgoing government had been a PSOE minority cabinet with the external support of Unidas Podemos—the electoral alliance of Pablo Iglesias's Podemos, United Left (IU), En Comú Podem, Equo and other minor left-wing parties—as well as case-by-case support from the smaller regional and nationalist parties; after the election such a scheme could count with the 165 seats garnered by both PSOE and Unidas Podemos, but was hampered by the former's reluctance to reach any deal with Republican Left of Catalonia (ERC), which, together with Together for Catalonia (JxCat), had triggered the April 2019 election by siding with right-of-centre parties to reject Sánchez's 2019 General State Budget. Another possibility was an alliance between the PSOE and the liberal Citizens (Cs) party of Albert Rivera, together commanding an overall majority of 180 seats in the Congress of Deputies, but animosity among grassroot PSOE supporters to such deal (well represented by chants of "Not with Rivera!" during the party's victory celebrations), as well as Rivera's own pre-election veto to any sort of agreement with Sánchez, meant that such a scenario was unlikely.

Both Cs and PP leader Pablo Casado—who described his party's dismal performance as "very bad" but rejected to resign from his post—vyed for the leadership of the opposition to Sánchez's government, with far-right Vox having entered parliament for the first time. As a result of the election, the Spanish right was fragmented into three slices which, even taking regional allies such as Navarrese People's Union (UPN)—running within the Navarra Suma alliance—into account, could only muster 149 seats, far from any prospective shot at forming a government. Rivera quickly rejected any chance of agreement with the PSOE, pointing out that "Sánchez and Iglesias are going to govern with the nationalists", despite attempts from both PSOE and PP to court the party into abstaining in order to allow the investiture process to proceed.

On 1 May, Sánchez arranged meetings with Casado, Rivera and Iglesias within the following days at Moncloa Palace in order to evaluate the post-election situation and probe their parties' stances towards his investiture, with the PSOE's aim being to renew their minority government and sustain it through stable parliamentary agreements with other parties, which would include Unidas Podemos and regionalists. Iglesias, who claimed of having learned of such arrangements throughout the media, demanded as a prerequisite for supporting Sánchez's investiture that a coalition be formed between their two parties, calling for not taking for granted Unidas Podemos's support if such a condition was not met. Nonetheless, following the meetings on 6 and 7 May and with both Casado and Rivera confirming their negative stance to Sánchez's election, Iglesias came out positively that both him and Sánchez had "agreed to work in reaching an agreement". It was commented that Sánchez expected for a new government to be up and running by 20 June, but acknowledged that negotiations and the investiture vote itself would be delayed as a result of the ongoing campaign for the 26 May local, regional and European Parliament elections.

Initial approaches
The sympathetic attitude between PSOE and Unidas Podemos was first put to test in the negotiations for the Congress of Deputies bureau on 21 May, which saw Territorial Policy minister Meritxell Batet becoming new president of the chamber as well as both parties securing a majority of the nine posts at stake (namely, those of the four vice presidencies and the four secretaries), with the PSOE securing three and Unidas Podemos the remaining two.

Aside of PSOE and Unidas Podemos, various regionalist parties also supported Batet and other PSOE members to the Congress bureau: the Basque Nationalist Party (PNV), Canarian Coalition (CCa), Commitment Coalition (Compromís) and the Regionalist Party of Cantabria (PRC), for a total of 175 supportive votes—one short of an overall majority—whereas ERC and EH Bildu cast invalid ballots including the word Llibertat (Catalan for "freedom") in protest for the jailing of several pro-Catalan independence leaders within the context of the judicial process investigating the events surrounding the failed 2017 referendum.

The 26 May elections saw the PSOE securing substantial wins and a number of territorial gains, whereas support for Unidas Podemos-supported candidacies plummeted. This prompted the PSOE to feel strengthened in the government formation negotiations and to ask Iglesias to reconsider his demands for a coalition, with Sánchez proposing a single-party cabinet that incorporated "renowned independents who may be well regarded by progressives", which could see the appointment of Unidas Podemos-proposed members beyond the coalition formula. While the incorporation of Podemos into the government had been generally seen as feasible after the 7 May Sánchez–Iglesias meeting, Iglesias acknowledged that his negotiating position had been weakened by his party's results in the local, regional and European Parliament elections, but insisted on his demand for entering the cabinet nonetheless. Concurrently, the PSOE attempted to pressure Cs into abstaining to ease Sánchez's election in an investiture vote, but this was met with a new rejection from Rivera's party.

June developments
Following the 26 May elections, King Felipe VI held a round of talks with the various parties with parliamentary representation in the Congress of Deputies which saw Pedro Sánchez being formally nominated as prime ministerial candidate on 6 June, which he accepted. Sánchez stressed that there was no alternative to his government and asked PP, Cs and Unidas Podemos for "high-mindedness" and "responsibility" to let him govern. By this point, conversations with other political parties had not seen any advance: CCa had already rejected supporting Sánchez if it meant either a coalition or a programmatic agreement with Podemos, UPN was willing to allow Sánchez's investiture only if he pressured his party's regional branch in Navarre to allow a UPN-led regional cabinet following the 2019 Navarrese election, whereas the position of pro-independence parties—namely, ERC, JxCat and EH Bildu—was dependant on Sánchez's stance towards their jailed leaders. An agreement was quickly reached with the Regionalist Party of Cantabria (PRC), which pledged its support to Sánchez's investiture in exchange for the PSOE renewing its support for Miguel Ángel Revilla as Cantabrian president following the 2019 regional election.

On 11 June, Sánchez met again with the leaders of PP, Cs and Unidas Podemos, this time in the building of the Congress of Deputies, in a move that signaled the formal start of negotiations days after the general election. Both Sánchez and Iglesias emerged from the meeting agreeing to explore the formation of a "government of cooperation", a semantic point that was widely commented in the media because it explicitly excluded the use of the word "coalition", as well as because both leaders committed to such an "innovative" formula without resolving the main friction point between them, namely the entry of Unidas Podemos into the government or its right to appoint cabinet ministers. Soon, both parties clashed on the interpretation of this meeting's conclusions: for Unidas Podemos, what was agreed was to negotiate on the basis of a "plural" and "joint government" that did not exclude an eventual coalition; for the PSOE, it was a government that was "plural, open, inclusive and representative of various sensitivities", but that was to remain a Socialist-only executive with a number of independents that could be agreed with Podemos. PP leader Pablo Casado mocked the "cooperation government" term as "a new parliamentary and administrative kind." A new and discreet Sánchez–Iglesias summit on 17 June saw no advances or specific commitments, but rather "generic exchanges", an offer by the PSOE to award Unidas Podemos "intermediate posts" in the government structure outside the Council of Ministers—which was rejected by the latter—and the finding that the two parties' positions were "very far apart" because of the way in which each group understood the "cooperation".

On 24 June, in advance of a new meeting between Sánchez and Iglesias scheduled for the next day, it transcended that Sánchez had secretly met Casado at Moncloa earlier that day in an attempt to secure his party's abstention in his investiture, but this was met with Casado's negative; Rivera had also been invited to the meeting, amidst growing internal voices within Cs that called for at least considering to enter negotiations with the PSOE, but he refused to attend outright. In the wake of this event and following the meeting between their leaders—the fourth since the April 2019 election—Podemos accused Sánchez of having told Iglesias that he "preferred the right's support or going to a failed investiture without negotiating anything", a statement which was promptly denied by PSOE deputy secretary-general Adriana Lastra, who replied by accusing Iglesias of paving the ground for "voting against a left-wing prime minister". Both parties also hinted at each other's performance during the failed 2015–2016 government formation negotiations, which led to the June 2016 snap election. Finance minister María Jesús Montero warned Podemos that there would not be new opportunities should Sánchez's investiture—scheduled for July—fail, hinting at the possibility of a snap election being needed to unlock the situation, though this heavy-handed tone was brought down by the government the next day.

Rushed negotiations
On 3 July, Pablo Iglesias published a column in La Vanguardia newspaper in which he undertook to review his position for a coalition by September if Sánchez attempted—and failed—to get this proposal succeed in an investiture vote in July. The previous day, Sánchez had agreed with Congress speaker Meritxell Batet to schedule the start of the investiture plenary for 22 July, with successive votings on 23 July and, should a second round be needed, 25 July, despite not having secured the support of any other political group besides the PRC for his election. The next day, Sánchez offered Iglesias to designate a number of "renowned independents" to be appointed as ministers, and on 8 July the PSOE appointed a negotiating team to address programmatic contents with Unidas Podemos on the basis of a document synthesizying the key elements of the Socialist electoral manifesto: employment and pensions; feminism and fight against social inequality; climate emergency and ecological transition; technological advance and digital transition; and Spain's position in Europe. The document left the issue of the Catalan crisis out of the paper, as it was one of the main friction programmatic points between the two parties.

On 9 July, a fifth meeting between Sánchez and Iglesias foundered, allegedly because Iglesias rejected making any sensible additions to the PSOE programmatic proposal and pressed for cabinet posts and the office of deputy prime minister for himself—according to PSOE sources—a claim which Unidas Podemos denied. Concurrently, the PP kept rejecting calls for an abstention to allow Sánchez's investiture, dubbing it as a "bad joke" for considering that Sánchez "broke the spirit of constitutionalist collaboration" when "he relied on pro-independence political parties to be prime minister". On 11 July, Sánchez offered Unidas Podemos the right of appointing cabinet ministers on the condition that they had a "technical profile", which was regarded by Iglesias as a "veto" to the main leaders of his alliance—including himself—and the proposal was rejected. The next day, Podemos announced that it would hold a vote among party members on 18 July to decide what its stance should be on Sánchez's investiture under such circumstances, with almost 70% of participants voting against a single-party PSOE government and in favour of a coalition with Podemos.

Even before the Podemos vote was held, Sánchez dubbed it as a "masquerade" aimed at justifying opposing his investiture as well as a deliberate and one-sided break of negotiations, while accusing Iglesias of being entrenched in a "maximalist position"; he also stated that his offer for accepting Unidas Podemos members of technical profile into his government was to be considered as rejected, and that in no case would he intend to improve on it. Further, he claimed that he would not "accept impositions" and vindicated for himself "the ability to decide who will join [his] government." On the next day, Iglesias replied to Sánchez by demanding his right to enter the cabinet, under the pretense that "Sánchez has never told me that I can't be there".

After several days of back-and-forth declarations, Sánchez revealed that the main obstacles in the negotiations were Iglesias's political positions—"I need a deputy prime minister that does not speak of political prisoners" he said, in reference to Iglesias's defence of jailed Catalan leaders—as well as his demands for a deputy prime ministership in control of the social areas of the government, the ministries of Finance, Labour and the Social Security as well as the responsibilities for government communication; demands that, ultimately, singled out Iglesias as the main impediment for a coalition between PSOE and Unidas Podemos. In response, on 19 July, Pablo Iglesias announced that he would renounce to become cabinet minister "as long as there are no more vetoes and the presence of Unidas Podemos in the government is proportional to its votes", while emphasizing that it was up to his party to choose the members that would be part of any coalition government. Sánchez and the PSOE replied by welcoming this predisposition, but stressed that negotiations should begin on the contents and the programmatic measures and that only then would the government composition be decided. Both PSOE and Unidas Podemos started negotiations against the clock, with only three days to go ahead of the start of Sánchez's investiture debate on 22 July.

First investiture attempt
Initially, negotiation talks went smoothly, with both parties being confident and optimistic on 21 July of an agreement being reached by the time of Sánchez's second investiture voting within four days, in which only a simple majority—that could be achieved with the support of Unidas Podemos, Compromís and the PRC and the abstention of ERC—would be needed for success. With promising advances on programmatic contents, the issue still remained on what Podemos's position in the cabinet would be, with the PSOE stressing its dominance of the so-called "state ministries" (Foreign Affairs, Justice, Defense and Interior) and disputes on the Finance, Labour, Social Security and Ecological Transition portfolios. Pedro Sánchez's investiture debate was scheduled to start at 12:00 CEST (UTC+2) on 22 July with Sánchez's speech, to be followed by the replies of all other parties and a first round of voting on 23 July, with a second and final ballot on 25 July if required.

During the debate, Sánchez and Iglesias clashed on the role their respective parties should have with respect to government. Iglesias warned that his party would not be "humilliated" and that Podemos would not participate in a coalition in which it was a mere "decoration", whereas Sánchez asked Iglesias not to block the investiture if a joint government was not formed so that other options—an investiture-only agreement or a legislature pact without entering the cabinet—could be considered. Sánchez also asked the PP and Cs for their abstention, without success. Albert Rivera's speech against Sánchez was particularly harsh, rejecting to grant him the abstention of Cs by accusing Sánchez of having a "plan" to "criminalize his rivals" and of being the leader of "a gang".

Sánchez lost the first round of voting, only gaining support from the PRC. PNV and EH Bildu abstained, whereas Unidas Podemos joined the abstention bloc as well—a last hour change in position, as Podemos' Congress spokesperson Irene Montero's telematic 'no' vote (she was on maternity leave) revealed—as a "gesture" ahead the second round of voting.

Negotiations resumed in the 48 hours between the first and second rounds of voting, with both parties making offers amid a climate of distrust: Podemos' offer was leaked by the PSOE to the media, and it included demands for a post of deputy prime minister and five ministries (Social Rights, Equality and Economy for the Citizens; Labour, Social Security and Fight against Precariousness; Ecological Transition, Environment and Animal Rights; Tax Justice and Fight against Fraud; and Science, Innovation, Universities and Digital Economy). On the other hand, PSOE's offer included a post of deputy prime minister and three ministries (Housing and Social Economy; Health, Social Rights and Consumer Affairs; and Equality). Neither side accepted to cave in to the other's demands, with negotiations breaking up only hours before the second round was scheduled to be held. The PSOE argued that Iglesias had fooled them by making further demands after they had accepted to cede the Equality ministry to Podemos.

During the second round debate on 25 July, Iglesias launched a new offer to Sánchez: his party would renounce to the Labour portfolio in exchange for being granted control over "active employment policies", while accusing the PSOE of "not having addressed him with the due respect deserved by a government partner" and stating that "it is very difficult to negotiate in 48 hours what has not been negotiated in 80 days, against the clock and leaking everything to the media". On the other hand, Sánchez regretted the persistence of the parliamentary deadlock while affirming that PSOE's offer was generous and "not a humiliation" and criticizing Iglesias for demanding "100 percent of the [government's] social budget" with "25 percent" of the PSOE's parliamentary strength. Sánchez lost the vote, which mirrored the first round of voting—except for ERC, which abstained in an attempt to ease the investiture—opening the way for a repeat election to be held on 10 November.

Inconclusive summer and dissolution
On 26 July, the King chose to postpone any new round of talks "for the time being", refusing to appoint anyone to form a government until political parties were able to reach an agreement for a successful investiture. Concurrently, deputy prime minister Carmen Calvo announced that there would not be any coalition government with Podemos, "as that offer expired yesterday [with the failed investiture]". The only offer that the PSOE would accept from that point onwards was for Podemos to allow a PSOE minority government, while also pressuring PP and Cs to ease Sánchez's investiture in order to avoid a new election. Sánchez chose to delay further negotiations to form a government until mid-August.

In the meantime, the PP rejected further calls for abstaining in a new Sánchez's investiture, but suggested that they could offer such option in the event that the PSOE fielded a different candidate for prime minister. The party's secretary-general, Teodoro García Egea, commented that the King could propose another "consensus candidate" instead of Pedro Sánchez and that it could be someone from "an alliance of constitutionalists, PP and Cs, with the abstention of others". On 10 August, the PP's coomunications vice secretary-general, Pablo Montesinos, insisted on rejecting any chance of his party abstaining to allow Sánchez's re-election, and suggested PSOE's abstention to allow "a constitutionalist, reformist government led by Pablo Casado, in the event that neither Sánchez nor an alternative candidate do obtain the necessary support with their natural partners".

On 20 August, Unidas Podemos sent a new document to the PSOE, proposing "to resume dialogue" and "form a coalition government as soon as possible" after the "shortage of time" prevented an agreement in July. The document offered four possibilities of government structure in the event of a coalition, with Podemos asking for the following portfolios:


 * 1) Deputy prime ministership of Social Rights and Equality; Ministry of Labour, Migrations and Social Security; Ministry of Health; and Ministry of Housing and Social Economy.
 * 2) Deputy prime ministership of Social Rights and Equality; Ministry of Ecological Transition; Ministry of Science, Innovation and Universities; and Ministry of Housing and Social Economy.
 * 3) Deputy prime ministership of Social Rights and Equality; Ministry of Ecological Transition; Ministry of Science, Innovation and Universities; and Ministry of Agriculture, Fisheries and Empty Spain.
 * 4) Deputy prime ministership of Social Rights and Equality; Ministry of Labour, Migrations and Social Security; Ministry of Science, Innovation and Universities; and Ministry of Culture.

The PSOE replied by insisting that the coalition formula was now unfeasible, while further delaying negotiations with Podemos until September.

Both parties met again on 5 September, but no agreement point was found: Podemos' spokeswoman Ione Belarra claimed that "the PSOE maintains its immovable position", whereas its Socialist counterpart Adriana Lastra stated that "we have confirmed our differences". On 10 September, Podemos offered to renounce to its "active employment policies"-proposal and to accept the three ministries that the PSOE had offered them in July (Health, Equality and Housing), but the PSOE insisted in that its July offer was no longer on the table. By this point, Iglesias was said to be "regretful" of having rejected the PSOE's last coalition offer and now proposed a devaluated coalition agreement (with further concessions from Podemos) or even a temporary coalition to prove "they were trustworthy". This was also rejected by the Socialists, who were said to be readying themselves for a new election. Both parties subsequently suspended talks.

On 12 September, the King announced a new round of talks to be held on the 16th and 17th. After realizing that neither Sánchez nor any other candidate could muster a parliamentary majority for a successful investiture, the King refused to nominate anyone, thus ensuring a new election would be held. A last attempt to unlock the situation would come from Cs leader Albert Rivera who, in a surprise U-turn from his previous opposition to allow a Sánchez government, offered on 16 September a "constitutionalist agreement" consisting on the simultaneous abstention of his party and the PP in exchange for the break-up of the newly-formed government of María Chivite, the formation of a government coalition with the Navarra Suma alliance in Navarre, the enforcement of direct rule in Catalonia and a pledge not to raise taxes. The PSOE rejected all these demands by arguing that the party was already committed to constitutionalism, whereas the PP did not join Rivera's offer of a coordinated abstention, thus ending all chances of a successful investiture.

On 23 September, with the deadline for government formation having been reached, the 13th Legislature of Spain came to a close and the Cortes Generales were dissolved by the King the following day, with the election date being set for 10 November 2019.

PSOE–Podemos pre-agreement
The November 2019 election resulted in both PSOE and Unidas Podemos losing ground—falling from a combined 165 seats to 155—in a more fragmented parliament, with both PP and Vox emerging stronger at the expense of Citizens' collapse in support (which led to Albert Rivera's resignation as party leader). As no bloc was able to muster a clear majority, calls surged for a grand coalition to be formed between PSOE and PP immediately after the election. The PSOE ruled out this option as a way to end the deadlock and surprised everyone by announcing a pre-agreement with Podemos for a full four-year coalition government on 12 November.

The negotiations for such an agreement, which would see the first coalition government since the Second Spanish Republic, started on the day following the election and lasted 48 hours under the utmost secrecy, with Sánchez himself accepting to incorporate Podemos' members into the government and with both parties using their common ground during the failed July negotiations as a framework for the agreement. Both parties had their memberships vote on the pre-agreement throughout November: PSOE and PSC members supported it on 23 November with 93% and 95% of valid votes, respectively, whereas the two main constituent parties of the Unidas Podemos alliance—Podemos and IU—approved it with 97% and 90% of the participants on 27 November and between 22 and 24 November, respectively.

Concurrently, ERC asked its members whether it should block Sánchez's investiture "if a negotiation table is not agreed upon first to address the political conflict with the State", in order to raise pressure and increase the price of its consent to a PSOE government. This plan was supported by 95% of ERC members casting a valid ballot.

Within the PP, party leaders considered debating a "patriotic abstention" in Sánchez's investiture on the condition that the PSOE broke up its agreement with Podemos. While some PSOE regional leaders were open to explore this alternative so that their party did not rely on the support of pro-independence parties, the national leadership ignored this proposal as coming too late.

Easening of tensions
Following the approval of the pre-agreement by their memberships, both PSOE and Unidas Podemos engaged in negotiations from the end of November and through December to develop and specify the terms of the coalition, with documents negotiated between the two parties in 2018 and in their July failed negotiations being incorporated to speed up talks.

The easening of tensions between both parties was seen in the constitution of the 14th Cortes Generales on 3 December: Meritxell Batet was re-elected as president of the chamber, while the left was able to secure six out of the nine posts in the Congress bureau—three each for PSOE and UP—thanks to its coordination with other regionalist and nationalist parties (namely, the PNV, the PRC and CCa, but also Más País and New Canaries (NC), which had entered the Congress in the November 2019 election). ERC and EH Bildu kept casting invalid ballots with the word "freedom" in both the Catalan and Basque languages.

With both PSOE and Podemos now endorsing Pedro Sánchez's investiture, the King started a new round of talks with the political parties between 10 and 11 December, resulting in Sánchez being tasked with the formation of a government. This time, unlike the July attempt, the main difficulty for investiture came on the part of ERC and EH Bildu's stances. ERC's abstention or support vote was required for Sánchez's investiture to succeed, but the concurrent protests in Catalonia—a reaction to the Supreme Court of Spain ruling in the trial to independence leaders for the 2017 referendum events—and its coalition government in the Catalan government with hardline pro-independence Together for Catalonia (JxCat)—firmly in the 'no' camp—made ERC's position harder to secure. Further, Sánchez needed for EH Bildu not to block his investiture, though this party accepted to consider its abstention "to prevent the far-right from accessing the Spanish government".

Investiture negotiations
The main negotiations were held between PSOE and Podemos and finalized by 30 December, with a wide range of programmatic measures being agreed. In a document labeled "Progressive Coalition, A New Agreement for Spain", both parties agreed to raise the minimum wage to 60% of the average wage in Spain, to approve a new labour reform that replaced Rajoy's 2012 reform—which was held accountable for an increasing precariousness of working conditions in the labour market—, to increase taxes on the highest incomes (by raising the personal income tax by two points for incomes of more than 130,000 euros and four points for those that exceed 300,000 euros, as well as studying other forms of taxation of large fortunes), to use dialogue as the way to solve the Catalan conflict, to update pensions according to the real CPI and to increase the purchasing power of minimum and non-contributory pensions, to stop abusive rent increases, to protect all vulnerable families in a situation of energy poverty, to progressively eliminate the health co-payments introduced in 2012, to increase public resources for education and scholarships, to abolish Rajoy's Citizen Security Law (most commonly known in Spain as the "gag law"), to recover universal justice—limited by Rajoy's government in 2014—, to strengthen a comprehensive legislative and political framework that "eradicates hate speech and hate crimes" to guarantee the protection of the rights and freedoms of all people, etc. With respect to the cabinet structure, Unidas Podemos was awarded one post of deputy prime minister and four portfolios: Social Rights, Equality, Labour and Universities.

Concurrently, negotiations were held with ERC focused on a political solution for the Catalan issue, starting on 28 November. Initially inclined to vote against Sánchez, the party easened its position throughout the ensuing weeks after several meetings on 3 and 10 December,  and by 2 January 2020 an agreement was reached—which included political concessions and the treatment of ERC as a preferential partner—that allowed ERC's to announce its abstention in Sánchez's investiture. Another agreement was reached with the PNV, compromising its support in exchange for the transfer of competences to Navarre and the Basque Country. The PSOE also secured the support of Más País, Compromís, the BNG, NC and the Teruel-based Teruel Existe platform, as well as the abstention of CCa, whereas the PRC announced that it would vote against Sánchez's investiture in protest to its agreement with ERC. EH Bildu, on its part, supported "giving a chance" to the PSOE–UP coalition government and announced its abstention on 3 January.

Second investiture attempt
Sánchez's investiture debate was scheduled to start at 9:00 CET (UTC+1) on 4 January with Sánchez's speech, with two rounds of voting scheduled for 5 and 7 January. One day earlier, the Central Electoral Commission (JEC) decided on 3 January both to strip Catalan president Quim Torra of his status as regional MP—enforcing a judicial ruling in December convicting him for disobedience, after he refusing to remove a poster in favor of imprisoned Catalan independence leaders from the balcony of the Palau de la Generalitat during the May 26 local elections campaign—and to reject accepting ERC leader Oriol Junqueras's appointment as a MEP.

The investiture vote was expected to be tight. The PSOE denounced an attempt by the right-wing (PP and Vox) to boycott Sánchez's investiture, amid fears that the JEC ruling could influence ERC's decision to abstain. Further complications arose when CCa deputy Ana Oramas chose to disobey her party and vote against the investiture—instead of abstaining—accusing Sánchez of "kneeling before secessionism" and dubbing his investiture agreements as "an offense against the rest of the [autonomous] communities". This move meant that Sánchez's investiture would succeed by a small margin of just two votes. ERC held on to the pressure and argued that they would maintain their decision to abstain despite the JEC ruling, arguing that they would not play as "the useful arm in Congress of an illegal maneuver by PP, Citizens and Vox".

As scheduled, Sánchez did not secure an absolute majority of votes to be elected after the first ballot held on 5 January, but the result, while close (166 voting in favour and 165 against, with one UP deputy being abstent and unable to vote telematically) anticipated a successful outcome in the second round 48 hours later.

The PP engaged in a campaign to pressure Socialist MPs into breaking party discipline and not vote for Sánchez. Teruel Existe MP Tomás Guitarte denounced a series of threats and a massive spamming campaign on his e-mail demanding him not to support Sánchez, to the point that the interior ministry was forced to ensure his protection ahead of the vote. Some media pointed to fears of a new tamayazo—an episode following the May 2003 Madrilenian regional election in which two PSOE MPs did not attend parliamentary meetings amid suspicions of vote buying, thus aborting a mathematical left-wing majority in the Assembly—which the PSOE rejected, though the party nonetheless warned its deputies to remain in Madrid for the duration of the investiture process.

Pedro Sánchez successfully passed the second ballot of investiture on 7 January with the support of 167 MPs to 165 against and 18 abstentions—the closest successful investiture vote since the Spanish transition to democracy.

Aftermath
Sánchez's re-election as prime minister ended the 253-day stalemate and paved the way for the first nationwide coalition cabinet in Spain since the Second Spanish Republic to be formed. Only two months into Sánchez's new term in office, in March 2020, the newly-formed government had to face the outbreak of the COVID-19 pandemic and its impact which, included the COVID-19 recession resulting from the extensive COVID-19 lockdowns implemented to curb the spread of the SARS-CoV-2 virus. Later, the government would have to face the economic impact of the Russian invasion of Ukraine in 2022, as well as growing tensions between both coalition partners—including a succession in the leadership of the Unidas Podemos alliance from Pablo Iglesias to Yolanda Díaz following the former's departure in March 2021—and the troublesome political relationship with pro-independence parties ERC and EH Bildu.

This government experience was brought to an end following the poor results of the left-wing bloc in the 28 May 2023 regional and local elections—mainly a result of Podemos' collapse in support—, which led to a surprise early dissolution of parliament by Pedro Sánchez and the calling of a general election for 23 July 2023.