The decision was announced shortly before a midnight deadline for parties to register their intention to run as part of a coalition, although they are not required to provide any individual names until June 19.
Since then, Labour Minister Yolanda Diaz has been pushing to rally the hard left behind her platform Sumar (“Unite”).
After days of difficult negotiations, Podemos, which grew out of the anti-austerity “Indignados” protest movement, finally agreed to join the coalition, which includes more than a dozen political groupings.
“This is the broadest agreement ever reached in Spanish democratic history between progressive and ecological forces,” said a statement from Sumar Friday night.
Podemos, once Spain‘s third largest political force in 2015, entered a coalition government with the Socialists in 2020.
But since then, the party’s appeal has been much diminished by a string of disputes and controversies, and its support collapsed during the May 28 local and regional elections.
From Sumar’s perspective, one of the main sticking points in the talks with Podemos had been the role of Equality Minister Irene Montero, the party’s best-known figure.
Some Diaz allies did not want her on the list, and in the end, she was left out.
An outspoken hardliner who has often courted controversy, Montero has faced bitter criticism in recent months, notably over her flagship rape law that paradoxically let some offenders reduce their sentences.
Earlier Friday, Podemos leader Ione Belarra called for the veto on Montero to be lifted, describing it as “not only an injustice but also a serious political error”.
Polls have long tipped the right-wing Popular Party to win next month’s vote, although, without a majority, it would be forced to rely on the far-right Vox to govern.
But the coming together of Spain’s hard left offers Sanchez’s Socialists the hope of pulling together a minority government that could rule with the backing of several regional parties.