In a surprise move, Spanish Prime Minister Pedro Sanchez called a snap election for July 23 on Monday, a day after his Socialists suffered a drubbing in local and regional polls.
Widely seen as a dress rehearsal for a general election that had been expected at the end of the year, Sunday's polls saw the main opposition Popular Party (PP) chalk up the largest number of votes.
The right-wing PP also scored significant gains at a regional level, seizing six regions that had been under Socialist control, including Valencia in the east and the Balearic Islands which includes the holiday island of Ibiza.
In a televised address, a sombre-sounding Sanchez said he had informed King Felipe VI of his decision to dissolve parliament and call a general election on July 23 "in light of the results of yesterday's elections".
"As the head of the government and of the Socialist party, I take responsibility for the results and I think it is necessary to respond and submit our democratic mandate to the popular will," he said.
The results "require a clarification from Spaniards about what policies the government should implement and which political forces should lead this phase," he added.
The snap election will take place some three weeks after Spain assumes the rotating presidency of the European Union, on July 1.
- 'Dismal defeat' -
Oriol Bartomeus, a professor in politics at the Barcelona Autonomous University, said Sanchez was "facing a dismal defeat and now he's changed the playing field."
"The alternative was six months of governmental bloodletting and he has decided to gamble it all," he told AFP.
In office since 2018, Sanchez has faced several obstacles: voter fatigue with his left-wing government, soaring inflation and falling purchasing power in the eurozone's fourth-largest economy.
He has struggled to contain the fallout from repeated crises between the Socialists and their hard-left coalition partner Podemos, which also saw its support collapse in Sunday's vote, losing standing to other hard-left factions in a number of regions.
The PP secured just over seven million votes (31.52 percent) in the municipal elections, compared with nearly 6.3 million for the Socialists (28.11 percent).
"We have won a clear victory and Spain has taken the first steps towards a new political era," said the jubilant PP leader Alberto Nunez Feijoo in a victory speech early on Monday.
But the PP will only be able to govern in several regions with the support of the far-right Vox, also a winner in Sunday's polls -- which poses a major headache for Feijoo.
- Vox's national ambitions -
Vox, the third-largest party in parliament, is hoping to become an indispensable partner for the PP -- both at a regional level and, ultimately, nationally.
Aware that the key to winning the general election is conquering the centre, Feijoo has sought to moderate the PP's line while keeping Vox at a distance.
Over the past year, the PP has governed with Vox in the rural region of Castilla y Leon, where it has been regularly embarrassed by its ultra-conservative positions on social issues, notably abortion.
Sanchez believes he can use the fear of the PP joining forces with Vox at the national level to mobilise voters, said Antonio Barroso, an analyst at political consultancy Teneo.
But it was not clear how the negotiations with Vox to enter regional and local governments would "affect the tendency to vote for the PP" and whether it would have "any effect in mobilising the centrist vote."
Sanchez had criss-crossed the country in recent weeks to announce new measures including affordable housing for the young, more healthcare funding and two-euro cinema tickets for pensioners.
But voters appeared unconvinced by his handling of Spain's economy, despite the fact it has outperformed most other major eurozone peers.
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)