Italy's president has tapped politically inexperienced law professor Giuseppe Conte to be the premier who will head Italy's first populist government.
Conte's government faces mandatory confidence votes next week in parliament, where the two governing parties have a slim majority.
Italy has been without a government for almost three months after the March elections came out inconclusive.
Mattarella's act scuttled Conte's first try to assemble a coalition uniting the forces of Di Maio's 5-Stars and his populist rival Matteo Salvini, leader of the right-wing League, which is based in the affluent north.
Di Maio will be the new joint industry and labor ministry, aiming to introduce a basic income for job seekers and poor families; Salvini is the interior minister, with a goal of cracking down on undocumented migrants.
The two enraged parties abandoned their joint bid for power, and on Monday Mattarella asked ex-IMF economist Carlo Cottarelli to form a caretaker government created to take Italy to what looked like probable autumn elections.
Salvini canceled his scheduled appointments in northern Italy to fly to Rome and was expected to have a private meeting with Di Maio, a political source said.
Without a deal, sources said President Sergio Mattarella could dissolve parliament in the coming days and send Italians back to the polls as early as July 29. Mattarella had vetoed the 5-Star-League's first proposed candidate for the post because of his euroskeptic views.
Even before it is official, the new government had already found itself at odds with the European Union.
"Now we have five years in government", she said.
Italian Premier Giuseppe Conte, center, is flanked by Roberto Fico, left, president of the Lower Chamber, and Rome's Mayor Virginia Raggi, on the occasion of celebrations for Italy's Republic Day, in Rome Saturday, June 2, 2018.
Italy's designate Prime Minister Carlo Cottarelli has put on hold the formation of a technocrat government as "new possibilities" reportedly emerged for agreement on an elected coalition. This led to Conte briefly resigning his position as leader of the coalition.
The ministers feature a mix of 5-Star and League loyalists, with the key economy ministry going to a mainstream economist close to the centre-right Forza Italia party of ex-premier Silvio Berlusconi, Giovanni Tria.
Tensions have also risen between the two parties and the President, peaking as Di Maio called for Mattarella's impeachment earlier this week following his rejection of Conte's choice of finance minister.
"There's no reference (in his CV) to masters or other university titles, but the simple and accurate description of his work as a scholar and university professor", the movement said in a post on its official blog.
Juncker said Italy must not suffer the same fate as thrice-bailed out Greece whose dignity was "trodden under foot" by its creditors when left-wing Prime Minister Alexis Tsipras took office in 2015.