It was a stunning comeback from Monday, 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 yesterday, 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.
The new Economics Minister, Giovanni Tria, is a mainstream economist at Rome University, while the Foreign Ministry goes to Enzo Moavero Milanesi, a former European Union official in Brussels who was European Affairs Minister in former Premier Mario Monti's two-year technical Government.
In his remarks to supporters, Salvini pledged to make sending migrants back to their home countries a priority.
"My commitment will regard the security of 60 million Italians," Salvini said.
Di Maio kept his comments to a brief Facebook post thanking supporters and declaring "the government of change is reality".
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 per cent of GDP.
Mattarella put that Premier-designate, Carlo Cottarelli, on hold after the 5-Star and the League indicated a willingness to compromise on their ministers. Di Maio also backed down on threats to seek Mattarella's impeachment over the first failure.
The two leaders then cancelled other engagements on 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.
Mattarella received a round of applause from the press room at his palace when he described the recent events as "this complex itinerary that led to the formation of a government".
During the first attempt to put together a populist government, Salvini and Di Maio's decision to tap an unknown 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.
But more fundamentally, analysts have raised questions about whether he would be at best an executor for the two leaders who put aside their ambitions to be premier in order to form a government, and at worst a mediator.
Lorenzo Codogno, a former Treasury official and economic analyst, said he predicts "trench warfare" between the Government and Mattarella "on matters related to Europe and the fiscal stance".
- AP