“This government ends here,” said Giuseppe Conte, as he announced his resignation as Italy’s prime minister on Tuesday. After almost two weeks of twists and turns, what happens next is far from clear.

The president, Sergio Mattarella, is now calling the shots in a crisis triggered when Matteo Salvini pulled the plug on the League’s tenuous relationship with the Five Star Movement (M5S) in an attempt to capitalise on his popularity and become PM.

Mattarella has three options: immediately dissolve parliament and call a snap election; begin consultations with parties to see if a new parliamentary majority can be formed; or install a caretaker government to at least pass Italy’s budget for 2020.

Salvini is a highly effective campaigner, and support for the far-right League has risen from 17% at the 2018 election to 38% in recent polls, but his miscalculations in recent weeks reveal that he is not so much of a strategist.

A key blunder was failing to factor in the possibility of M5S teaming up with the centre-left Democratic party (PD) to forge a new majority in parliament, where they are the two largest parties. The potential threat became clear when the two blocked Salvini’s calls for an immediate vote of no-confidence in Conte last week.

“I think he believed that he could easily translate his consensus among voters in line with votes in parliament,” said Alfonso Giordano, a politics professor at Rome’s Luiss University. “He forgot that the League is still only at 17%.”

The former prime minister Matteo Renzi has overseen talks between factions of M5S and the PD but they are yet to be endorsed by the PD leader, Nicola Zingaretti, who said last week that a coalition with M5S would be a “gift to the dangerous right”.

A source said on Tuesday that Zingaretti’s first choice was still new elections. “We are only at the beginning of a complicated match,” the source said.

If the two parties do manage to strike an agreement, Salvini would be ousted from his roles as deputy prime minister and interior minister, from which he has spent the last year building up his and the League’s profile.

“If he doesn’t go to elections, in the short-term it is a problem as he could lose ground if in opposition for too long,” said Giordano.