Israeli Prime Benjamin Netanyahu has claimed a "major victory" after exit polls showed his right-wing Likud neck-and-neck with the centre-left Zionist Union in the country’s general election.

"Against all odds: a great victory for the Likud. A major victory for the people of Israel!", he wrote on his official Twitter account. 

However, Zionist Union leader Isaac Herzog said he was still in the race to form Israel's next government, despite exit polls showing a last-minute surge by the rightwing Likud, leaving the two parties neck-and-neck.

"Everything is open," he told activists in Tel Aviv after analysts said Mr Netanyahu would have a far easier task of putting together a 61-seat majority than Herzog.

"I intend to make every effort to build a real social government in Israel," he added.

Figures published by public Channel 1 and private Channel 10 television both gave Likud and the Zionist Union 27 seats each in the 120-member Knesset, or parliament.

A third poll by private Channel 2 gave Likud a one-seat lead on the Zionist Union, with the ruling party taking 28 seats.

Mr Netanyahu's Likud which was seen trailing the Zionist Union of Isaac Herzog by up to four seats in the final polls published last week, outperformed all expectations by staying in step with its centre-left rival.

And in the coalition horse trading that will begin in earnest on Wednesday, Mr Netanyahu retains much more room for manoeuvre than Mr Herzog, given the backing he has from an array of smaller rightwing and religious parties.

"Netanyahu has done it. He has managed to catch up in the final lap," said Claude Klein, a specialist in constitutional law at Jerusalem's Hebrew University.

"He could form a rightwing government with the religious parties and Yisrael Beitenu or a government of national unity (with Herzog). But he has ruled out that option," he said.

Mr Klein added: "On paper, Isaac Herzog has no chance of putting together a majority which would depend on the support of the Arab List which includes openly anti-Zionist MPs."

Both Channel 2 and Channel 10 gave the rightwing-religious bloc, which includes Likud, the far-right Jewish Home, Yisrael Beitenu and the two ultra-Orthodox parties Shas and United Torah Judaism (UTJ), 54 seats.

The same surveys gave the centre, left and Arab bloc 56-57 seats, although the Joint List has so far played its cards close to its chest and refused to say whether it would join a Herzog-leg coalition.

Neither bloc includes the centrist Kulanu party, which is expected to play the role of kingmaker.

Under Israel's complex system of proportionality, the future prime minister will be the politician who can successfully put together a majority of at least 61 mandates. 

Final results are expected early in the morning.