A revised exit poll released by Israel’s public broadcaster Kan early on Wednesday projected that Blue and White would win 32 seats and Likud 31 in the 120-seat Knesset.

In third place was the Israeli Arab Joint List with 13 seats; followed by Mr Lieberman’s secular nationalist Yisrael Beitenu party with nine; the ultra-Orthodox Shas and United Torah Judaism parties with nine and eight respectively; the right-wing Yamina party with seven, and the left-wing Labour-Gesher and Democratic Union alliances with six and five respectively.

There was a muted response at Likud’s election night headquarters in Tel Aviv as the exit polls were released.

Mr Netanyahu’s Likud party may end up in an even weaker position than after April’s election

Hundreds of chairs for party supporters remained empty, as activists were kept outside the hall and leaders digested the numbers.

Likud’s foreign affairs director noted that Israeli exit polls had got things wrong in the past. Last time, they underestimated the number of votes for Likud and also for some of the religious parties allied to Mr Netanyahu.

“There is no point starting to work out a coalition based on these numbers as they will change,” Eli Hazan said.

But Blue and White was “cautiously optimistic” that Israel would get new leadership, spokeswoman Melody Sucharewicz told the Times of Israel.

ANALYSIS

The votes will be counted through the night. But it could take weeks of coalition horse-trading before the next government and prime minister emerge.

The election has been a referendum on Benjamin Netanyahu’s last 10 years in office. In opposition strongholds in Tel Aviv I saw queues of voters were waiting and hoping to end his political career.

Mr Netanyahu was, as usual, a formidable campaigner, even starring in his own commercials. His message was that he’s the only one – with his powerful friends like Donald Trump – to protect Israelis from Iran and the Palestinians.

On walkabout in Tel Aviv, I saw Avigdor Lieberman, who could be the politician the prime minister fears most once the coalition negotiations start. His Yisrael Beiteinu party could hold the balance of power.

One important factor is that although he used to be a major ally of the prime minister, now they’re opponents, even enemies.

After the exit polls Mr Lieberman’s supporters were the only ones who were celebrating. If the results back that up – polls aren’t always accurate – then the Netanyahu era in Israeli politics is ending.

I wonder how well the prime minister will sleep tonight.

What could happen next?

The BBC’s Tom Bateman says that if the polls are correct Mr Netanyahu has no simple route to government. In fact, the figures put him in an even weaker position than after April’s election, when coalition talks collapsed, he adds.

Mr Gantz could emerge as leader of the largest party, but he could have an even more complex job to form a government.

Mr Lieberman, an ally-turned-rival of the prime minister, could be crucial in deciding who takes office.

He prevented Mr Netanyahu from forming a coalition after the last vote because he refused to back down over a longstanding dispute with religious parties over a bill governing exemptions from military service for ultra-Orthodox young men.

Avigdor Lieberman wants a “broad, liberal, national government”

At a rally in Jerusalem on Tuesday night, Mr Lieberman reiterated a call he made during the campaign for unity government.

“We only have one option,” he told supporters. “A broad, liberal, national government made up of Yisrael Beiteinu, Likud and Blue and White.”

Our correspondent says such a coalition only seems feasible if Mr Netanyahu were toppled as leader of Likud, as opposition groups have vowed not to sit with him at the helm.

Other possibilities could well play out first, including a third election, complicated by Mr Netanyahu’s looming hearing on corruption allegations, he adds. The prime minister denies any wrongdoing.

If the official results prove to be inconclusive, it will fall to President Reuven Rivlin to decide who gets the mandate to try to form a government. That person will have 28 days to do so, with a possible extension of not more than 14 days.

A spokesman for Mr Rivlin said he would hold consultations with party representatives “after he receives a clear picture of the results, and as soon as possible”.