MILAN — Italy's anti-establishment 5-Star Movement and the right-wing League succeeded Thursday in forming western Europe's first populist government, which will be headed by a political novice.

League leader Matteo Salvini and 5-Star leader Luigi Di Maio agreed to shuffle the proposed roster of government ministers amid a financial market scare. They moved Paolo Savona, the 81-year-old euroskeptic economist vetoed by Italy's president from overseeing the economy ministry, to a European affairs Cabinet post. Savona had said previously that Italy should have a contingency plan to abandon the euro.

After the fits, starts and financial turbulence of recent days, the realization of a 5-Star-League coalition government put its populist posture on full display in Salvini's first public remarks. He returned from Rome to address a crowd of supporters in his northern home region of Lombardy.

"I want to make Italy a protagonist in Europe again. With good manners and without creating confusion. But I am fed up of governments with the hat in their hand," Salvini said to cheers. "We are second to no one."

Just a short time earlier, President Sergio Mattarella's office announced that the new premier, University of Florence law professor Giuseppe Conte, and his ministers would be sworn in Friday afternoon.

It was a stunning comeback from Sunday evening, when Conte — the premier-designate at the time — left a meeting with Mattarella empty-handed and returned to his teaching job.

Emerging from a similar meeting with a different ending Thursday night, Conte read off his Cabinet list and pledged that "we will work with determination to improve the quality of life of all Italians."

The Cabinet includes Di Maio— architect of the government's proposed basic income for struggling Italians — as welfare minister and Salvini — who has pledged to expel hundreds of thousands of migrants — as interior minister.

An inconclusive parliamentary election in March produced months of stalemate before the Italian political machinery went into overdrive this week. After rejecting Conte's first attempt, Mattarella tapped a former International Monetary Fund official to head a possible interim government of technocrats to see Italy through to an early election.

But investors, fearing the vote would be a referendum on the euro, revolted, sending Italian stocks plummeting and increasing the cost of borrowing to cover Italy's stubbornly high sovereign debt of 132 percent of GDP. Just the prospect of a political government calmed markets Thursday.

Mattarella put that premier-designate, Carlo Cottarelli, on hold after the 5-Stars and the League indicated willingness to compromise on their ministers.

The two leaders canceled other engagements Thursday to meet at the parliament in Rome and hammer out a Cabinet.

With developments moving quickly, Cottarelli stepped aside and Mattarella summoned Conte, who had returned to Rome earlier in the day after turning over his morning class to a substitute.

During the first attempt to put together a populist government, Salvini and Di Maio's decision to tap a little-known lawyer to be the next premier raised eyebrows in Italy. The revelation that Conte's resume exaggerated academic credentials at elite universities in Europe and the United States did not help.