Electoral setbacks for the PSOE in the Basque and Galician regional elections held on 25 September 2016 unleashed a party crisis which led to Pedro Sánchez 's ouster as leader on 1 October . An interim party leadership was appointed , which chose to abstain to allow government formation and prevent a third general election . As a result , Mariano Rajoy was re-elected as Prime Minister for a second term in office on 29 October amid public outcry and protest at PSOE 's U-turn , which was also met with opposition from within the party — 15 MPs eventually not complying with the party 's directive and voting against Rajoy nonetheless . Rajoy 's government would only last for 20 months until 2018 , as public outcry at the emergence of new corruption scandals and judicial blows to the ruling party would prompt Sánchez — who would secure re-election as PSOE leader in June 2017 — to bring down the PP government in the first successful motion of no confidence since the Spanish transition to democracy
first successful motion of no confidence
2018 vote of no confidence in the government of Mariano Rajoy
2016 Spanish general election