Israeli Prime Minister Benjamin Netanyahu’s main rival has reportedly agreed to join a unity government, ending a year of political deadlock.
Benny Gantz’s surprise election as speaker of parliament on Thursday paved the way for the deal.
He will stay in the role until he is named foreign minister, Israeli media report, and will then take over the premiership in September 2021.
Mr Gantz had refused to serve under Mr Netanyahu because he is facing trial.
The Israeli leader was formally charged with bribery, fraud and breach of trust in January.
Mr Netanyahu’s Likud party won the most seats in this month’s general election – the third in less than a year – but more lawmakers recommended that Mr Gantz be given the mandate to form a government.
The rivals were subsequently urged to put politics aside to fight the new coronavirus pandemic, which has infected 2,600 people in Israel and claimed eight lives.
Benny Gantz’s Blue and White alliance was forged as the anti-Netanyahu party.
It pledged to never sit in a government with a prime minister facing criminal charges, as Mr Netanyahu does.
But on Thursday night, after a year-long political crisis and three elections, Mr Gantz’s bloc had fallen apart. Its hopes of forming a government gone and its pledge not to sit with Mr Netanyahu now shattered.
Mr Gantz, without a clear path to a coalition on his own terms and under pressure due to the coronavirus outbreak, nominated himself and was elected speaker of the Knesset. He gained the backing of a majority of MPs after pledging to join an “emergency” unity government.
The deal will reportedly see Mr Netanyahu remain as prime minister and Mr Gantz taking over late next year. In the meantime, the incumbent leader will have a corruption trial to face.
But in a moment of crisis, and despite deep polarisation over his leadership, this looks like a clear victory and another come-back from the brink for Israel’s longest serving prime minister.
At the start of Thursday, Blue and White appeared to be preparing to pass legislation that would have prevented an indicted criminal suspect such as Mr Netanyahu from forming a new government.
The speaker of the Knesset, Yuli Edelstein – an ally of Mr Netanyahu – resigned on Wednesday amid a dispute with the Supreme Court. Blue and White were expected to put forward a nominee from among its ranks, Meir Cohen, to replace him.
But in a surprise move, reportedly after being warned by Likud that it would end talks on a unity government if Mr Cohen was elected, Mr Gantz put himself forward instead.
Before the election was held on Thursday evening, Mr Gantz was condemned by many lawmakers who had backed him for the premiership.
“This is a dark day,” said Nitzan Horowitz, leader of the left-wing Meretz party.
Yesh Atid and the Telem faction of former Defence Minister Moshe Yaalon, meanwhile, filed formal requests to break away from Mr Gantz’s faction in the Knesset. They will remain as one party under the name Blue and White.
Mr Gantz defended himself in a speech after he was elected speaker with the support of Mr Netanyahu’s right-wing bloc, saying it was “the right thing to do at this time”.
“These are not normal times and they call for unusual decisions,” he said. “Therefore… I intend to examine and advance in every way the establishment of an emergency national unity government.”
Mr Netanyahu had been due in court last week to face corruption charges in connection with three separate cases. But the hearing has now been postponed until at least 24 May because of the coronavirus outbreak.
The prime minister is alleged to have accepted gifts from wealthy businessmen and dispensed favours to try to get more positive press coverage. He has denied any wrongdoing.