Israel's opposition leader Yair Lapid said late Wednesday he had succeeded in forming a coalition to end the rule of Prime Minister Benjamin Netanyahu, the country's longest serving leader.
Once it is confirmed by the 120-member Knesset legislature, it would end the long reign of the hawkish right-wing leader known as Bibi who has long dominated Israeli politics.
Lapid's announcement came in the final hour before a midnight deadline, after he had hammered out deals with a group of diverse parties spanning the political spectrum, united in their desire to oust Netanyahu.
"Lapid informed the president of the state of Israel... that he has succeeded in forming a government," his party said in a statement.
The right-wing nationalist tech millionaire Naftali Bennett, 49, would serve first as prime minister in a rotation deal, before Lapid takes over in two years.
"This government will work to serve all the citizens of Israel including those who aren't members of it, will respect those who oppose it, and do everything in its power to unite all parts of Israeli society," Lapid told President Reuven Rivlin in a phone call.
The parties had been locked in days of gruelling talks in a hotel near Tel Aviv before the alliance was formalised.
In front of the hotel where the negotiations were taking place, hundreds of demonstrators, both in favour of and opposed to the "coalition of change", rallied under a strong police presence.
Also read: Israel set for a change of government?
Lapid, a former television presenter who heads the secular centrist party Yesh Atid, last Sunday won the crucial support of Bennett, head of the Yamina "Rightward" party.
To build the anti-Netanyahu bloc, Lapid had to sign individual agreements with seven parties.
They include the hawkish New Hope party of Netanyahu's former ally Gideon Saar, and right-wing secular nationalist Avigdor Lieberman's Yisrael Beitenu party.
Also part of the alliance is the centrist Blue and White party of Defence Minister Benny Gantz, the historically powerful Labor party and the dovish Meretz party.
The leader of the Arab Israeli Islamic conservative party Raam, Mansour Abbas, late Wednesday also agreed to join the coalition after securing pledges for funds and policies that would benefit Israel's 20 percent minority of Palestinian descent.
"I just signed an agreement with Yair Lapid so that he can declare that he can form a government after reaching... agreements on various issues that serve the interest of Arab society," he said.
Although other Arab parties supported the late prime minister Yitzhak Rabin from outside his coalition in the 1990s, Abbas was the first Arab politician in Israel to openly bargain for a role in the coalition, said political analyst Afif Abu Much.
Abu Much noted that lawmakers with other parties representing Arab citizens of Israel announced they would oppose the government headed by Bennett, a strong supporter of Jewish settlements in the West Bank.
Lapid was tasked with forming a government by Rivlin after Netanyahu failed to put together his own coalition following March elections, the fourth inconclusive vote in less than two years.
Wednesday night's deal deepens the woes of Netanyahu, 71, who is on trial for criminal charges of fraud, bribery and breach of trust while in office -- accusations he denies.
If he loses power, he will not be able to push through changes to basic laws that could give him immunity, and will lose control over certain justice ministry nominations.
The premier and leader of the conservative Likud party, who served an earlier three-year term in the 1990s, has long been the dominant figure of Israeli politics and was close to former US president Donald Trump.
Netanyahu clinched historic normalisation agreements with four Arab states, and unrolled a world-beating Covid-19 vaccination campaign.
But he has not engaged in substantive peace talks with the Palestinians, who have been angered by Israel's deepening control of areas they eye for a future state.
Escalating tensions between Israel and the Palestinians last month spiralled into a deadly 11-day exchange of rocket fire from Gaza and devastating Israeli air strikes.
Netanyahu defiantly condemned the alliance against him as "the fraud of the century" last Sunday, warning that it would result in "a left-wing government dangerous to the state of Israel".