A third election during the Christmas period was narrowly averted when the opposition Socialist party (PSOE), with 85 of the 350 seats in parliament, reluctantly agreed eight days before the 31 October deadline for triggering a new poll, to abstain at the investiture vote and so enable the PP, with 137 seats, to continue at the helm. Had there been a third election Spain might have rivalled the 541 days it took Belgium to form a functioning government in 2010-11.
Given the wrangling, the result of two new parties –the far left Unidos Podemos and the centrist Ciudadanos (C's)– upending the two that have dominated political life for more than 30 years, 2016 has been a lost year. These two parties in the deeply fragmented parliament have 71 and 32 seats, respectively.
“The latest forecast puts next year's deficit at 3.6 percent, well above the 3.1 percent agreed with Brussels”
Ciudadanos agreed after the June election to allow the PP to remain in government, in return for some reforms, but their seats were not enough to carry the day. Hence the Socialists' grudging abstention, but only after their leader, Pedro Sánchez, was ousted in October for persistently refusing to back the PP. He also failed to come up with a realistic alternative government and rejected a third election where the Socialists risked being overtaken by Podemos, which would be a devastating blow.
Mariano Rajoy was sworn in for his second term on October 31st. Photo: AFP
The Ibex-35, the benchmark index of the Spanish stock market, greeted the end to the impasse with a rise of more than 1 percent and Spain's risk premium declined. But the political gridlock is not over.
Parliamentary life will now be much more vibrant, as the PP's loss of the absolute majority of 186 seats it enjoyed in the previous parliament means it will have to fight for every law it hopes to pass. Even with C's support, and this is not guaranteed all the time, the PP is still seven seats short of a majority. This is an unprecedented situation and depending on how it evolves could be a healthy one if it forges a much-needed culture of consensus.
Polls show that Spaniards do not want to return to the two-party system and nor are they enamoured of governments with an absolute majority, whatever the political colour.
The PP will also not be able to rely on the so-called royal decrees (emergency laws), which it used (abused in the view of opposition parties) between December 2011 and December 2015 more than any other government, even though it had an absolute majority.
The government's first test, and a crucial one, is to approve the 2017 budget and finally meet the EU deficit threshold of 3 percent of GDP. In the absence of a functioning government, and with a worried European Commission (EC) demanding a plan for 2017 by the middle of this month, the PP basically rolled over the 2016 budget.
The PP was supposed to lower the budget deficit to 3 percent this year, but that proved to be impossible after the government missed the targets in 2014 and 2015. Under the latest deal with the EC, the deficit has to be below 3 percent in 2018 or Spain will face a fine, which it narrowly missed this year. The latest forecast puts next year's deficit at 3.6 percent, well above the 3.1 percent agreed with Brussels. The PP needs to find €5.5 billion of tax rises or spending cuts.
Other pressing issues in the government's in-tray include reforms to prop up the ailing social security system (whose deficit is a major contributor to the overall budget deficit), particularly state pensions. The special reserve built up during the boom to help pay pensions during times of crisis will be depleted by the end of 2017. The mechanism for reforming the social security system is the all-party Toledo Pact, first signed in 1995.
There is still a tremendous reluctance to change the 1978 constitution and rewrite the rules between the state and the regions
Even more contentious is what to do about Catalan demands for a referendum on independence which the region's government is planning to hold next September whether the government agrees or not. Barcelona's every step in its roadmap of laws for an independent state, approved by a regional parliament with a majority of seats held by pro-secessionist parties, is being opposed by the Constitutional Court in Madrid.
The PP did not let this issue out of the courts and into the political arena in its last government, but that may change now the party no longer has an absolute majority. There is still, however, a tremendous reluctance to change the 1978 constitution and rewrite the rules between the state and the regions, not the least reason being that it runs the risk of opening up a Pandora's Box of competing demands.
The education system –with an early school-leaving rate of 20 percent, double the EU average but well down on a peak of 31 percent by 2009 at the height of the economic boom when pupils had moved en masse from the classroom to building sites– needs to be overhauled.
Measures to tackle corruption, perceived as endemic in the PP and the Socialist party, are also on the agenda. This is a particularly key issue for C's as it agreed an anti-corruption pact with the PP earlier this year in return for supporting a new PP government. The PP is currently under intense scrutiny in the so-called Gürtel case of kickbacks for contracts.
In foreign policy, Spain has been largely absent in the debates about the EU's future, following the UK's Brexit decision. Its voice has been loudest on one particular issue, dear to the heart of the PP but not to the rest of the EU, and that is the call for Gibraltar, a UK overseas territory long claimed by Madrid, to share sovereignty with Spain as the only way post-Brexit for the Rock to still have access to the single market.
No one is confidently predicting in these new circumstances that the new government will last the normal course of four years. If the same gridlock that prevented the forming of a new government for 10 months hits parliament then a frustrated PP could call an early election. Whether it would increase its share of the vote, as polls showed had a third election gone ahead in December, and even perhaps win a governing majority, may well depend on how the other parties shape up.
This analysis was written by William Chislett, Associate Analyst at the Elcano Royal Institute and first published on the Institute's website. For more insightful analysis follow @WilliamChislet3 on Twitter.