Israel is heading for a third election in less than a year after Benjamin Netanyahu’s closest rival failed to form a new government.

Benny Gantz, leader of the centrist Blue and White party, announced the stalemate on Wednesday, saying that “in the past 28 days no stone was left unturned while we tried to form a government that would bring Israel a leadership of dignity, morals and values”.

He laid the blame at the door of the embattled Mr Netanyahu – who had also previously failed to form a government – adding that “the [right-wing] bloc stood firm, insisting to only see the best interest of one person, before that of the patients lying in hospital corridors”, the BBC reported.

Mr Gantz, a former military chief, became prime minister designate last month after Mr Netanyahu proved unable to construct a coalition government in the wake of inconclusive elections in September.

The long-serving incumbent is desperate to retain the prime minister’s post, which he could use to fight impending corruption charges and push for immunity. Israeli law requires all politicians to resign if charged with crime with the exception of the prime minister.

Under Israeli law, the country’s parliament now enters a 21-day period where any MP can try to claw together a 61-seat majority and become prime minister.

That means both Mr Gantz and Mr Netanyahu will continue their efforts to reach out to smaller parties, and to explore the possibility of a unity government. Dark-horse candidates may also come to the fore.

Mr Gantz’s Blue and White is the largest party in parliament with 34 seats, just ahead of Mr Netanyahu’s Likud, on 33, meaning the two men could control a majority by working together.

But during weeks of talks, they could not agree on the terms of a power-sharing agreement, including who would first take the role of prime minister.

With neither side in the mood to compromise, the country could be forced to hold another election in March if no one can command a majority in the Knesset.

Opinion polls have indicated a new election would deliver similar results to September’s inconclusive vote, signalling additional months of post-election horse trading.

The stalemate has shaken Israelis’ confidence as conflicts with Iran and Syria deepen, and has vexed a usually friendly White House, which has had to repeatedly delay a long-awaited Middle East peace plan until an Israeli government is formed.

It did not stop Donald Trump’s administration announcing that it would reverse four decades of policy by no longer considering Israeli settlements in the occupied West Bank illegal – to the delight of both Mr Netanyahu and Mr Gantz.

Mike Pompeo, the secretary of state, made the announcement on Monday, with the UN insisting the following day that the new towns were “in breach of international law”.