By Julien Toyer
MADRID (Reuters) - The Greek crisis may not end up spilling over to Spain's economy, but it is shaking up its already volatile politics months before an election.
Since Greece called a referendum on a new cash-for-reforms deal last week, tensions have risen sharply between Spanish left-wing parties, raising doubts about whether they could form a coalition to send the conservative People's Party into opposition.
In normal times, that would have been a godsend for Prime Minister Mariano Rajoy. But he is facing a thorny problem of his own: how to help Greece to avoid any economic shock during the run-up to Spain's election, due before the end of the year, without playing into the hands of populist forces at home.
Podemos, the closest European ally of the leftist Syriza party of Greek Prime Minister Alexis Tsipras, is riding a close third in opinion polls on hopes that it could end years of austerity that have sent many into poverty.
"Rest assured, Alexis, that times are changing. 2015 is the year of change and, very soon, we will be stronger," Podemos leader Pablo Iglesias told the European Parliament on Wednesday.
Podemos argues that Europe's center parties, including Spain's Socialists, have endorsed excessively austere policies promoted by the right that have failed to boost growth or jobs.
"I appeal again in this chamber to the socialist family," he said. "Take the step, come on the side of those who defend social rights, and abandon once and for all this damned grand coalition that takes us closer to disaster."
Aides to Iglesias say their strategy is not to court voters in the center by distancing themselves from Syriza, but instead to become the biggest party on the left.
This, they say, would force Socialist Party leader Pedro Sanchez to choose between backing a Podemos-led government and a PP-led right-left "grand coalition".
The Socialist Party says it will not enter a grand coalition but the prospect that it could be beaten by Podemos is slowly becoming more plausible, especially since Podemos-led coalitions won power in Spain's three biggest cities last month.
As a result, Rajoy has stepped up his campaign against both Podemos and the Socialists, saying that a left-wing alliance would bring capital controls in Spain within six months, along with lower growth and higher debts.
"Talking and pledging is very easy but governing is slightly more difficult," Rajoy said on Wednesday.
"The policy reforms that we've implemented have worked, and backtracking would be a blunder. When I see that, with the help of Podemos, the Socialists wants to change everything we've done, I just think it's bad for Spain."
Yet Rajoy's record is mixed, and the fear factor has had little or no impact on Podemos so far.
Unemployment is still a huge 24 percent, down from its 2013 peak of 27 percent, but higher than when Rajoy took office in 2011. Spain's GDP is expected to grow about 3.3 percent this year, however, one of the highest rates in Europe.
An opinion poll last week had Podemos almost tied with the Socialists and the PP in voting intentions, with support for the combined left-wing parties, including the far-left Izquierda Unida, stable at close to 50 percent.
Some 37 percent of respondents favored a Podemos-Socialist coalition, and 29 percent a grand coalition.
Analysts say that a deal stabilizing the situation in Athens, even if additional painful economic reforms are attached to it, may only give Podemos new arguments to challenge Spain's latest economic reforms and lure more Socialist voters.
The alternative for Rajoy - a Greek exit from the euro zone - could offer more political upside as it might scare away voters from Podemos.
However, the unusual speed with which Rajoy's government said Greece should stay in the euro zone after Sunday's referendum suggested he was not ready to play that card.
Not only it would cloud the economic recovery narrative that is the cornerstone of his re-election bid but, analysts say, it might also put Spain back in the cross-hairs of international investors.
(Editing by Kevin Liffey)