In a surprise move, Spanish Prime Minister Pedro Sanchez has called a snap election for July 23, a day after his Socialists suffered a drubbing in local and regional polls.
In a televised address on Monday, 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.
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.
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.
Opposition makes significant gains
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.
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.