Israeli Prime Minister Benjamin Netanyahu and his chief rival have announced that they have forged a deal to form an "emergency" coalition government, ending the worst political crisis in the country's history.

The deal on Monday between Netanyahu's Likud Party and former military chief Benny Gantz's Blue and White alliance ends months of political paralysis and averts what would have been a fourth consecutive election in just over a year.

More:

The power-sharing agreement means that Netanyahu will almost certainly remain in office for the duration of his upcoming trial on corruption charges.

Netanyahu, in power consecutively for the past 11 years, is under criminal indictment on corruption charges which he denies. They include bribery, fraud and breach of trust.

Under the three-year deal, Netanyahu will serve as prime minister for the first half, with Gantz taking the job for the second half.

200420074217211

Gantz's party will take control of a number of senior government ministries, including foreign affairs and defence, but Netanyahu's party will gain influence over judicial appointments - a key demand of the prime minister as he prepares to go on trial.

"I promised the state of Israel a national emergency government that will work to save the lives and livelihoods of the citizens of Israel,” Netanyahu tweeted.

Al Jazeera's Harry Fawcett, reporting from West Jerusalem, said that there have been leaks to the media that Netanyahu was trying to ensure that he could stay in an influential role even after handing over the premiership to Gantz.

"As a deputy there are concerns that perhaps he might be ruled out of that position again because of these corruption charges that he faces," Fawcett said.

According to the joint statement, the coalition is to serve as an "emergency government" for an initial six months. During that time, no laws are to be introduced that have nothing to do with the coronavirus.

One exception however, is Israel's intention - in accordance with US President Donald Trump's Middle East plan - to annex the Jordan Valley and illegal Jewish settlements and other territory in the occupied West Bank, actions that would defy international law.

Netanyahu could submit these plans for approval from July, according to the statement.

Palestinians condemned the formation of a new Israeli "annexation" government, saying the agreement would wreck hopes of peace.

"The formation of an Israeli annexation government means ending the two-state solution and the dismantling of the rights of the people of Palestine," Palestinian Prime Minister Mohammed Shtayyeh tweeted.

Hanan Ashrawi, a senior Palestine Liberation Organisation official said that "very serious, challenging days" are expected, given the Trump's close relationship with Netanyahu.

"This is extremely dangerous not just for Palestine, for Israel, for the region, but for the world," Ashrawi said.

'We will protect democracy'

Gantz on the campaign trail had promised not to sit in a government led by a prime minister facing criminal charges, but he recently backtracked, saying the enormity of the coronavirus crisis necessitated an emergency unity government.

"We have prevented a fourth election. We will protect democracy. We will fight coronavirus and care for all Israel's citizens," Gantz said on Twitter after signing the deal.

Netanyahu tweeted a picture of Israel's blue and white flag.

Israel so far has recorded more than 13,000 confirmed cases of the coronavirus and 173 deaths.

After elections on March 2 ended in a stalemate, the two leaders agreed late last month to try to form an "emergency" unity cabinet to cope with the burgeoning coronavirus crisis.

The talks dragged on and stalled several times since, reportedly over Netanyahu's personal legal problems, sparking concern that the collapse of a deal would force the country into new elections.

The main sticking points included a demand by Netanyahu to have more say on judicial appointments, which could play a role if his case eventually reaches the Supreme Court.

Although Netanyahu, Israel's longest-serving prime minister, repeatedly came up short in the last elections, the coalition agreement returns the leader to the premiership, defying critics who predicted his downfall and restoring his reputation as a political wizard.