Israeli lawmakers approved the formation of a unity government between Prime Minister Benjamin Netanyahu and his erstwhile rival Benny Gantz Thursday, paving the way to an end to more than a year of deadlock.
The two men have said they will swear in their new administration on May 13, with Netanyahu remaining leader for 18 months, before handing over to Gantz.
The proposed government had been challenged in the high court, with opponents arguing Netanyahu was ineligible to rule due to a series of corruption indictments.
They also complained that certain provisions in the coalition deal broke the law.
But the court ruled on Wednesday evening "there was no legal reason to prevent the formation of a government" led by Netanyahu.
It added that by approving the coalition it "was not seeking to diminish the severity of the charges" against Netanyahu, but concluded that those could be handled in his trial, which is due to begin on May 24.
Netanyahu has been written off by pundits and rivals many times since taking power in 2009, but the man sometimes dubbed "the magician" has invariably found a route to remain in power.
In addition to rebuilding an economy shaken by the coronavirus, the new government will also decide on the possible annexation of large parts of the West Bank, a move successive governments have refrained from ever since its occupation in the Six-Day War of 1967.
Israel has been without a stable government since December 2018, with the country seeing three successive elections in which Gantz's centrist Blue and White and Netanyahu's Likud were near neck-and-neck.
During that time Netanyahu has remained in power in a caretaker capacity.
He has also been charged with accepting improper gifts and illegally trading favours in exchange for positive media coverage.
He denies wrongdoing but if the trial goes ahead as planned will become the first serving Israeli leader to be tried.
After the third election in March, Gantz broke with large parts of his Blue and White alliance and agreed to form a unity government.
He said it was necessary to provide political stability as the country seeks to repair the economic damage wrought by a coronavirus outbreak, which has infected more than 16,000 people.
Gantz's critics, including many former allies, accused him of betraying his voters after campaigning for cleaner politics and pledging not to serve under an indicted prime minister.
While Israeli law bars ministers from serving while under indictment, there is no such law for prime ministers.
Lawmakers were expected to vote later Thursday to ask President Reuven Rivlin to grant Netanyahu a mandate to form a government.
He will then have a short period to wrap up weeks of bickering about the allocation of ministerial posts and finalise his cabinet line-up.
Former Gantz ally Yair Lapid, poised to become opposition leader, blasted what he termed an excessive focus on ministerial positions.
"A single mother with two children who lives in a rented apartment and lost her job will be on the street next month," because of the pandemic, Lapid said.
"That's what we should be dealing with, not which politician gets which job."
West Bank annexations?
In its first months the government will focus on the COVID-19 response.
The country took rapid measures to lock down and has succeeded in limiting the death toll so far to just over 200 in a population of some nine million.
In recent days measures have begun to be eased, with shops and businesses partially reopening, as well as primary schools.
From July 1, the government can also decide whether to follow through with the annexation of Israeli settlements in the West Bank, after President Donald Trump gave US blessing for the move which the United Nations says violates international law.
It could also annex the Jordan Valley, another part of the territory Trump says he is ready to recognise as part of Israel.
Either move is liable to trigger Palestinian unrest across the West Bank as well as in the Gaza Strip.
The Palestinians see the West Bank as the mainstay of their future state and the United Nations has warned that annexation would seriously damage any hopes for lasting peace.