BACK in June, after Spain’s second indecisive election in six months, many people expected Mariano Rajoy (pictured), the prime minister, to form a new government quickly. Although his conservative People’s Party (PP) did not win a majority, it remained the largest party, with 137 of the 350 seats in parliament, and was the only one to increase its share of the vote. But summer has come and gone and Spain’s political stalemate is no closer to ending.

In two parliamentary votes, on August 30th and September 2nd, Mr Rajoy fell short of securing a mandate, with 170 votes in favour but 180 against. These votes started the clock for a third election, once seen as unthinkable. If no one can secure a majority by the end of October, parliament will be dissolved and Spaniards will face a Christmas election.

For this, most commentators put the blame squarely on Pedro Sánchez, the leader of the opposition Socialists. His 85 deputies hold the balance of power. But he refuses to allow enough of them to abstain to give Mr Rajoy his mandate. He accuses Mr Rajoy and the PP of betraying Spaniards’ trust and of burdening the country with austerity and corruption.

Mr Rajoy argues that in 2011-15 his government took the tough measures required to return Spain’s economy to growth. Year-on-year GDP growth was 3.1% in the second quarter; for the European Union as a whole it was just 1.8%. Last month Mr Rajoy struck an accord with Ciudadanos, a new liberal party, to crack down further on corruption, reform the judiciary and restore social spending.

So what now? The PP has brushed off suggestions that Mr Rajoy might step down in favour of another of its leaders. The pressure will remain firmly on Mr Sánchez to bend. He hinted that he might seek to form a government himself, with Podemos, a new far-left party. But he failed to do that after the election in December, and the numbers now do not add up.

The party leaders are still struggling to adapt to a new political world, in which a two-party system has given way to a fragmented parliament, while Catalan and some Basque nationalists are set on independence rather than deals in Madrid. The Socialists are split. Several of the party’s regional leaders support abstention; others favour continued opposition. Mr Sánchez’s calculation seems to be that the Socialists would gain in a third election at the expense of Podemos, which may have peaked. Several corruption trials involving former PP officials are due to start in the autumn, which may hurt Mr Rajoy.

This is a risky course for the Socialists. Mr Rajoy rightly charges that Mr Sánchez’s blocking of a government “carries a steep bill which all Spaniards will have to pay”. Spain has already marginalised itself from the EU’s discussions about its post-Brexit future. Without a government, it will be unable to approve a budget for 2017 or meet promises to the EU to cut its fiscal deficit from 5.1% of GDP in 2015 to 3.1% in 2017.

Some Socialists are muttering about forcing Mr Sánchez to shift his stance or go. They have the increasingly shrill support of El País, a newspaper that generally backs the party. The pressure will mount if the Socialists do poorly in regional elections in the Basque Country and Galicia on September 25th. That might induce them to let Mr Rajoy form a government before the late-October deadline. But the chance of a third election is rising steadily.