Italy's anti-establishment Five-Star Movement announced Wednesday that it had made a deal with the left-wing Democratic Party to form a coalition government — keeping embattled Prime Minister Giuseppe Conte in place while avoiding elections and ousting the right-wing League led by Matteo Salvini.

The shocking turn of events comes a week after the current government collapsed.

Salvini, who was deputy prime minister and whose party has been surging in the polls, had demanded snap elections and said that the 5-Star-League coalition government was not working amid increasing tensions between coalition parties. Polls suggested that Salvini's League could win enough seats to govern outright, or with a smaller right-wing party.

ITALIAN PRIME MINISTER RESIGNS AS POPULIST LEADER SALVINI DEMANDS SNAP ELECTION

But 5-Star leader Luigi di Maio said Wednesday that, after meetings with President Sergio Mattarella, a deal with the Democratic Party had been made -- one that would mean Italians would not go to the polls and that would keep Conte as prime minister.

According to Italian news wire ANSA, Di Maio said he felt “guaranteed” by Conte “on the policies we want to implement.” He also claimed that the 5-Star was “post-ideological.” Democratic leader Nicola Zingaretti, meanwhile, said that the new government would be “redistributive and green” when it comes to economics.

The League and 5-Star formed a coalition in the spring of 2018, but it has been an uneasy one marked with battles over everything from the economy to immigration – where Salvini, serving also as Interior Minister, championed hardline policies on migrants coming in from Africa.

Since that election, League’s poll numbers have soared, while 5-Star’s have plummeted. Recent polls have put the League polling at around 36 percent, with the Democrats polling at 21 percent. Five-Star, meanwhile has been polling at 18 percent.

However, without fresh elections, the parliamentary math remains the same as it was 14 months ago – with Five-Star representing the biggest party in parliament. It will now be up to President Mattarella to decide whether the pact represents a stable government, or if the country should go ahead with fresh elections.

Conte’s position was strengthened this week when President Trump, who shares a similar vision on immigration to Salvini, tweeted his support of Conte – calling him a “very talented man who will hopefully remain Prime Minister!”

ITALIAN NATIONALIST LEADER SALVINI, SURGING IN THE POLLS, DEMANDS SNAP ELECTION

Di Maio said that the tweet showed that “the path is the right one.”

A furious Salvini meanwhile renewed his calls for elections, and expressed “the bewilderment of millions of Italians in front of the unfortunate theater of the war of the armchairs that has been going on for days.”

CLICK HERE TO GET THE FOX NEWS APP

He also predicted the government would fail, saying that “the only thing they have in common is hatred against the League.”

“They already fight before they rule, better to vote right away,” he said.