2018 vote of no confidence in the government of Mariano Rajoy

Subsequently, on 5 June, Rajoy announced his resignation as PP leader and his withdrawal from politics after having led the party for 14 years,[5] vacating his seat in parliament and returning to his position as property registrar in Santa Pola.

[6][7] Prior to his ouster, Rajoy had hinted at the possibility that he might not seek re-election for a third term in office, with his ultimate farewell sparking a leadership contest that would see Pablo Casado being elected as new party chairman.

[8][9][10] The Court had ruled that the PP helped establish "an authentic and efficient system of institutional corruption via mechanisms to manipulate public tenders at the national, regional and local level",[11][12] while judging that Mariano Rajoy had not been "truthful" in his testimony as a witness during the trial.

[13][14] The severity of the ruling had prompted Rajoy's then-major parliamentary ally, Citizens (Cs), to publicly withdraw its confidence and supply support from the government and proclaim it as marking "a before and an after" in Spanish politics, prior to the motion's tabling by the PSOE.

[17][18] Joining the string of corruption investigations unveiled in April 2017—that had seen a previous, unsuccessful motion of no confidence being tabled by Unidos Podemos (the political alliance of Podemos and United Left) in June that year—was the transpiring of evidence in March 2018 that Madrilenian president Cristina Cifuentes could have obtained a master's degree in the King Juan Carlos University through fraudulent means, which evolved into a full-fledged scandal by April as both the university and Cifuentes's regional government were found attempting to cover up the scandal through document forgery.

[22] On 22 May, two days before the National Court's ruling on the Gürtel case was made public, former Valencian president Eduardo Zaplana was arrested by the Civil Guard as a result of ongoing investigations for alleged money laundering and bribery crimes.

[26][27] Finally, on 23 May 2018, the day before the ruling's publication, Mariano Rajoy and his government were able to get their budget for that year passed through the Congress of Deputies in a tight 176–171 vote, with the decisive support of the Basque Nationalist Party (PNV) having been secured through a last-hour deal.

[39] Pedro Sánchez's decision to table the motion was taken in the hours following the publication of the court ruling on 24 May, having been persuaded to do so by his closest collaborators following the refusal from Mariano Rajoy and his government to give out any explanations or take any actions in response to the sentence.

[45][46] Sources within the government and the PP acknowledged that the parliament's arithmetics meant that the motion could have a realistic chance of succeeding, as the support of PSOE and Unidos Podemos together with that of peripheral nationalist parties would be enough to win the vote.

[55][56][57] Since it appeared unlikely for Sánchez to collect the support of such a heterogeneous grouping of parties in favour of his candidacy—going from the left-wing EH Bildu and Podemos to the centre-right PDeCAT and PNV—the conviction settled among PP's ranks that the motion would fail.

[58] Numerous inter-party meetings and phone calls took place between 25 and 30 May, seeing the PSOE sending their organization secretary, José Luis Ábalos, to probe the stance of other parties to the motion.

[32][55] Attempts to pressure the PNV saw the PSOE accepting to call an early election as a way to make it appear as if it was attempting to court Cs to its side,[32][61][62] as well as Podemos leader Pablo Iglesias proposing to Cs leader Albert Rivera that, in the event of Sánchez's motion failing to succeed, then their both parties could join to sign an "instrumental" censure motion with the only goal of appointing an independent candidate who would then proceed to call a snap election, with such a proposal being well received by Rivera.

[55][63] However, the latter's leaders were already leaning towards supporting Sánchez's initiative, as a result of the combined efforts from PSOE and Podemos, the swing of ERC and the PDeCAT in favour of the motion and the conviction that they could not politically justify be seen as the ones allowing Rajoy to stay in power.

[32] On 31 May 2018, after having unsuccessfully suggested he resign as prime minister in order to call off the censure vote, the PNV reluctantly confirmed its support for the initiative, making Rajoy's defeat all but certain.

[16][64][65] The PP was thrown into a state of shock and disarray, as within one week the party went from a sense of relief following the approval of the 2018 budget to suddenly facing the prospects of the first successful vote of no confidence in democratic Spain.

[32][69] At lunchtime, Rajoy retreated into the Arahy restaurant close to the Puerta de Alcalá, where he would stay until the night after receiving confirmation from the PNV that they would be supporting the motion, not returning to the Congress for the second part of the debate.

[72][73][74] The next day, Rajoy went to parliament right before the vote to take the floor for one last time, stating that "it had been an honour to be prime minister of Spain" and wishing Sánchez "good luck" in his future role.

Envisaged as a move aimed at thwarting the motion by limiting the time available for negotiations to occur, it instead led to opposition parties being forced to hastily decide their public stance on the vote.

[95] The result of the vote and the motion itself were also regarded as a major blow to Cs's strategical prospects,[96] with the party going from leading most opinion polls during the first part of 2018 to being overshadowed by the new prime minister's rising popularity and media prominence.

Madrid president Cristina Cifuentes during a press briefing on 17 April 2018, just over a week before she resigned.
Prime Minister Mariano Rajoy in a press briefing in the Palace of Moncloa on 25 May 2018, assessing the tabling of the motion of no confidence by Pedro Sánchez earlier that day.
Prime Minister Mariano Rajoy (seated bottom right), with the PP parliamentary group in the Congress of Deputies during the motion's debate on 31 May 2018.
Cabinet photo of Pedro Sánchez 's first government on 8 June 2018.