Italian Prime Minister Giuseppe Conte delivers a speech at the Italian Senate | Andreas Solaro/AFP via Getty Images Italian PM Conte resigns ‘This government ends here,’ prime minister tells parliament.

ROME — Italian Prime Minister Giuseppe Conte announced his resignation Tuesday, setting the country on an uncertain political course that could lead to a snap election or a new governing alliance.

Conte’s move preempted a confidence vote that had been expected to take place 12 days after Matteo Salvini, leader of the far-right League party and Italy's interior minister, called for such a motion.

Before announcing his resignation, Conte held a one-hour speech critical of Salvini, noting that the minister's decision to end the coalition government with the populist 5Stars Movement "has major consequences for the country and its economy."

“This government ends here,” Conte said.

The outgoing prime minister — who was booed by lawmakers from the League — said Salvini got "distracted from the government’s good work [because] he was too focused looking for an excuse to pull the plug on it.”

In response, Salvini thanked Conte for his resignation and said: “Finally.”

The prime minister's resignation will not automatically trigger a snap election. It is now up to President Sergio Mattarella to decide on the way forward. Conte will head to see the president Tuesday night after the four-hour Senate debate.

Salvini, speaking from the parliamentary benches rather than the government’s seats, said he was a “free man, unlike many other lawmakers who put the interests of Brussels, Germany and France before those of Italians.”

Hitting back at Conte's comments, Salvini said he would “do everything all over again” and defended his use of religion in political campaigns, which the prime minister had criticized. “I will always invoke the Virgin Mary to guide me,” he said.

He also reiterated his call for fresh elections, saying: “Those who fear Italians aren’t free men and women,” referring to the 5Stars.

The 5Stars, meanwhile, are reported to be in talks with the center-left Democratic Party to potentially form a new government. Such a tie-up would effectively oust Salvini's party from government.

If an alternative parliamentary majority becomes a possibility, Mattarella could decide to install a new government without a fresh election. The president could also opt for a caretaker government to pass crucial budget legislation if a majority of lawmakers are willing to back such option.

During the Senate debate, former Prime Minister Matteo Renzi of the Democratic Party renewed his invitation to “responsible parties" to form a national unity government. “Populism has failed in this country," he said.

But Nicola Zingaretti, the leader of the Democratic Party, hasn’t officially greenlighted a potential tie-up with the 5Stars.

Mattarella will decide on the timeline for his consultations with party delegations Tuesday night. He is expected to announce his decision on the way forward before the G7 summit which begins this weekend in the French city of Biarritz.

This article has been updated.

ITALY NATIONAL PARLIAMENT ELECTION POLL OF POLLS