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.

More:

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."

Netanyahu had previously led the most far-right government in Israel's history, relying on the support of ultra-nationalist and extremist parties. But, according to Haggai Matar, the executive director for +972 Magazine, the majority of the government parties within the Knesset are still far right.

"Gantz and Netanyau basically approve the annexation [of occupied Palestinian territories] and the continued assault on the Supreme Court," said Matar.

"The one thing we might see, with Gantz as defence minister and Gabi Ashkenazi as foreign minister, is an attempt to create an outward-facing nicer facade to these policies, which won't change.

"The public sees Gantz as the more 'moderate' right-wing person who might be able to shift the right-wing camp away from the more extremist nationalistic groupings like the ones headed by Naftali Bennett," said Iraqi. "But in the end, all of this is operating exclusively within the right-wing camp. So it's more about the presentation of right-wing policies and the language used."

Aida Touma, member of the opposition Palestinian-Israeli Joint List party in the Knesset, described the new coalition as "the dangerous and right-wing" government.

"Gantz has entered [the political process] to replace Netanyahu, and now he is backing him and his racist and anti-democratic approach," she said in a tweet.

Stability in time of crisis

While Gantz's supporters operated under the banner of "Anyone but Bibi" - referring to Netanyahu's nickname - the betrayal felt by Gantz's decision to enter in a coalition has been superimposed by the coronavirus pandemic, said Yizhar Be'er, an Israeli journalist and social activist.

"Many Israelis are tired of Netanyahu, but in the coronavirus era, they want stability," said Be'er.

"The bad news is that the democratic face of this government will not recover, particularly if Netanyahu uses his power to stop any changes in the legal system."

In light of the current domestic and international state of affairs, Matar said that the general public is happy with the government outcome.

"In terms of the economic crisis, the coronavirus pandemic, and the political deadlock for the past three elections, what was needed was unity and most of the people are happy with that," he said.

And while those who felt betrayed by Gantz's reneging on his campaign promises, others in the same camp - who still do not want Netanyahu as prime minister - have relented "due to being in a time of crisis".

"They say they'll be able to affect and minimise the damage Netanyahu does from within," Matar said.

"Many Israelis view Netanyahu as a brilliant politician and consider that he has contributed many positive things in the past 10 years," Iraqi said. "Netanyahu has enjoyed a lot of support and popularity for his handling of the situation during the coronavirus pandemic.

"For other Israelis, they are indifferent to who is in the driving seat as long as the government is functioning and things are carried out as they should."