ROME — Italy appeared Thursday to step back from the brink of a continent-rattling political crisis , with officials agreeing to a deal that averts the threat of fresh elections and puts two populist parties in charge of the euro zone’s third-largest economy.
The agreement was the latest twist in a topsy-turvy week for Italian politics, one that on Tuesday had sent global markets tumbling amid jitters that the country was careening toward a new vote and a possible euro exit. Investors feared an even greater populist surge if a fresh election were held.
But negotiations Wednesday and Thursday yielded an unexpected breakthrough, culminating in a presidential announcement late Thursday night that the country’s new government will be sworn in Friday.
The anti-establishment Five Star Movement and the far-right League will govern together, forming the first purely populist coalition to lead a core Western European country since the creation of the European Union. And they will get their preferred prime minister, the little-known law professor Giuseppe Conte.
“We will work resolutely to improve the quality of life of all Italians,” Conte announced Thursday night after the president, Sergio Mattarella, formally asked him to lead a new government.
The president had balked at the populist parties’ original choice for finance minister, Paolo Savona, an 81-year-old who has been fiercely critical of the E.U. and has suggested Italy should abandon the euro.
In a concession, the parties proposed a new pick for finance minister, Giovanni Tria, a low-profile economics professor at the Tor Vergata University of Rome. Savona, meanwhile, will be shifted to European affairs minister.
Although technocrats will take some of the government’s top jobs, most observers believe that the leaders of the two parties — Five Star’s Luigi Di Maio and the League’s Matteo Salvini — will be the real powers behind the new administration.
Both will officially be vice premiers, with Di Maio also taking the economic development ministry and Salvini running the powerful interior ministry, which oversees Italian law enforcement and border control.
Salvini, whose party ran on a stridently anti-immigration platform, has backed the mass deportation of migrants in a country that has become the top entry point for those crossing the Mediterranean to reach Europe.
Di Maio’s party was founded by comedian Beppe Grillo less than a decade ago with the aim of shaking up a sclerotic political establishment and using the Internet to give voters a more direct say in their democracy. The party is considered a political chameleon, with ever-shifting positions and influences from both left and right.
“Thank you everyone! The Government of Change is now real!” Di Maio wrote on Facebook late Thursday.
Although the League and Five Star are sharply at odds on key issues, they share a skepticism toward the euro and the E.U. that has unnerved both the European establishment and investors.
Neither party ran its campaign on a euro exit. But after the president vetoed the parties’ finance minister pick, the likelihood of new elections spawned fears that the populists would turn the next vote into a referendum on the country’s membership in the currency club.
Thursday’s agreement suggests that neither party wanted to go through with that — at least not right now.
“Just to be precise, we’ve never spoken about ‘no euro,’ never,” Conte said on television. “On the opposite, that was never in the contract and was never an issue in the agenda.”
The threat of a euro exit could have been deeply damaging to an economy that suffers from massive public debt and had seen its borrowing costs rise as markets grew anxious.
The new government will be under immediate pressure to improve economic conditions. Italy has struggled with low growth and high unemployment for the past decade.
Those woes have created political turmoil across southern Europe in recent years. Even as it eased in Italy on Thursday night, it was building in Spain, where longtime Prime Minister Mariano Rajoy is expected to be forced out of office in a confidence vote on Friday.
Rajoy’s center-right People’s Party has been snared in corruption scandals, and on Thursday lost the support of a key ally. Rajoy is expected to be replaced by Pedro Sánchez, leader of the center-left Socialists.
Witte reported from Berlin.