One of Spain’s most competitive and polarised election campaigns since its transition to democracy came to an end on Friday, with the ruling Socialist Party (PSOE) predicted to win enough seats in Sunday’s snap poll to stay in power and keep out the threat from the far right.

Five parties are each on course to win more than 30 of the 350 seats in Spain’s congress – all of whom, in addition to a smaller Catalan nationalist group, have conflicting and potentially irreconcilable views on key issues, such as Catalonia, high levels of unemployment and immigration, and recent feminist trends.

The result could mean a return to political gridlock, particularly as latest polls suggest that neither a feasible left-leaning nor right-leaning bloc may end up with sufficient MPs to assemble a government on its own, without making painful concessions to the other side, or reopening the Catalan independence question.

“Broadly speaking, the outcome is already decided,” Juan Rodríguez Teruel, a senior politics professor at the University of Valencia, told The Independent.

“It’s clear that the Socialists will win the most seats, and I find it difficult to see any alternative right-wing majority.”

“With weaker parties and leaders under increased pressure, our expectations of a workable consensus should be lower, not higher,” he added. “The only parties that can hope for any kind of victory are ones which want to be kingmakers, or thrive off instability or inertia.”

Strikers light fires and clash with police in Catalonia Show all 11 1 /11 Strikers light fires and clash with police in Catalonia Strikers light fires and clash with police in Catalonia Police officers work to remove burning tires that were placed in the road by demonstrators during Catalonia's General Strike AP Strikers light fires and clash with police in Catalonia Police officers work to remove burning tires that were placed in the road by demonstrators during Catalonia's General Strike AP Strikers light fires and clash with police in Catalonia Police officers remove demonstrators who are blocking a road in Barcelona during Catalonia's General Strike AP Strikers light fires and clash with police in Catalonia Police officers remove demonstrators who are blocking a road in Barcelona during Catalonia's General Strike AP Strikers light fires and clash with police in Catalonia Police officers remove demonstrators who are blocking a road in Barcelona during Catalonia's General Strike AP Strikers light fires and clash with police in Catalonia Graffiti reads 'February 21st National Strike' during the Catalan general strike EPA Strikers light fires and clash with police in Catalonia Police officers remove demonstrators who are blocking a road in Barcelona during Catalonia's General Strike AP Strikers light fires and clash with police in Catalonia Police officers remove demonstrators who are blocking a road in Barcelona during Catalonia's General Strike AP Strikers light fires and clash with police in Catalonia Police officers remove demonstrators who are blocking a road in Barcelona during Catalonia's General Strike AP Strikers light fires and clash with police in Catalonia Police officers remove demonstrators who are blocking a road in Barcelona during Catalonia's General Strike AP Strikers light fires and clash with police in Catalonia Police officers work to remove burning tires that were placed in the road by demonstrators during Catalonia's General Strike Reuters

Prime Minister Pedro Sánchez, having led the Socialists to an historic low at the last elections in June 2016, stormed into office 10 months ago after staging a shock no-confidence vote against the then conservative government, backed by left-wing Podemos (now Unidas Podemos) and regional nationalist parties.

Holding less than a quarter of the seats in the Spanish parliament, Sánchez had little choice but to seek a public mandate through fresh elections when Catalan separatists blocked his budget in February, blaming his refusal to sanction a referendum on independence.

However, a further collapse of the left seems no longer likely to materialise, despite initial forecasts that a coalition of parties clamouring for Spanish unity, including far-right insurgents Vox, would repeat their success of last December’s regional election in Andalusia.

Instead, the fragmentation of the right-wing vote, partly a reaction to the Catalan secessionist drive – with swathes of traditional Partido Popular (PP) supporters shifting to Vox or centre-right Ciudadanos – is set to hand the Socialists their first election victory in over a decade.

It’s clear that the Socialists will win the most seats, and I find it difficult to see any alternative right-wing majority Juan Rodriguez Teruel

If Sánchez succeeds this weekend as expected, the 47-year-old – a pragmatist for some and opportunist to the rest – will have the unfavourable task of reaching out for a consensus in a divided Spain, or face going back to the people for a fourth general election in as many years.

On a last dash to Barcelona at the climax of the campaign, the nationwide parties put on rallies at sites chosen to symbolise Catalonia’s cultural and economic ties with Spain, though all sides remained eager to sound uncompromising.

“Pro-independence leaders must stop deceiving the Catalan people,” Sánchez told a rally at a former Olympic venue in the city’s north-eastern heights. “There is not going to be a referendum, there is not going to be independence, nor any breach of the Spanish Constitution.”

On the other side of town, Albert Rivera, whose Ciudadanos party was set up primarily to oppose Catalan independence, accused Sánchez of being a traitor for attempting dialogue with the separatists and urged voters to “kick him out”.

“This is not left against right, but constitutionalism against populism and Catalan nationalism,” he said in a speech at the old docklands, claiming Sánchez would grant a presidential pardon for the Catalan politicians currently on trial following the unsanctioned referendum of 2017.

Meanwhile, PP leader Pablo Casado, who is battling Rivera for his mainstream conservatives to remain the second-largest party, took an even more hardline approach, pledging to revoke Catalonia’s constitutional right to self-rule and labelling Sánchez as a “hostage to those who want to break up Spain.”

Yet, the splintering and then hardening of the right goes beyond Spain’s north-eastern corner, originating from opposition to the PP’s more moderate stance under ex-Prime Minister Mariano Rajoy, and the corruption scandal that caused his government to be ousted last June.

Catalonia President Quim Torra: Catalan separatists trial 'terrible mistake'

The split has been intensified by the rise of Vox, unknowns at the time of the no-confidence vote, which is now aiming to be the first ultranationalist party to gain representation in Spanish national politics since the death of Franco.

In front of around 5,000 converts in Valencia on Thursday, its leader Santiago Abascal ran through a familiar script of far-right policies, similar in substance but tougher rhetorically than the PP: slashing taxes, deporting unregistered migrants, banning abortion and same-sex marriage.

This is not left against right, but constitutionalism against populism and Catalan nationalism Albert Rivera, Ciudadanos

Vox’s demands are drastically different to the aspirations of the Socialists, who appear open to an alliance with Unidas Podemos on the basis of rigorous social reform, though they would still need to contrive to secure the confidence of at least the Catalan nationalists or Ciudadanos.