Rome (AFP) - Rival populist leaders fought Monday for the right to govern Italy after its general election as the leader of the defeated ruling centre-left party resigned with a warning about a "wind of extremism".

The anti-immigrant League party and the anti-establishment Five Star Movement (M5S) each claimed Sunday's vote gave them a mandate to lead the nation of 60 million.

But the eurozone's third-biggest economy was in political limbo as negotiations between the various groups to determine who leads looked likely to take weeks or months.

League leader Matteo Salvini said that he had "the right and the duty" to form a government after its surprise success at the heart of a right-wing coalition.

But M5S, which won the biggest share of the vote of any single party, claimed it was the winner. Its leader Luigi Di Maio said it had a "responsibility" to form a government.

The boost for far-right and populist parties has prompted comparisons to Britain's vote to leave the European Union and the rise of US President Donald Trump.

Former White House adviser Steve Bannon -- the man who helped Trump ride a populist wave to power -- described the results as "an earthquake" in an interview with Swiss weekly Die Weltwoche.

"The tremor is going to continue... there's really a populist national revolt (against the EU), it's building steam," said Bannon, who was in Rome for the election.

The result claimed its first scalp on Monday: pro-European Democratic Party leader Matteo Renzi, who said he would "obviously" have to step down after coming third.

The former prime minister warned about "a wind of extremism" in Italy and ruled out his party acting as a "crutch" for any future populist government.

- Anti-immigrant promises -

With most ballots counted, the League was leading the dominant right-wing coalition, which won roughly 37 percent of the vote overall.

Salvini's party surged in the polls after promising to shut down Roma camps, deport hundreds of thousands of migrants and tackle what it calls the "danger" of Islam.

Story continues

However much depends on M5S, which has drawn support from Italians fed up with traditional parties and a lack of economic opportunity.

It won 32 percent of the vote.

The M5S had previously refused to align itself with other parties, which it considered part of a "corrupt" system.

But Di Maio said his party now "feels the responsibility to form a government".

To that end, he said he was "open to discussion with all political actors".

- Five Star League? -

According to polling company YouTrend, the M5S was set to gain 231 seats in the lower house Chamber of Deputies and 115 in the upper house Senate.

It could therefore form a majority with the either the League, Forza Italia or the Democratic Party (PD).

Salvini swiftly ruled out the prospect of forming a coalition with the M5S.

"N. O. No, underlined three times," Salvini told reporters.

- 'Possibility for change' -

Andrea Leo, a voter from Milan, said that if Italians had voted for traditional parties "nothing would have changed for sure.

"At least now there is a possibility for change," he said.

Prominent British pro-Brexit figure Nigel Farage congratulated M5S, his allies in the European Parliament, "for topping the poll" as by far Italy's biggest single party.

Marine Le Pen, leader of France's National Front, tweeted that it was a "bad night" for the EU.

Resentment at the hundreds of thousands of migrant arrivals in Italy in recent years fired up the campaign, along with frustration about social inequalities.

The election campaign was marred by clashes between far-right and anti-fascist activists, as well as a racist shooting spree by an extreme-right sympathiser last month.

Aside from Renzi, Berlusconi, a flamboyant billionaire and three-time former prime minister, was one of the big losers in the election.

He had returned to the limelight at the age of 81 despite a career overshadowed by sex scandals and legal woes. His Forza Italia (Go Italy) party, collapsed to 14 percent, with the League ahead on 18 percent.

The stock market had opened 2.0 percent down but recovered its losses and closed with a dip of 0.42 percent, even as other European markets mostly rose.