Mr. Netanyahu, the longest serving leader in Israeli history, is seeking a fourth consecutive term in office, and fifth overall. But he faces a stiff challenge from retired military chief Benny Gantz, whose centrist Blue and White party is running even with Mr. Netanyahu’s Likud.

Israelis began voting on Tuesday in an unprecedented repeat election that will decide whether longtime Prime Minister Benjamin Netanyahu stays in power despite a looming indictment on corruption charges.

Mr. Netanyahu, the longest serving leader in Israeli history, is seeking a fourth consecutive term in office, and fifth overall. But he faces a stiff challenge from retired military chief Benny Gantz, whose centrist Blue and White party is running even with Mr. Netanyahu’s Likud.

Both parties could struggle to form a majority coalition with smaller allies, though, forcing them into a potential unity government.

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

Tuesday’s vote marks their second showdown of the year after drawing even in the previous election in April.

Mr. Netanyahu appeared poised to remain in office at the time, with his traditional allies of nationalist and ultra-religious Jewish parties controlling a parliamentary majority.

But Avigdor Lieberman, his mercurial ally-turned-rival, refused to join the new coalition, citing excessive influence it granted the ultra-Orthodox Jewish parties. Without a parliamentary majority, Netanyahu dissolved parliament and called a new election.

Opinion polls have forecast similar results this time around, potentially putting Lieberman in the role of kingmaker.

The performance by the Soviet-born politician’s Yisrael Beitenu party is just one of the factors that could determine Netanyahu’s future. Several small parties are fighting to squeak past the minimum 3.25% threshold for entering parliament. The performances of these parties could make or break Netanyahu’s ability to form a coalition. Heavier turnout by Arab voters, many of whom stayed home in April, could hurt Netanyahu.

The longtime Israeli leader is desperate to secure a narrow 61-seat majority in parliament with his hard-line religious and nationalist allies who are expected to approve legislation that would grant Mr. Netanyahu immunity from prosecution.

Israel’s attorney general has recommended pressing criminal charges against Mr. Netanyahu in three separate corruption cases, pending a long delayed pre-trial hearing scheduled next month.

With his career on the line, Mr. Netanyahu has campaigned furiously and taken a late hard turn to the right in hopes of rallying his nationalist base.

Aron Shaviv, who managed Mr. Netanyahu’s 2015 re-election campaign, said Mr. Netanyahu believed “there’s no such thing as bad coverage.” But he thought his former boss may be making a mistake by appealing so heavily to hard-liners and giving up on moderate voters.

“He’s turned people off, playing the right-left polarization as far as he possibly can,” he said.

A centerpiece of his eleventh-hour agenda has been the pledge to extend Israeli sovereignty over parts of the West Bank and to annex all the Jewish settlements there, something Mr. Netanyahu has refrained from doing during his decade-plus in power because of the far-reaching diplomatic repercussions.

Mr. Netanyahu has also been flaunting his close ties to President Donald Trump, and the prospect of a defense pact between their countries shortly after the election, as part of his frantic push get out the vote and dictate the election’s agenda on his terms.

In his attacks on Arabs, Mr. Netanyahu has made unfounded claims of fraud in Arab voting areas and unsuccessfully pushed for legislation to place cameras in polling stations on election day.

Yohanan Plesner, president of the non-partisan Israel Democracy Institute think tank and a former lawmaker, said he didn’t think it reflected genuine panic.

“I think you’re observing Israel’s most seasoned and competent politician who knows exactly how to fire up his base and is now using all his tools at his disposal in order to ensure victory,” he said.

Polling stations opened at 7 a.m. Tuesday with exit polls expected at the end of the voting day at 10 p.m. Official results are projected to come in overnight.

That’s when the real jockeying may get under way, with attention shifting 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 his own party who recommend him to the president.

Mr. Rivlin’s selection will then have up to six weeks to form a coalition.