Israeli Prime Minister Benjamin Netanyahu's governing right-wing Likud Party appeared almost neck and neck with his main centrist rival for seats in parliament on election day, varying exit polls indicated.
Both he and his main rival Benny Gantz claimed victory after the polls showed that Mr Gantz's centrist Blue and White Party and Mr Netanyahu's right-wing Likud had won about the same number of seats in the 120-member parliament.
But with neither party capturing a ruling majority in the Knesset, the polls, on the country's main TV channels, put Mr Netanyahu in a stronger position to form a government with the help of right-wing factions.
No party has ever won an outright majority in the parliament, meaning days or even weeks of coalition negotiations will lie ahead.
Dubbed "King Bibi," Mr Netanyahu has rallied a rightist camp hardened against the Palestinians and played up Israeli foreign policy boons that are the fruit of his ties with the Trump administration.
But the Likud party leader's hope of overtaking Israel's founding father, David Ben-Gurion, as longest-serving premier in July has been dented by a looming graft indictment.
He denies any wrongdoing.
Critics warn of "Bibi fatigue" and argue that the parliamentary election should bring fresh faces to high office.
Stalking Mr Netanyahu in the opinion polls has been Benny Gantz, a former chief of the armed forces and centrist political novice.
Buttressed by two other former generals at the top of his Blue and White party, Mr Gantz, 59, has sought to push back against Mr Netanyahu's self-styled image as unrivalled in national security.
Mr Gantz promised a "new path" for the country after casting his vote.
"I'm happy to place myself at the service of the state of Israel," the former military chief said in his hometown of Rosh Haayin.
"I'm happy to stand for the good of the citizens on a new path. We shall respect democracy and call for a respectful and quiet day from all sides."
With little policy daylight separating the two candidates on Iran and the Palestinians, or on Israel's humming economy, much of the voting will be guided by the question of their character.
In vitriolic campaigns waged largely over social media rather than in town squares or street corners, they have exchanged escalating allegations of corruption, of fostering bigotry and even of conspiring with Israel's adversaries.
Mr Netanyahu casts himself as the victim of media bias and judicial overreach.
Mr Gantz casts himself as a salve for Israel's religiously and ethnically riven society and its relations with liberal Jews abroad.
"This election is about one thing - whether or not Netanyahu should remain in office. It's the only thing that really defines 12 out of the 13 parties which will be in the next Knesset," said Anshel Pfeffer, author of the biography "Bibi: The Turbulent Life and Times of Benjamin Netanyahu".
Israel’s president, Reuven Rivlin, will consult with the leaders of every party represented in the Knesset and choose whoever he believes has the best chance of forming a government.
Although both Mr Netanyahu and Mr Gantz have publicly ruled out a future alliance in a "national unity" coalition, some analysts predict a rethink - especially if the candidates agree to tackle together a widely expected US plan for Middle East peace.
That plan's sponsor, President Donald Trump, offered an unusually clement observation on the election, telling his Republican Jewish supporters on Saturday: "I think it's going to be close ... Two good people."