Spanish Prime Minister Pedro Sánchez’s chances of getting reelected after a July election have received a potentially important boost following an agreement between more than a dozen small leftist parties to run on a joint ticket, a deal that is expected to provide key support for Sánchez's Socialists in any post-election negotiations to form government.

The deal signed late Friday ended days of intense negotiations and was sealed at the last moment with an agreement between Deputy Prime Minister Yolanda Díaz’s newly formed alliance, Sumar, and the Socialists’ small but influential far-left coalition partner, United We Can, or Podemos.

Podemos and 14 other groups would form part of the Sumar alliance for the election, Sumar said.

SPANISH PM BACKS COLOMBIAN PRESIDENT’S PEACE PLAN

Sumar, which means to add or unite in Spanish, was to be officially registered later Friday as a political group to compete in the election.

Sánchez called an early general election for July 23 last week after the Socialist party and United We Can took a serious battering in local and regional elections on May 28.

The fragmentation of parties to the left of the Socialists was blamed for many of the regional and local election losses.

Pedro Sánchez

Socialist Spanish Prime Minister Pedro Sánchez's re-election prospects may be improved after more than a dozen small leftist parties have agreed to run on a unity ticket. (AP Photo/Bernat Armangue, File)

The May vote saw Spain swinging strongly to the right, turning the leading opposition conservative Popular Party, or PP, into the country’s main political force.

Most polls tip the PP to win in July but predict it will need the support of the extreme right party Vox.

But the new deal among the country’s small leftist parties could help Sánchez work out a new coalition government, especially given that Díaz and Sánchez are two of the country’s most popular politicians.

RECORD-BREAKING HEATWAVE, DROUGHT PLAGUE SPAIN, THREATENING ECOSYSTEMS AND AGRICULTURE

"While a PP-led government following the elections is the most likely scenario at this stage, a surge in support for the left-wing parties could still help Sanchez stay in power," said Antonio Barroso, deputy research director the London-based Teneo think tank, in a note this week.

"Without such a (leftist party unity) deal, the spreading of votes among different parties would probably penalize the left, making it easier for the PP and Vox to reach the 176-seat threshold," for a majority in Parliament, he added.

Sumar didn't run in the May elections.

CLICK HERE TO GET THE FOX NEWS APP

The Socialists have led the minority coalition government since 2019, but internal arguments with United We Can and several controversial laws have taken their toll.