SPAIN is preparing to go to the polls for its fourth election in as many years. Tomorrow’s vote will again see Catalonia playing a bigger part than Socialist party leader and acting prime minister Pedro Sanchez would like.

Feelings are still running high in the prosperous, independence-seeking region after nine pro-independence leaders were jailed for 100 years over the 2017 referendum.

But the main parties are aware that, however distasteful their view, they might have to strike a deal in the end to avoid voter apathy amid the possibility of a fifth election.

Sanchez previously failed to reach an agreement with the far-left Unidas Podemos in the previous parliament because they wanted a bigger role than he was prepared to offer.

This election is part of the price he has to pay for that failure.

The Socialists lead in opinion polls but are forecast to lose a handful of seats from the last election in April.

READ MORE: Sacked consul reveals Spanish interference in Scotland role

One option that has been suggested and is gaining some traction is the potential abstention of the conservative People’s Party (PP) to allow Sanchez to be voted in as prime minister.

However, PP support would come at a price and would most likely come at the last possible minute to avoid a repeat election.

Neither would that guarantee that the budget would be passed or the government would last.

No matter how unlikely this scenario is, around a third of voters are still undecided, polls suggested, meaning almost anything can happen.

If the far-right Vox gets a strong result, the PP may fear that their backing for the Socialists could backfire on them at the next election.

The centre-right Citizens party, whose vote is predicted to collapse tomorrow, may be tempted to back Sanchez to claw their way back on to the political carousel.

If the Socialists win without a majority, they have said they will make proposals to other parties within 48 hours and move to strike broad agreements on issues such as Spain’s unity.

But the thorny topic of Catalonia will prove a major factor, especially given the severe sentences handed down to independence leaders by what is perceived as being far from an independent judiciary.

Former Catalan vice-president Oriol Junqueras, jailed for 13 years over the referendum, was the highest-profile figure to be sentenced. He was elected as an MP at the last general election, but was not allowed to take his seat.

Then he was elected to the European Parliament and was again prevented from taking his seat because he was in pretrial detention.

Junqueras’s legal team have taken his case to Europe, which is considering whether or not political immunity applies to him and on which a decision is expected soon.

As if in preparation for what would be a negative ruling for it, Spain’s Supreme Court has suspended the 13-year ban from holding public office that was part of Junqueras’s sentence until the European Court of Justice rules on the immunity question.

Junqueras is also president of the Republican Left of Catalonia (ERC) and the party had asked for him to be restored to its electoral list for tomorrow’s poll, a request that was rejected by Spain’s central electoral board.