The re-election of President Sergio Mattarella in Italy has temporarily averted a political disaster and may ease the passing of key reforms, but Machiavellian plotting by political parties has just begun, analysts warn.

After six days of deadlock and amid fears the government could fall, the 80-year old – who had made it clear he did not want to serve a second term – agreed on January 29 to put parliament out of its misery.

It was, he told the country, an exceptional situation: debt-laden Italy, one of the worst hit by the 2020 pandemic in Europe, was “still going through a serious health, economic and social emergency”.

Mattarella needed at least 505 votes from an electoral college of 1,009 lawmakers and regional representatives in January 29’s vote. He won 759, earning another stint as president in spite of himself.

The only other serious contender for the job – Prime Minister Mario Draghi – was needed at the head of government to keep Rome on track with major reforms to the tax and justice systems and public sector.

Draghi, brought in by Mattarella last year, has been racing to ensure Italy qualifies for funds from the EU’s post-pandemic recovery scheme, which amounts to almost €200 billion ($225 billion) for Rome.

Many were concerned Italy would slip behind on the tight reform schedule should Draghi step down as prime minister, or that his elevation would spark snap elections in the eurozone’s third largest economy.

Mattarella’s election removes that immediate risk. But fractures within Italy’s parties have deepened over the past week and are expected to worsen further as campaigning intensifies ahead of a 2023 general election.

“The question is whether the key ingredient of Draghi’s government – a broad, cross-partisan majority – will still be there in a few days,” Francesco Galietti of political consultancy Policy Sonar said.

“If not, the situation will rapidly become untenable”.

Wolfango Piccoli of the Teneo consultancy said rebuilding trust within the ruling coalition was “a near-impossible job”, and a realignment was now likely “both within individual parties and alliances”.

The biggest loser is Matteo Salvini, head of the anti-immigrant League, who had hoped to play kingmaker but instead failed to get his candidate elected and was forced to ally with the centre-left bloc.

That public embarrassment may spark a leadership contest, just as the right-wing bloc collapses.

Giorgia Meloni, head of the far-right Brothers of Italy party, who did not want Mattarella as president, accused Salvini of betrayal and said she was no-longer allied with him or centre-right leader Silvio Berlusconi.

A leadership battle is also expected within the once anti-establishment Five Stars Movement (M5S), which may affect its entente with the centre-left Democratic Party (PD).

Draghi will have to ensure the government can continue to function – though Piccoli points out the PM’s standing “has been affected too”, after he signalled his interest in the presidential job but was not picked.

Galietti said he expected the political scheming now to be “as Machiavellian as it gets”.