Israel’s opposition imploded on Thursday after Benny Gantz, the leader of a fragile alliance seeking to oust Benjamin Netanyahu, announced his support for a unity government that would keep the prime minister in power.

In a dramatic u-turn Mr Gantz, who last week was on course to form his own minority government, was elected speaker of the Knesset amid reports he had struck a backroom deal with Mr Netanyahu.

Under the terms of the deal, Mr Gantz would initially serve as speaker and foreign minister and then after 18 months Mr Netanyahu would then hand over the reins of power.

However, analysts suspect Mr Netanyahu, whose party stressed on Thursday that a deal on a unity government had not yet been reached, will find a way to renege on that promise.

After being elected as speaker Mr Gantz vowed to repair divisions in Israeli society and help overcome the coronavirus.

"These are unusual times and they call for unusual decisions. That is why I intend to explore the formation of an emergency unity government,” he said.

But his appointment sparked a furious backlash in Blue and White, which has styled itself as the only party capable of toppling Mr Netanyahu, with senior figures quitting the party’s Whatsapp group in disgust.

Two key partners in the Blue and White alliance - the Telem and Yesh Atid parties - immediately filed paperwork to split from Blue and White, spokesmen for both factions said.

It is understood Mr Gantz has abandoned plans to pass a law that would ban indicted politicians, such as Mr Netanyahu, from taking high office, and instead may shield the prime minister from such a law to preserve hopes of a unity government.

The dramatic twist could mark the conclusion of a political crisis that has lasted for more than a year in Israel, in which Mr Netanyahu was indicted on corruption charges and three elections failed to produce a clear winner.

It also reflects an extraordinary change of fortune for Mr Netanyahu, who was widely expected to be nearing the end of his political career but now seems to have run rings around his rivals.

Last week, Mr Gantz appeared to be nearing victory after he won the backing of nationalist and Arab parties to form a minority government, vowing to form a coalition “within days.”

Instead, he is set to become the first Israeli politician in history to end up with the humble role of Speaker despite having a mandate to form a government.

In an impassioned speech, one Israeli MP accused Mr Gantz of deceiving voters who backed him in March’s election as they believed he was their only hope of ousting Mr Netanyahu.

“Gantz cheated and deceived millions of voters who wanted another government. Instead of prime minister, you chose to put yourself as a defendant's carpet in bribery, incitement and racism,” said Tamar Zandberg, an MP from the left-wing Meretz party.

She added: “We are overwhelmed by the depth of deceit and disgrace that has plagued today, not just millions of voters who have joined forces for an alternative, but Israeli politics as a whole and the State of Israel. "

However, Naftali Bennett, the Israeli defence minister, praised Mr Gantz for taking the “brave step of entering into a unity government under Netanyahu.”

“This is the right thing for Israel during this time of emergency,” he said.

Israeli political analysts said that Mr Gantz’s Blue and White alliance had always been doomed to split, as it agreed on little else than its vehement opposition to Benjamin Netanyahu.