Watch: End of the road for Benjamin Netanyahu
The Knesset erupted in cheers after agreeing that Naftali Bennett, a former right-wing ally of Mr Netanyahu’s now turned bitter rival, will become the new prime minister, presiding over a diverse and fragile coalition.
Mr Netanyahu remains head of the Likud party and will hold the post of opposition leader, though also faces a looming corruption trial.
Sunday’s vote, passed with a razor-thin majority of 60 to 59, ended a two-year cycle of political paralysis in which the country held four elections.
Mr Netanyahu sat silently during the vote. After it was approved, he stood up to leave the chamber, before turning around and shaking Mr Bennett’s hand.
Mr Bennett and his coalition were congratulated by the US president, Joe Biden, who said in a statement released by the White House on Sunday night that he wanted “to strengthen all aspects of the close and enduring relationship” between the two nations.
He added: “Israel has no better friend than the United States” and that Washington “remains unwavering in its support for Israel’s security”.
A motley crew of eight parties with deep ideological differences make up the new ruling coalition from right-wing supporters of Jewish settlements in the West Bank to left-wing parties who support a Palestinian State, including for the first time an Arab Islamist party, Ra’am.
Under the terms agreed by the new government, Mr Bennett, leader of the Yamina party, will serve the first two years as prime minister, followed by Yair Lapid, the centrist leader of party Yesh Atid, for two years – if the fragile coalition lasts that long.
In a speech before the vote, Mr Bennet concentrated mostly on domestic issues but told the Israeli parliament that he opposed efforts to revive Iran’s nuclear deal with world powers.
“Israel will not allow Iran to arm itself with nuclear weapons,” Bennett said, vowing to maintain Netanyahu’s confrontational policy. “Israel will not be a party to the agreement and will continue to preserve full freedom of action.”
He also had with a message for Hamas, following the recent 11-day war with the Gaza militant group.
“I hope the ceasefire in the south is maintained. But if Hamas again chooses the path of violence against Israeli civilians, it will encounter a wall of iron,” he said.
Mr Lapid called off a planned speech to parliament, instead saying he was ashamed that his 86-year-old mother had to witness the raucous behaviour of his opponents, after supporters of the outgoing prime minister interrupted proceedings, and some were escorted from the chamber.
In a brief speech, he asked for “forgiveness from my mother”.
“I wanted her to be proud of the democratic process in Israel. Instead, she, along with every citizen of Israel, is ashamed of you and remembers clearly why it’s time to replace you,” he said.
Mr Netanyahu had also taken to the floor to speak before the vote. He said he was leaving with his head held high.
“I have worked night and day for our country … we have turned Israel into a global power,” he said.
At the end of his lengthy speech, Mr Netanyahu said he would fight daily against this “terrible, dangerous left-wing government in order to topple it”.
He added: “With God’s help, it will happen a lot earlier than you think it will.”
Watch: Hundreds of Israelis celebrate Netanyahu's unseating