Italy's anti-establishment Five Star Movement and the centre-left Democratic Party clinched a deal Wednesday to form a new government and stave off elections in the eurozone's third largest economy.
Five Star (M5S) said the coalition would be led by outgoing prime minister Giuseppe Conte, who had resigned following the collapse of the populist government earlier this month.
The deal between two historic enemies is set to bring to an end what Italian newspapers have dubbed "the craziest crisis ever".
M5S head Luigi Di Maio told journalists at the presidential palace in Rome that the endorsement Tuesday of Conte by US President Donald Trump "had shown us we were on the right path".
The parties had been bickering over whether Conte -- a soft-spoken former academic chosen as a compromise prime minister last year -- should lead a new coalition or whether a fresh face would better signal a fresh start.
Di Maio has warned however that any deal with the Democratic Party (PD) would still have to be approved by party members in an online vote.
Italy's 10-year bond yield had fallen to a record low Wednesday as hopes of an accord grew.
There was talk in markets of "a pro-European government with a finance minister from the Democratic Party, which would be pro-market and pro-EU", said Aurelien Buffault, head of bond operations at Meeschaert Asset Management.
This was seen as "very positive" and explained why investors were piling into Italian government debt, he told AFP.
Pivotal online vote
The clock has been ticking to ease the political turmoil, with Italy -- grappling with a huge debt mountain -- under pressure to approve a budget in the coming months.
If it fails to do so it could face an automatic rise in value-added tax that would hit the poorest families the hardest and could plunge the debt-laden country into recession.
Had the PD and M5S been unable to form a solid majority, the president would likely have called an early election for November.
Far-right leader Matteo Salvini, who triggered the crisis on August 8 when he withdrew his League party from the governing coalition with M5S, said the new set-up was fragile and unlikely to last.
"So we have to wait six months or a year to win? We're in no hurry," he said.
Political watchers have warned a M5S-PD deal could favour Salvini in the end, should the hastily forged accord come undone at the seams over the coming month.
Both the M5S -- which had sworn never to ally with traditional parties -- and the centre-left could lose support for getting into bed with the perceived "enemy".
Should that happen, Salvini "will be well placed to swoop to power when the Italian economy hits what the German IFO survey, and the yield curve, are flagging as serious problems ahead," said Michiel van der Veen from Rabobank.
There were no immediate details about cabinet postings.
The PD-M5S negotiations had been bickering over what role to offer Di Maio, who held the deputy prime minister and economic development minister posts in the previous coalition.