5Star Movement leader Luigi Di Maio speaks to the press after a meeting with Italian President Sergio Mattarella as part of consultations of political parties, on May 7, 2018 at the Quirinale palace in Rome | Tiziana Fabi/AFP via Getty Images 5Stars and League reach deal to break Italian impasse The parties will present their so-far unnamed prime ministerial candidate to the Italian president on Monday.

ROME — The anti-establishment 5Star Movement and far-right League reached a deal Sunday on a government platform and common candidate for prime minister that could put a populist alliance in charge of the third-largest economy in the eurozone.

The two parties will report back to President Sergio Mattarella Monday, after agreeing to set aside their leaders' own ambitions for the prime ministership. The president will likely call a final round of consultations with the parties, then make a final decision on whom to appoint as the new premier.

The deal between the 5Stars and the League was the result of a last-ditch effort to break a two-month impasse and avoid the president imposing a "neutral government" that would have led to another election. 5Star leader Luigi Di Maio and the League’s Matteo Salvini met twice in Milan over the weekend to hammer out the details of a coalition deal.

“We are writing history and it obviously takes a bit of time,” Di Maio told reporters after Sunday’s meeting with Salvini. Di Maio later confirmed they have reached a deal on a prime ministerial candidate but declined to give a name, saying only that it is "a politician, not a technocrat."

A government of the two parties would reignite worries among Italy's EU partners that it won’t push forward with reforms and reduce its massive public debt, the second largest in the eurozone after Greece. Although they have softened their Euroskeptic stances, both parties have pledged to take tougher positions on Europe, promised to seek a revision of the existing EU treaties and scrap the austerity policies blamed for Italy’s anemic growth.

In order to start government talks with the 5Stars, Salvini’s League had to ditch its long-time alliance with Silvio Berlusconi’s Forza Italia.

The parties' leaderships met for two days in a row to overcome their differences and drafted a German-like "government contract” based on shared policy proposals. A spokesman for the 5Stars said the contract focused on 15 to 20 points, which will be further revised in the coming days.

The 5Stars and a center-right coalition led by the League emerged as the biggest forces in the March 4 election, but didn’t obtain enough votes to govern alone, meaning they were forced to explore uneasy alliances.

In order to start government talks with the 5Stars, Salvini’s League had to ditch its long-time alliance with Silvio Berlusconi’s Forza Italia. The 5Stars ruled out collaborating with the media tycoon and three-times prime minister, whom they view as a symbol of the political establishment they have pledged to fight against.

Berlusconi agreed last week not to impede the new populist alliance but said his party would not give its approval in a parliamentary vote of confidence.

These developments coincide with a court order lifting a ban on Berlusconi standing for public office over a tax fraud conviction, meaning that the 81-year-old might want to run as the Forza Italia candidate if there is a new election.

While there is some overlap in the 5Stars' and League's platforms, they may find it hard to reconcile their expensive electoral promises. Party leaders say the new government contract will include the 5Stars' pledge of a new minimum basic income for unemployed job-seekers, as well as the League’s proposed flat income tax, and a long-pledged repeal of Italy’s 2011 pension reform.