Pablo Iglesias, the pony-tailed leader of Podemos, met with Socialist leader Pedro Sanchez on Wednesday night, their first face-to-face since the fast-growing Podemos party was founded in January 2014.
The talks followed regional and local elections on May 24 in which the ruling Popular Party (PP) suffered heavy losses due to voter anger over corruption, government spending cuts and high unemployment, while Podemos made strong gains, making them potential kingmakers in many regions.
Iglesias and Sanchez have until now shown little more than contempt for one another, with the Podemos leader routinely dismissing Sanchez as a member of Spain's privileged political "caste", while Sanchez has accused Iglesias of being a populist.
But their common goal is to reach an agreement to oust the PP from power in places where they can cobble together a left-wing majority -- especially in Madrid, a conservative bastion and key symbol of power that has been run by the PP since 1991.
Prime Minister Mariano Rajoy's party, which has governed at the national level since December 2011, won the most overall in last month's elections but its support slumped by 27 percent of the vote, from 37 percent four years earlier, and it needs to strike alliances with opponents to govern.
The PP won 21 council seats in Madrid city hall, just one more than the Ahora Madrid coalition that was backed by Podemos.
If Ahora Madrid gets the support of the Socialists, who won nine council seats, their candidate for mayor -- retired 71-year-old judge Manuela Carmena -- would take Madrid city hall instead of the PP's candidate, Esperanza Aguirre, a 63-year-old countess by marriage.
“The talks are continuing, the plenary assembly to constitute a new city council is expected on Saturday June 13," the number two on the Ahora Madrid list, Nacho Murgui, told news agency AFP.
Outside the Spanish capital, an agreement between the Socialists and Podemos would allow left-wing majorities to govern in six or seven regions of the 13 that voted last month, alongside more than 8,000 towns and cities. Spain has 17 regions in total.
The left could also form a government in the southeastern region of Andalucia -- which voted on March 22 but still has not formed a new government -- as well as in about 15 other big cities including Barcelona where female anti-eviction activist Ada Colau is poised to become mayor.
"Nothing is possible with Rajoy's PP," Sanchez told the top-selling daily El País.
"The PP has sidelined many sectors of society and has placed itself on the extreme right," he said.
Sanchez's refusal to back PP governments has angered Rajoy, who on Friday called the rapprochement between the Socialists and Podemos a "tremendous mistake" which has generated uncertainty that threatens to derail Spain's economic recovery.
Justice Minister Rafael Catala echoed that argument on Saturday, saying: "We should be looking for stable solutions, stable governments, governments that guarantee the creation of jobs."
"Rajoy is very nervous because he loses much territorial power as well as the large provincial capitals," said Fernando Vallespin, political scientist at the Autonomous University of Madrid.
'Every decision has a cost'
In a bid to hold onto regional power, Rajoy has met with Albert Rivera, the head of new centre-right party Ciudadanos, which came in fourth place in last month's elections.
The party can play a crucial role, especially in the Madrid region where it could save the right, allowing it to govern with 65 seats, one more than the 64 which the Socialists and Podemos have together.
To not lose the region the PP ordered two of its elected officials who are suspects in a corruption case to step down from their posts, one of the conditions for any alliance set by Ciudadanos which has taken a hard line against graft.
"The winner is Podemos, which is going to end up deciding the political colour of several regional governments," a Socialist lawmaker, who spoke on the condition that he not be named, told AFP.
But he warned that working with Podemos carried risks for the Socialists.
"If it throws itself in the arms of Podemos, it could lose its moderates. Every decision has a cost," he said.
Vallespin said alliances will be "much more difficult" after the year-end legislative election.
"Podemos will not accept that its brand be diluted to allow the Socialists to govern," he said.