Italy's populist parties on Thursday reached a new coalition deal reviving their plans to take power, narrowly avoiding snap elections and setting in motion an anti-austerity government in the eurozone's third largest economy.
On Thursday evening President Sergio Mattarella gave a mandate for the second time to Giuseppe Conte -- the populist's pick for prime minister.
Italy has been in the throws of political turmoil for almost three months after inconclusive March elections, rocking financial markets and spreading unease among its euro partners.
Mr Conte -- a little know lawyer and political novice -- announced his picks for the country's future cabinet after meeting with Mr Mattarella.
From the coalition, far-right League leader Matteo Salvini was named interior minister while Five Star Movement leader Luigi Di Maio is slated to become minister for economic development.
Paolo Savona, the eurosceptic economist who the populist coalition originally wanted for economy minister but was rejected by Mattarella, is still part of the cabinet as European Affairs minister.
The role of economy minister was given to the less controversial Giovanni Tria, a political economist who advocates slashing taxes but is in favour of keeping Italy in the euro.
Brussels savvy Enzo Moavero Milanesi was appointed minister of foreign affairs.
According to Italian media the populist line-up will face a vote of confidence in both houses of parliament on Monday or Tuesday.
"Without promising any miracles, I can say that, after the first months of this government of change, I would like us to have a country with a little less tax and a little more security, a few more jobs and a few less illegal immigrants," said a gleeful Mr Salvini at a rally after the announcement.
Just forty-eight hours ago Italy had looked to be on course for snap elections after coalition talks between the anti-establishment Five Star Movement and far-right League party collapsed over the weekend.
Mr Mattarella vetoed the populist coalition's anti-euro choice for economy minister Mr Savona, causing the two populist parties to abandon their joint bid for power.
Mr Mattarella then asked pro-austerity economist Carlo Cottarelli to form a caretaker government.
Fresh elections seemed like the most likely outcome, however, after it became clear Mr Cottarelli's government would not pass a vote of confidence in parliament.
In a surprise twist to Italy's drawn out political saga, Five Star and the League frantically re-engaged in talks to get their coalition back on track Thursday and emerged triumphant.
"All the conditions have been met for a M5S-League government," said the party leaders in a joint statement sent by the Five Star Movement.
In light of the populists' successful talks, Mr Cottarelli announced Thursday that he was giving up his mandate to form a technocrat government.
"The formation of a political government is by far the best solution for the country, because it avoids the uncertainty that would arise with new elections," said Mr Cottarelli after meeting with Mattarella.
The programme proposed by the populists promises to revive Italy's sluggish economy by rejecting austerity and increasing spending.
Their ambitious economic proposals -- which include a universal basic income for Italy's poorest, rolling back pension reform and a two tier flat tax -- have worried Brussels and financial markets given the country's sizeable debt.
Italy's 2.3 trillion euros of debt is 132 percent of its gross domestic product (GDP), the highest ratio in Europe apart from Greece and more than double the bloc's 60-percent ceiling.
The government programme includes plans to speed up expulsions of illegal immigrants and crack down on trafficking.
The eurosceptic coalition also promises a series of measures to reign in the EU including renegotiation of EU treaties and a review of the bloc's economic governance on issues such as the single currency.
But on Thursday EU chief Jean-Claude Juncker warned against blaming the EU for all of Italy's problems.
"I'm in deep love with Italy, Bella Italia. But I no longer accept that everything which is going wrong in South of Italy, in Mezzogiorno, is explained by the fact that the EU or the European Commission would not do enough," he said after leaving a meeting in Brussels.
"Italians have to take care of the poor regions of Italy. That means more work, less corruption, seriousness.
He urged Italy not to "play this game" of holding the EU responsible, adding "Nations first, Europe second."