Exit polls showed that Mr Barak won 58.5 per cent of the vote against only 41.5 per cent for Mr Netanyahu. Mr Netanyahu conceded defeat immediately after the polls closed, saying: "I want to congratulate Ehud Barak on his victory. We accept the will of the people." Mr Netanyahu also resigned as leader of his right-wing Likud party, which also suffered a heavy defeat, bringing to an end his career as Israel's most controversial political leader.
The election focused on Mr Netanyahu's character, his paranoid personal style and inability to get on with other members of his government. Many of those he led to victory three years ago now support Mr Barak.
Mr Barak, 57, is a career soldier turned politician after 35 years in the army, where he rose to become chief of staff. He entered politics in 1995, rising rapidly to lead the Labour party after the assassination of Yitzhak Rabin, the prime minister, and the victory of Mr Netanyahu in the last election in 1996.
The defeat of Mr Netanyahu opens the way for the resumption of peace talks between Israel and the Palestinians, which had stalled under his government. Mr Barak also pledged to get Israeli soldiers out of southern Lebanon within a year of taking office. This can be done only by resuming talks with Syria on an Israeli withdrawal from the Golan Heights, which Israel captured in 1967.
Mr Barak will move quickly to end Israel's international isolation. Because of Mr Netanyahu's failure to implement US-brokered peace agreements with the Palestinians President Bill Clinton was barely on speaking terms with him. Middle Eastern leaders have also been hoping that he would lose the election.
Mr Netanyahu failed to persuade voters that the issue in the election was relations with the Palestinians and negotiations with Yasser Arafat, the Palestinian leader. Mr Arafat will be very pleased with the election result since Mr Netanyahu's term in office has seen only very limited Israeli withdrawals and an expansion of Israeli settlements on the West Bank.
In his speech conceding defeat Mr Netanyahu said: "I've been working for 20 years in public service, from the days I was Israeli liaison in Washington. I have a lot more to give to the state of Israel, but now I believe the time has come for me to take a break and to be with my family." Mr Barak previously took part in the negotiations with the Palestinians over the Oslo accords. He also said on television last year: "If I had been born a Palestinian I would have joined a terrorist organisation." Mr Netanyahu re-broadcast his words with glee but without effect.
Mr Netanyahu may have expected defeat but not on this scale. He called the election five months ago in the expectation of victory after the extreme right turned against him when he signed the Wye Agreement with the Palestinians to make a limited withdrawal from the West Bank.
He was badly wounded in the campaign in January when Yitzhak Mordechai, his popular Defence Minister, turned against him and entered the race to be the next Israeli prime minister. The Russian Jewish immigrants and Shas, the party of the ultra-orthodox Sephardi (Jews from the Middle East) split apart and the 1 million Russians in Israel deserted in droves to Mr Barak.
The election saw a secular revolt against the influence of the ultra- orthodox, which appears to have damaged Mr Netanyahu with the voters. Shinui, a new anti-clerical party under the maverick leadership of Tommy Lapid, a television journalist, won six seats in the Knesset.
The other victor in the election was Shas, led by Aryeh Deri, recently sentenced to four years in prison for accepting bribes, which has won 15 seats in the Knesset. This means that it is only just behind Likud, which saw its representation sink to 19. With Mr Netanyahu's resignation as its leader the party may try to join a unity government under Mr Barak.
Gadi Sukenik, an Israeli analyst, said of the election results: "It is a left-wing bloc, without the religious."
Bitter divisions, page 11