Spain is heading into what could be months of political uncertainty after its Socialist prime minister called a snap general election for April – the country’s third in less than four years – against the backdrop of a continuing Catalan secession crisis.

It was always improbable that Pedro Sánchez, whose administration will be the shortest in Spain’s modern democratic history, would last long. He came to power in June only because his predecessor, the conservative Mariano Rajoy, lost a no-confidence vote after a string of corruption revelations about his People’s Party (PP).

But with just 24% of MPs, Sánchez needed the backing of the anti-austerity Podemos and, critically, Catalan nationalists – whose continuing demands for a referendum on independence were always going to fall foul of the Socialists’ pledge to defend Spain’s constitutional order.

The prime minister’s fragile government finally ran out of options to stay in power this week after talks with Catalan separatist MPs broke down and they opted to join forces with the conservative opposition to block his budget proposals.

What happens after the 28 April vote, which comes less a month before European, regional and local elections in May, is far from clear. Spain’s two most recent elections have both resulted in hung parliaments and weak governments – and the country’s political landscape is now even more fragmented.

Spain's PM calls snap general election for 28 April Read more

For decades, politics in the eurozone’s fourth-largest economy was essentially a two-party business: the Socialists and the PP each took turns in government, with the backing when necessary of deputies from various regional pro-independence parties.

But since Rajoy took office in 2011 with an absolute majority after a landslide victory in the polls, the country’s political map has been torn up.

The emergence of Podemos, followed by the centre-right economic liberals of Cuidadanos (Citizens) and, most recently, the nationalist, far-right Vox party has left five parties on between 10% and 25% of the vote, none of them able to form a government on their own.

A poll of polls for El País newspaper put Sánchez’s Socialists – who have boosted the minimum wage by 22%, promised €2bn (£1.76bn) to fight youth unemployment and launched a major public sector employment programme – in the lead with 24.4%.

The PP - whose new leader, Pablo Casado, this month described Sánchez as a criminal, a liar and a traitor – are lying second on 20.7%, Ciudadanos third with 18%, Podemos and its assorted leftwing and anti-establishment allies fourth with 15%, and Vox fifth with 10.6%.

Complicating matters is the ongoing conflict over Catalonia’s independence, which will play out on the national stage in a way few can foresee. This week’s events coincided with the start of the trial of 12 Catalan pro-independence leaders, on charges of rebellion, sedition and misuse of funds, which is expected to last for months.

Sánchez made reconciliation with the Catalan separatists a key plank of domestic policy, arguing it was essential for central government to rebuild relations with the region – where almost half of voters back independence – after the independence referendum of October 2017 and subsequent unilateral declaration of independence that plunged Spain into its worst political turmoil for four decades.

His efforts did not go far enough for the separatists, however, while giving the rightwing opposition the chance to paint the prime minister as an appeaser.

Most Spaniards and many Catalans reject the regional government’s attempts to break up Spain. More than 45,000 people turned up on Sunday for a “United Spain” rally organised by the PP, Cuidadanos and Vox, whose leaders posed together for photographs.

Many analysts believe one plausible outcome of the elections could be an alliance between the three rightwing parties, who have been vying with each other to shout loudest against Catalan nationalism and will now compete for the votes of the many Spaniards enraged by the separatists’ behaviour.

There is already a precedent: PP and Cuidadanos formed a coalition that, with Vox’s backing, kept the Socialists out after regional elections in Andalusia late last year. If they succeed in doing the same at the national level, those Catalan pro-independence MPs who have long complained of authoritarian rule from Madrid may yet regret voting Sánchez down.