Israel's outgoing prime minister Benjamin Netanyahu (L) walks away from his successor, incoming Prime Minister Naftali Bennett, after a being ousted / © AFP
A motley alliance of Israeli parties on Sunday ended Benjamin Netanyahu's 12 straight years as prime minister, as parliament voted in a new government led by his former ally, right-wing Jewish nationalist Naftali Bennett.
Bennett, a tech millionaire and former special forces commander, was sworn in at the helm of an ideologically divided eight-party bloc united only by disdain for the country's longest-serving prime minister.
Netanyahu, 71, in typically combative style, vowed shortly before his defeat that "if it's our destiny to be in the opposition, we'll do so with our heads high until we take down this bad government and return to lead the country our way".
Beloved as "King Bibi" and "Mr Security" by his right-wing supporters and condemned as the "crime minister" by his critics, Netanyahu has long dominated Israeli politics.
But on Sunday, a vote in the Knesset legislature following weeks of political drama ended his government with a razor-thin majority of 60 to 59 in the 120-seat chamber.
US President Joe Biden swiftly congratulated Bennett.
Israelis in front of the Knesset (parliament) in Jerusalem celebrate the toppling of longtime prime minister Benjamin Netanyahu / © AFP
"I look forward to working with Prime Minister Bennett to strengthen all aspects of the close and enduring relationship between our two nations. Israel has no better friend than the United States," he said in a statement.
Delighted revelers packed a square near the Knesset (parliament) in Jerusalem and poured into Tel Aviv's city centre to celebrate Netanyahu's fall.
Throngs of people gathered in the coastal city, clapping, cheering and waving flags.
In Tel Aviv's Rabin Square, Netanyahu's opponents launched into celebrations, waving "Bye bye Bibi" placards.
- Fragile coalition -
Bennett, 49, told the Knesset before the vote that his government "represents all of Israel".
He said the country, after four inconclusive elections in under two years, had been thrown "into a maelstrom of hatred and in-fighting".
"The time has come for different leaders, from all parts of the population, to stop, to stop this madness", he said, to angry shouts of "liar" and "criminal" from right-wing opponents.
Netanyahu, who is battling corruption charges in a trial he dismisses as a conspiracy, has been the dominant Israeli politician of his generation, having also served a previous three-year term in the 1990s.
His supporters have hailed him as a defender of Israel who has been tough on archfoe Iran, but who also struck a series of historic normalisation deals with Arab nations last year.
Israel's Knesset (parliament) after March elections / © AFP/File
Being ousted from the top job leaves Netanyahu more exposed to his legal troubles, denying him the chance to push through legislation that could give him immunity.
Bennett, a former defence minister under Netanyahu, vowed to keep Israel safe from Iran, promising that "Israel won't let Iran have nuclear weapons", a goal the Islamic republic denies pursuing.
Netanyahu claimed Iran saw "celebrating" the birth of a "dangerous", weak left-wing government.
The diverse anti-Netanyahu bloc was cobbled together by the secular centrist Yair Lapid, a former TV presenter.
It spans the political spectrum, with three right-wing, two centrist and two left-wing parties, and even an Arab Islamic conservative party.
Lapid, 57, is to serve as foreign minister for the next two years before taking over from Bennett.
German Chancellor Angela Merkel on Sunday congratulated Bennett in comments tweeted by her spokeswoman: "Germany and Israel are connected by a unique friendship that we want to strengthen further. With this in mind, I look forward to working closely with you."
Canadian Prime Minister Justin Trudeau sent a message of congratulations, adding that Ottawa "remains steadfast in its commitment to a two-state solution, with Israelis and Palestinians living in peace, security, and dignity – without fear and with their human rights respected".
British Foreign Secretary Dominic Raab tweeted: "I look forward to continued cooperation on security, trade and climate change, and working together to secure peace in the region."
European Council president Charles Michel also tweeted his congratulations.
- 'Fraud' -
The improbable alliance emerged weeks after an 11-day war between Israel and Hamas, the Islamist group that rules the Palestinian enclave of Gaza, and following inter-communal violence in Israeli cities with significant Arab populations.
Netanyahu, a mastermind at navigating Israel's fractious politics, had tried in vain to peel off defectors, hoping to deprive the nascent coalition of its hard-won majority.
Supporters of Israeli Prime Minister Benjamin Netanyahu protest near the Knesset in Jerusalem on June 10 / © AFP/File
He accused Bennett of "fraud" for siding with rivals. Angry rallies by the premier's Likud party supporters resulted in security being bolstered for some lawmakers.
As his grip on power slipped, Netanyahu's bombastic remarks drew parallels to former US president Donald Trump, who described his election loss last year as the result of a rigged vote.
Sunday's Knesset approval also came amid heightened tensions with the Palestinians.
Right-wing Israelis are also angered over last week's postponement of a controversial Jewish nationalist march through flashpoint areas of east Jerusalem.
The "March of the Flags" is now slated for Tuesday, representing a key early test for the new government.
Gaza's rulers Hamas said political developments in Jerusalem wouldn't change their position on Israel.
"The form the Israeli government takes doesn't change the nature of our relationship," said the group's spokesman Fawzi Barhoum.
"It's still a colonising and occupying power that we must resist."