Just hours before Holocaust Memorial Day in Israel, Prime Minister Benjamin Netanyahu and opposition leader Benny Gantz reached an agreement to form a unity government.
The deal, agreed on Monday, broke a political impasse that saw three elections taking place in less than a year, all of them rendering inconclusive results.
Despite the bribery and corruption charges he has been indicted for, head of the right-wing Likud party Netanyahu, Israel's longest-serving prime minister, managed to extend his reign for another 18 months under the agreement.
Gantz, head of the centre-right Blue and White alliance, whose election campaign ruled out the possibility of a coalition government with Netanyahu, will become defence minister and deputy prime minister before taking over from Netanyahu for the second half of the government's rule.
Israeli President Reuven Rivlin had given Gantz the mandate to form a government. But when he failed before the deadline, Rivlin authorised the Israeli parliament, the Knesset, with the task.
The pair now has 21 days to form the government with a majority of 61 votes. Failure to do so will mean that the Knesset will dissolve on May 7 and an unprecedented election will take place by August 4.
Netanyahu vs the legal system
The unity government agreement includes the ability of Netanyahu, with the support of the United States, to advance legislation to annex parts of the occupied West Bank starting from July 1.
Gantz had expressed similar views on the annexation, which, under international law, is considered illegal.
On Monday, the more contentious issues finally ironed out revolved around the legal system within Israel and the committee to appoint judges.
Netanyahu now has to power to veto the appointments of the next attorney general and state prosecutor. His trial, in three corruption cases, will start on May 24 at the High Court of Justice.
Israel's Supreme Court will now have to deal with a tough question of whether Netanyahu will be eligible to lead the country as prime minister, according to Akiva Eldar, a political analyst and Haaretz contributor.
"There is no precedent to this in the entire democratic world," Eldar told Al Jazeera.
"The unity agreement, which Netanyahu formed to immunise himself from the high court's ruling, states that if he is ruled ineligible to be prime minister, neither anyone from his Likud party or Gantz can become leader. It's either Netanyahu or a fourth election."
The unity government, Eldar added, is set for a head-on collision between the government and the high court.
Gantz lacks 'political skill-set'
Gantz, a former Israeli military chief of staff, has little political experience and has disappointed some of his followers by agreeing to a coalition government with Netanyahu, who has been in power for the last five years and 14 years in total.
"Gantz was presented as the anti-Netanyahu, a man who was supposed to replace a corrupt prime minister," said Amjad Iraqi, a policy analyst at Al-Shabaka, the Palestinian Policy Network think tank.
"Because Gantz has flip-flopped on what was effectively his core platform, he has shown his supporters that he's not a real politician by not keeping to his campaign pledges and effectively being played by Netanyahu to agree to a unity government."
The decision to enter a coalition government with Netanyahu has been in the works since last month, causing Gantz's alliance of three parties to splinter only 13 months after it was formed to bring Netanyahu's reign to an end.
"Gantz has shown he doesn't really have the experience or the skillset to play the political game, as shown by his own political party breaking up into three," added Iraqi. "So his reputation as a political leader no longer has that kind of credibility."