No party has ever won an outright majority under Israel's proportional representation voting system, and neither side is expected to get more than a quarter of the votes in Tuesday's election.

Mr Netanyahu, 65, called early elections late last year, in an attempt to form a more stable coalition.

Opinion polls published before the weekend suggested that the Zionist Union was likely to win the most seats, though it may still be possible for Mr Netanyahu to form a coalition government even if his Likud party fails to top the poll.

At the scene: BBC's Kevin Connolly, Likud HQ, Tel Aviv

Likud officials are preparing in a huge auditorium for a celebration that they can't be sure they'll be in a position to hold.

Of course it isn't over 'til it's over, so the bunting, the pumping disco music and the giant video backdrop showing the great and good of the party may not go to waste.

The talk here is of Mr Netanyahu's plan to make a last-minute television appeal and the way in which it was overruled by the national electoral commission.

Would it have looked a little desperate or did Mr Netanyahu calculate that it would be banned, outraging supporters who'd then be motivated to vote at the last minute?

Whatever the thinking, it's given the closing hours of this long campaign a twist of drama.

At the scene: BBC's Yolande Knell, Zionist Union HQ, Tel Aviv

The basketball court used by Hapoel Tel Aviv has been transformed into the headquarters of the Zionist Union party list. The side is usually seen as the underdog in local games against Maccabi Tel Aviv.

But tonight there are hopes that the Zionist Union will deliver an upset here against its Likud party rivals.

Its slogan "Responsible Leadership for Israel" is displayed around the hall. The alliance has made a strong impression on middle class voters, with its focus on socio-economic issues.

Although the stage is set for a party, activists are being cautious. It is well understood that if the president is to ask Mr Herzog to form the next government, his list must not simply beat Likud it must beat it by a significant margin and it needs other left and centrist parties to perform well too.

As Mr Netanyahu cast his vote on Tuesday, he ruled out forming a coalition with the Zionist Union.

"There will not be a unity government with Labour. I will form a nationalist [right-wing] government," he said.

He also posted a video message on his Facebook page, saying: "Right-wing rule is in danger. Arab voters are going to the polls in droves. Left-wing organisations are bringing them in buses."

He later took the unusual step of calling the media to his official residence to issue a statement while voting was under way, to repeat his concerns about the opposition winning.

Zionist Union leader Yitzhak Herzog said his rival represented the "path of despair and disappointment".

Mr Herzog told the BBC that his government would work to "correct the unfairness in [Israel's] economy", strengthen the country's relationship with the US and revive negotiations with the Palestinians.

He expressed support for a two-state solution, saying: "It's very important for the future of Israel that we separate from the Palestinians.

"We must find the right partners to negotiate with them."

The main players

Benjamin Netanyahu: Victory for his Likud party could mean a fourth term for the veteran of Israeli politics. His hawkish stance on the Palestinians and Iran have made him popular with the right but a divisive figure.

Yitzhak Herzog: The co-leader of the centre-left Zionist Union electoral alliance, Mr Herzog has accused Likud of depressing Israeli living standards and campaigned against Mr Netanyahu's foreign policy. He has tried to counter Mr Netanyahu's accusations he is "soft" by pointing to his special forces background.

Tzipi Livni: Mr Herzog's co-leader in the Zionist Union, Ms Livni is a prominent advocate of seeking more co-operation with the Palestinian Authority.

Moshe Kahlon: A former Likud welfare and communications minister under Benjamin Netanyahu, Mr Kahlon's centre-right Kulanu party could play kingmaker in a coalition.

By 20:00 voter turnout stood at 65.7%, slightly above the figure for the last election in 2013, the Central Elections Committee reported.

Many of the candidates have concentrated on Israel's socio-economic problems, including the high cost of living and slow economic growth.

Yohanan Plesner, President of the Israel Democracy Institute, a think tank, told the BBC that many voters felt that politicians had been dodging "the real issues that they care about, which is cost of living and mainly cost of housing".

Image copyrightReutersImage caption
Millions of Israelis have turned out to vote on in the tightly-fought election

Image copyrightReutersImage caption
Right-wing supporters have been rallying but the centre-left is expected to win most seats

Image copyrightEPAImage caption
Moshe Kahlon, leader of the new Kulanu party, could play the role of kingmaker in coalition talks

The prime minister has consistently accused his centre-left challengers of being willing to relinquish Israel's claim to Jerusalem as its indivisible capital in peace talks with the Palestinians.

On Monday, he made his pledge to prevent the creation of a Palestinian state in a speech at the Har Homa Jewish settlement in East Jerusalem.

Palestinians seek East Jerusalem - occupied by Israel since the 1967 Middle East war - as the capital of a future Palestinian state.

Another term for Mr Netanyahu would mean more scepticism on a peace deal with Palestinians and a strong focus on strategic security issues like Iran's nuclear threat, the BBC's Kevin Connolly reports from Jerusalem.

Mr Herzog has accused Mr Netanyahu of "panicking".

Visiting the Western Wall, one of the holiest sites in Judaism, on Sunday, he pledged to "safeguard Jerusalem and its residents in actions, not just words, more than any other leader".

Israel election

Nearly six million Israelis voting for a new parliament (Knesset)

Votes are cast for a party, rather than individual candidates

120 seats up for grabs, though electoral system means no single party will achieve a majority

Blocs of parties must command at least 61 seats to form a government

President has seven days in which to appoint an MP with best chance of forming a government