It was a textbook example of old-school political maneuvering, and a remarkable turnabout. The two parties previously viewed each other with loathing: Each considered the other not just a political adversary but a morally bankrupt and deeply divisive force. They traded accusations of being Mafiosi, subversive, hatemongers, Russian trolls, flat-earthers and everything in between.

Last year, Matteo Renzi, the former leader of the Democratic Party, swore never to be part of a government with the Five Star Movement. Now he is eager to strike a deal. The Five Star Movement, whose ratings plummeted while in government, is ready to do pretty much anything to stay in power. Those involved didn’t even pretend to engage in a debate about policy and ideas: They do not have a common vision to tackle Italy’s structural problems. Instead they acted in the most pragmatic way to seize the opportunity created by Mr. Salvini’s strategic misstep. They’ve bought time, but at what cost?

The political ramifications go well beyond Italy. The new unelected government was blessed by the European Union, and the conversations last month on the side of the Group of 7 summit in Biarritz, France, were decisive in shaping it. One of the first leaders to publicly rejoice was the bloc’s budget commissioner, Günther Oettinger, who despite the political neutrality imposed by his role welcomed the news with enthusiasm. In an interview on German radio, he said the commission would “do everything to make the job of the new Italian government easier when it takes office and so to reward it.” The president of the European Commission, Jean Claude Juncker, promptly sent his congratulations; Peter Altmaier, the German economy minister, described it as “good news from Italy.” The financial markets relished a supposedly more credible, pro-European government. Even the Vatican supported it.

Giuseppe Conte, the resigning prime minister who is also tasked to lead the new Salvini-free government, instantly gained international credibility and personal gravitas, having spent the past 14 months as a pocket-squared puppet controlled by the populist coalition. In a matter of few days, Mr. Conte moved from Mr. Salvini’s useful idiot to Winston Churchill’s political heir.

President Trump’s endorsement of Mr. Conte wrapped the whole story in an additional layer of irony. Mr. Salvini’s main international sponsor — Mr. Trump reportedly told him back in 2016, “Matteo, I hope you become prime minister of Italy soon” — supported the leader who eventually betrayed him. And democrats now awkwardly stand together with a prime minister warmly approved by the populist in chief.