ROME (Reuters) - Italy’s anti-system 5-Star Movement and the far-right League moved on Wednesday to end nine weeks of political deadlock following inconclusive elections and form a government - a prospect that has alarmed investors.

League party leader Matteo Salvini (C) speaks next President of Fratelli d'Italia party (Brothers of Italy) Giorgia Meloni (L) and Forza Italia leader Silvio Berlusconi following a talk with Italian President Sergio Mattarella at the Quirinale palace in Rome, Italy, April 12, 2018. REUTERS/Max Rossi

President Sergio Mattarella said he would hold off on plans to name a non-partisan prime minister for 24 hours after the two parties told him they were holding last-minute negotiations to try to clinch an elusive coalition deal.

A crucial obstacle was removed late in the day when former prime minister Silvio Berlusconi, the League’s main ally, gave his green light to the talks, accepting a demand from 5-Star that his Forza Italia party take no part in the next government.

“It certainly won’t be us who imposes vetoes,” Berlusconi said in a statement, adding that although he would not support such a coalition in parliament, his partnership with the League would still continue at a local level.

News that 5-Star and the League were seeking a deal pushed the spread between Italian benchmark bond yields and the safer German equivalent to their widest level in nearly six weeks. Italian shares were little changed.

A March 4 vote ended in a hung parliament and repeated efforts to end the impasse have failed. Frustrated by the stalemate, Mattarella was set to nominate someone from outside the world of politics to head a “neutral government” and prepare the country for early elections, perhaps as soon as July.

With the clock ticking, the leaders of 5-Star and the League - the two largest groups in parliament - unexpectedly met once more and indicated they had made progress, but needed more time.

“We are doing all we can,” said League leader Matteo Salvini. Parliamentarians from both parties expressed optimism that the outline of a pact would be in place by Thursday.

5-Star has repeatedly offered to form a government with the League but on condition it broke free from Berlusconi.

Salvini had refused to do this in the name of loyalty to the center-right bloc, but he put growing pressure on Berlusconi to voluntarily stand aside to allow him to forge ahead alone.

5-Star views the 81-year-old Berlusconi, who has a conviction for tax fraud and is on trial for allegedly bribing witnesses, as a symbol of political corruption.

ELECTION THREAT

Lorenzo Codogno, head of LC Macro Advisors and former chief economist at the Italian treasury, warned that a 5-Star and League government would probably trigger a market backlash.

“An anti-establishment, anti-euro (though somewhat watered down) and anti-austerity government would not bode well for Italian financial assets,” he said.

Both parties want to renegotiate the EU’s fiscal rules to allow Italy to spend more. 5-Star has rowed back on a previous pledge to hold a referendum on Italy’s membership of the euro zone, but the League still calls the euro a “flawed currency” and wants to exit it as soon as is politically feasible.

5-Star’s flagship policy is universal income support for the poor, while the League’s main campaign promise was a “flat tax” of 15 percent for individuals and companies. Both policies would be costly for Italy’s strained public finances.

A political source said Berlusconi faced huge pressure from within his own party to step back after polls suggested support for Forza Italia would crumble if there was an immediate re-vote.

Even after Berlusconi’s retreat, government talks between 5-Star leader Luigi Di Maio and Salvini will not be simple.

“We still need to talk about programs, things to do, taxes, labor, pensions, immigration, schooling,” Salvini told reporters after meeting Di Maio.

On Sunday, the 31-year-old Di Maio withdrew his previous insistence that he should be prime minister, saying instead that he and Salvini should pick a mutually acceptable figure.

Italy’s economy is slowing, recent data suggests, and the first task of any new government will be to work on a 2019 budget to stave off the threat of an automatic increase in sales taxes that would be triggered because of missed deficit targets.