Luigi Di Maio said on Wednesday that he had finished his work, that an era had come to an end, and that he would trust his successor to lead the party moving forward.

“It’s time for the M5S to be refounded,” he told a gathering of supporters in Rome, ending days of speculation that he would step down as party leader while remaining Italy’s foreign minister.

The M5S is the largest party in Prime Minister Giuseppe Conte’s coalition government, and Di Maio’s exit could further strain an already fragile alliance with the centre-left Democratic Party (PD).

The announcement comes days ahead of key regional elections pitting the M5S and PD against Matteo Salvini’s far-right League party.

The League, which enjoys a significant lead in national polls, hopes that defeating the M5S and PD on Sunday in the northern region of Emilia-Romagna – a historic leftist stronghold – will spark a crisis and cause the government to collapse.

The M5S is likely to perform particularly badly in the elections, according to the last polls ahead of the ballot.

Meanwhile, the League and the PD are neck-to-neck.

The M5S has been in crisis for months, most acutely since it flipped coalition partners in September.

But even earlier, it was beset by infighting and has seen the defections or expulsions of 31 lawmakers since the party won 33 per cent of the vote in the 2018 election.

Analysts have long said the party has struggled to pivot into an effective governing force, hobbled by its uneasy governing alliances first with the League and, since September, with the PD.

In the process, it has alienated voters by defying some of its core values.

Conte said he respected Di Maio’s decision, while dismissing suggestions that his resignation as party leader could destabilise the government.

“Certainly, I will be sorry on a personal level,” he told Italian media.