An unprecedented political battle is raging in Spain for control of voters on the left.

After heading six governments and dominating the left for nearly four decades, the Socialist party faces the risk of being overtaken by an upstart alliance led by the far left Podemos party in the country's June 26 repeat election.

The scenario is reminiscent of what happened in Greece in 2012 when the Syriza party overtook Greece's long dominant Socialist Pasok party. The far left party last year became Greece's governing party, although the turnaround in Spain is not expected to be that dramatic with the Unidos Podemos alliance polling far behind acting Prime Minister Mariano Rajoy's conservative Popular Party.

Voters enraged with high unemployment, unpopular austerity measures and corruption scandals already shattered the nation's two-party system last December by abandoning the Socialists and the Popular Party and giving strong support to Podemos and the new, business-friendly Ciudadanos.

That fractured result led to six months of unsuccessful negotiations to form a government, an outcome that polls indicate is likely to happen again. Surveys also suggest the Socialists could be beaten by Unidos Podemos headed by Pablo Iglesias, a pony-tailed political science professor who burst onto the political scene just two years ago. He co-founded Podemos, which formed an alliance last month with the much smaller United Left party.

Podemos' base is made up of young voters and longtime Socialists who felt betrayed when former Socialist Prime Minister Jose Luis Rodriguez Zapatero in 2010 and 2011 made a political U-turn, slashing social spending and making it easier for businesses to fire workers to try to prevent Spain's economy from imploding amid the financial crisis.

The fragmentation of the left is illustrated among left-leaning Spanish families with parents sticking to the Socialists while their grown children break away with Podemos.

Carlota Aguirre, a 26-year-old university course coordinator, says she grew up surrounded by socialist relatives but now supports Unidos Podemos. She says the Socialists seem to have lost their way and rely too much on their storied history instead of providing solutions for modern-day problems.

When a wave of evictions forced some Spanish homeowners to give up their apartments while still owing money to banks, she thought the far left alternatives to the Socialists were working harder to try to prevent the foreclosures.

"They haven't been out front in this new era of political and economic changes that Spain's been going through," Aguirre says. "I think the Socialists are living in the past and they're not as socialist as their name suggests."

Her 57-year-old father, Jorge Aguirre, said he was a die-hard leftist when he first voted for the Socialists at age 19 but that the party has become more moderate over the decades, just as he has after raising a family and advancing through the ranks of an energy company to become a natural gas logistics manager.

Now he worries that he could fall among the ranks of middle to upper middle class Spaniards that Unidos Podemos would target with tax increases it has promised to implement to pay for restoring social programs cuts enacted under Zapatero and Rajoy in the name of austerity.

"I'm worried that they're confused about who the rich actually are," he said. "Higher taxes scare me and those of us with a decent salary after working for many years."

A second place finish for Unidos Podemos ahead of the Socialists would be a massive blow for a party whose former prime ministers Felipe Gonzalez and Jose Luis Rodriguez Zapatero were crucial for shaping modern, democratic Spain following the country's return democracy in 1978, three years after the death of dictator Gen. Francisco Franco.

Such a scenario would be "a political earthquake because the hegemonic force of the left would be stripped of its leadership by an emerging party, a coalition of leftist forces," said Antonio Barroso, a London-based analyst with the Teneo Intelligence political risk consulting group.

The Popular Party won the Dec. 20 election with 123 seats in the 350-seat Parliament but failed to find enough support from the other parties to form a government. The Socialists came a distant second with 90 seats — their worst result ever — and made a desperate but ultimately fruitless bid to get the support of Podemos to cobble together a government, and that failure is what led to the fresh election.

Polls over the last month and experts predict this month's election will yield another inconclusive result. While the Popular Party is still expected to get the most votes, which party ends up in second place is a crucial question because Rajoy could again fail to convince others to join him in a governing coalition or minority government. That would give the second biggest party the chance once again to form a government and avert yet another election in the fall.

In many ways, Spain's leftist split is being self-perpetuated. Both the Socialists and Podemos agree so much unites them they ought to strike a deal to ensure Rajoy's Popular Party doesn't extend its rule over Spain, but can't seem to agree at the negotiating table.

After December's vote, the Socialists' new leader Pedro Sanchez managed to get Cuidadanos to agree to a governing alliance but Iglesias refused — so it's hard for analysts to see how Iglesias could convince the Socialists to join Unidos Podemos as a junior partner after refusing to do the same.

The current situation "is not a good place for the Socialists to be in," said Federico Santi, Spain analyst for the Eurasia Group political risk firm.

"It's hard to be optimistic not just about their short-term prospects in terms of what happens at the end of June and at the end of the elections and in a government formation process, but also in the medium term," he said.

However, some analysts say the likely inability of the two to craft a left-leaning alliance leaves only one governing possibility for Spain: A so-called "grand coalition" of the Popular Party and the Socialists. That has never happened before in Spain and was rejected earlier this year by Sanchez but has happened elsewhere in Europe.

"It's still too soon to call for the death of the Socialist Party," Barroso said.

___

Associated Press writer Harold Heckle in Madrid contributed to this report.