Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Israeli Prime Minister Benjamin Netanyahu surged ahead of his chief political rival but looked set to fall two seats short of a governing majority in the country’s third election in under 12 months Monday, according to exit polling.

Netanyahu’s center-right Likud party was predicted to win 36 seats, while its rival, the centrist Blue and White party, would capture 32.

With roughly 90 percent of the votes already counted, both Netanyahu's right-wing bloc and Blue and White's centrist and left-wing bloc were set to fall short of the 61 seats needed to form a governing coalition in the 120-seat parliament, known as the Knesset.

The right-wing bloc looked set to win 59 seats — two seats short of the threshold. The center-left bloc was predicted to capture between 52 seats. No Israeli party has ever won an outright majority, which forces the larger parties to form blocs with smaller allies.

It remains unclear whether Netanyahu would be able to clinch the parliamentary majority needed to claim victory, but if the results match the exit polls, it will give the caretaker prime minister a welcome boost ahead of his trial on corruption charges that is slated to begin March 17.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Netanyahu lost no time in celebrating. He told a cheering crowd in Tel Aviv that his party "turned lemons into lemonade.

"What a joyous night," Netanyahu said. "This victory is especially sweet, because it is a victory against all odds."

The country’s unprecedented third election once again turned into a neck-and-neck race between Netanyahu and his chief political rival, former Israeli chief of staff Benny Gantz. In September, Gantz's Blue and White came in first, with 33 seats, trailed by Netanyahu's Likud, with 32. In April, the parties tied with 35 seats each.

As Israel’s longest-serving prime minister and a close ally of President Donald Trump, Netanyahu has campaigned on his experience, diplomatic know-how and his record on security.

Gantz, a relative political novice, has campaigned on a promise of clean government and social harmony but has also stressed his security credentials as a former military chief. He has also argued that Netanyhau is unfit to serve under the shadow of a looming trial on charges of bribery, fraud and breach of trust.

The vote Monday comes two weeks before Netanyahu is due to appear in court to face the charges, for which he faces up to 10 years in prison if convicted of bribery and a maximum 3-year term for fraud and breach of trust, according to legal experts. Netanyahu has denied any wrongdoing and said he is the victim of a "witch hunt."

Winning a majority could allow him to convince parliament to grant him legal immunity from the corruption charges for which he was indicted in November.

Both Netanyahu and Gantz have embraced the Trump administration’s Mideast peace plan that would create a conditional path to statehood for Palestinians, while allowing Israel to extend its sovereignty to the vast majority of its settlements in the occupied West Bank.

Gantz, however, has said he opposes any unilateral solutions to the conflict and that any decision should be reached in negotiation with the Palestinians. Meanwhile, in the aftermath of the publication of the Mideast peace plan, Netanyahu pursued a vote to extend Israeli sovereignty over the areas seemingly without consulting the Palestinians who have emphatically rejected the deal.

Yohanan Plesner, the president of the nonpartisan Israel Democracy Institute, said there was “no doubt” that Netanyahu has won a significant political mandate from the Israeli people.

“Israelis voiced their support for the man they perceive to have bringing them security and prosperity,” Plesner wrote in a statement after the polls were published.

But he said the country was also headed toward constitutional uncertainty as Netanyahu’s trial was set to begin March 17 upon which Israel would find itself in an “unprecedented situation” with its prime minister fighting to clear his name in court.