Difficult coalition talks still lie ahead, in a politically divided country where no one party has ever won an outright majority in Parliament.
              
Isaac Herzog, Netanyahu's chief opponent and head of the centre-left Zionist Union, said "everything is still open" and that he already had spoken to party leaders about forming a government.
              
But after days in which Zionist Union appeared poised to defeat Netanyahu's Likud, the exit polls late on Tuesday put the two parties in a dead heat. Netanyahu sought to seize the momentum, taking to Twitter to portray the photo finish as a triumph that defied earlier predictions.
              
Political commentators said Netanyahu seemed to have the easier path to forming a cabinet, with the support of traditional rightist allies - which would put him on course to becoming Israel's longest serving leader. But he would also need the backing of kingmaking centrists, who were non-committal on  their future moves after the polls closed.

Netanyahu pulled off the feat with a pitch for ultranationalist votes in the final days of the hard-fought campaign, using tactics that could deepen a feud with the White House.
              
Netanyahu has focused on Iran's nuclear programme and militant Islam. But many Israelis had said they were tiring of the message, and the centre-left campaigned on social and economic issues, surging in polls before election day.
              
An exit poll gave Likud 28 seats and Zionist Union 27 in the 120-member parliament. Channel 10, revising its survey several hours after voting ended, put that margin at 27 seats for Likud to 26 for Zionist Union. Channel 1 had both parties tied at 27.
              
"Against all odds: a great victory for Likud," a beaming Netanyahu told cheering supporters in a speech at party election headquarters in Tel Aviv. He said he had spoken to leaders of other right-wing parties and urged them to form a "strong and stable" government with him without delay.
              
"He's a magician, he's a magician," the crowd chanted.
              
Opinion polls in the run-up to the ballot had shown Zionist Union with a three- to four-seat advantage over Likud, suggesting the public had warmed to Herzog, who won over voters with flashes of wit after enduring being lampooned for his short stature and reedy voice.
              
An initial count gave Likud a 32-24 seat lead over Zionist Union but that was based on votes from 57 percent of the polling stations. Final results were not expected until later on Wednesday.

Latest News from World News Desk