JERUSALEM (AP) — Israeli Prime Minister Benjamin Netanyahu held an edge over his main rival in Israel’s third election in under a year, exit polls indicated Monday night, but it was unclear whether he could clinch the parliamentary majority needed to claim victory.

Exit polls on Israel’s main TV channels showed Netanyahu and his nationalist and religious allies winning 59 seats, two short of a parliamentary majority. The center-left bloc, led by former military chief Benny Gantz, was projected to win 54 to 55 seats. Earlier projections had forecast 60 seats for Netanyahu and his allies, putting him on the cusp of victory.

If the official results from Monday's election match the exit polls, Netanyahu could find himself stuck in continued political deadlock ahead of his trial on corruption charges, set to begin March 17.

Netanyahu, the longest-serving leader in Israeli history, has been a caretaker prime minister for more than a year as a divided country has weathered two inconclusive votes and prolonged political paralysis. With pre-election opinion polls forecasting another deadlock, Netanyahu had sought a late surge in support to score a parliamentary majority along with other nationalist parties for a fourth consecutive term in office and fifth overall.

He appeared to get it in the form of a surprisingly high turnout despite the weariness accompanying the second repeat election.

Netanyahu tweeted a heart emoji with the word" thanks" as well as photo of himself surrounded by his family, aides and supporters proclaiming “a giant victory for Israel.”

Miri Regev, a senior Likud member, proclaimed an "overwhelming victory" for Netanyahu's party.

“The nation had its say, a referendum that proved the trust of the people in Netanyahu and in the Likud, with all the indictments and all the attempts to depose Netanyahu,” Regev said.

But as the exit polls scaled back Likud's apparent performance, Netanyahu delayed what had been expected to be a joyous victory speech. At 1:30 a.m, Netanyahu still had not emerged at his party's headquarters.

Netanyahu's Likud party was projected to win 36-37 seats, a gain from September, when it won 32. Gantz's centrist Blue and White party, which ran on a message that the prime minister is unfit to lead because of the serious charges against him, was projected to win 32-34 seats, roughly the same number as in September.

Addressing a raucous crowd of supporters early Tuesday, Gantz did not concede defeat.

“This wasn't the outcome that perhaps we would have wanted,” he said. Nonetheless, he said the party would not compromise its principles and would wait for final results.

“We have just begun. We have a long road ahead,” he said.

Despite Netanyahu's impressive showing, neither party appeared able to form a coalition with its traditional allies. With the prospect of a unity government between them seemingly off the table after a particularly nasty campaign, the vote may well turn into merely a preamble to another election if Netanyahu's Likud can't garner a majority.

“This is clearly an achievement from Netanyahu's standpoint but by no means is it a clear, decisive outcome that enables him to form a stable, functioning government,” said Yohanan Plesner, president of the non-partisan Israel Democracy Institute. “The country is heading toward constitutional uncertainty.”

There was little fanfare ahead of the vote, with a noticeable absence of campaign posters on the streets and public rallies that typically characterize the run-up to Israeli elections.

The elections commission said 71% of eligible voters cast ballots, higher than the previous elections last April and September.

Israel set up some 15 stations to allow voting by hundreds of people who have been ordered to remain in home quarantine after possible exposure to the coronavirus.

"The corona thing is completely under control. Today we've taken all the precautions that are necessary. People can go and vote with complete confidence," Netanyahu said after casting his ballot in Jerusalem.

Netanyahu sought to portray himself as a statesman who is uniquely qualified to lead the country through challenging times. Gantz has tried to paint him as divisive and scandal-plagued, offering himself as a calming influence and an honest alternative.

Gantz says he favors a national unity government with Likud, but only if it rids itself of its longtime leader because of the corruption charges against him. Netanyahu, who still enjoys widespread support in his party, insists he must remain prime minister in any unity deal.

With his career on the line, Netanyahu campaigned furiously. He took a hard turn to the right in hopes of rallying his nationalist base, promising to expand and annex West Bank settlements. In a campaign marked by ugly smears, Netanyahu's surrogates have spread unfounded allegations that Gantz is corrupt, unstable and susceptible to blackmail by Iran.

Netanyahu is desperate to assemble a narrow 61-seat majority before his trial begins. He has failed to secure himself immunity from prosecution, but with a strong hold on power he could seek other avenues to derail the legal proceedings against him.

Netanyahu is charged with bribery, fraud and breach of trust stemming from accusations he accepted lavish gifts from billionaire friends and promised to promote advantageous legislation for a major newspaper in exchange for favorable coverage. He vowed to prove his innocence in court.

Maverick politician Avigdor Lieberman, whose party is projected to win 6-8 seats, once again looms as a potential kingmaker. Lieberman has not committed himself to either candidate, although he has promised there will not be a fourth election.

A weary-looking Lieberman vowed to stick to his principles and said he would take stock once the final results are in. “We won't move a millimeter from what we promised our voters," he said.

Official results are expected overnight. Attention will then shift to President Reuven Rivlin, who is responsible for choosing a candidate for prime minister. He is supposed to select the leader who he believes has the best chance of putting together a stable coalition. The honor usually goes to the head of the largest party, but not necessarily. Just as important is the number of lawmakers outside the party who recommend the candidate.

Rivlin's selection will then have up to six weeks to form a coalition. If he fails, another candidate then has 28 days to form an alternative coalition. If that effort fails, new elections would be forced.

“This is usually a holiday, but to be honest, I have no festivity in me, just a sense of deep shame before you, the citizens of Israel,” Rivlin said as he voted. "We don't deserve another horrible and filthy campaign like the one that ends today and we don't deserve this endless instability. We deserve a government that will work for us.”

Associated Press writers Joseph Krauss, Ilan Ben Zion and Tia Goldenberg contributed.