JERUSALEM — Israel’s election was too close to call early Wednesday, with neither Prime Minister Benjamin Netanyahu nor his chief rival, the former army chief Benny Gantz, a centrist, immediately commanding enough support to form a majority coalition, according to exit polls.
But Mr. Gantz’s Blue and White party appeared to have come out ahead of Mr. Netanyahu’s conservative Likud, giving a small third party the power to decide the outcome. And his avowed desire to force a unity coalition including both their parties made it likely that, if the projections held, Mr. Gantz would be given the first chance of forming a government.
The murky outcome itself was a humiliating blow to Mr. Netanyahu, 69, the nation’s longest-serving prime minister, who forced the do-over election when he failed to assemble a coalition in May, rather than let Mr. Gantz have a try. For the second time in a row, his onetime deputy, Avigdor Liberman, denied Mr. Netanyahu a majority, this time urging the formation of a unity government.
“According to the current results, Netanyahu did not complete his mission,” Mr. Gantz told a crowd of cheering supporters in Tel Aviv early Wednesday. “We did.”
“Israeli society is strong,” he added, “but it is wounded, and the time has come to heal it.”
Long renowned as a political magician, Mr. Netanyahu campaigned frenetically right up until the polls closed Tuesday night, warning right-wing Jewish voters that Arabs were turning out in large numbers and flouting Election Day bans on campaign propaganda to spur his supporters into action.
Looking visibly deflated and sipping frequently from a glass of water, Mr. Netanyahu told a small but loud crowd in Tel Aviv that he would wait for the actual results, but planned to enter negotiations to establish “a strong Zionist government and prevent a dangerous anti-Zionist government.”
“There won’t be, there can’t be a government that relies on the anti-Zionist Arab parties, parties that deny Israel’s very existence as a Jewish and democratic state,” he said. “Parties that glorify and praise bloodthirsty terrorists who murder our soldiers, our citizens and our children. That simply cannot be.”
With indictments against him looming in three corruption cases, the election’s less-than-vindicating apparent outcome would put his future in grave jeopardy. As prime minister, he could stay in his post even if indicted, under Israeli law. And he could press his coalition to grant him immunity from prosecution. But as a lesser minister or ordinary lawmaker, he would have to resign if charged.
Israeli exit polls have often proven unreliable, and the official results, expected to trickle in overnight, could change the picture sharply. Many Israelis recalled the election of 1996, when they went to bed with the Labor leader Shimon Peres as the winner and woke up in the morning with Mr. Netanyahu as their next prime minister.
The two main contenders had offered Israelis starkly different choices.
Mr. Netanyahu was aiming for a narrow coalition with right-wing and ultra-Orthodox parties, who had promised to grant him immunity as he vowed to annex a large swath of the occupied West Bank. His heavy reliance on the ultra-Orthodox parties would only perpetuate and even expand what many see as their disproportionate influence over matters of religion and state.
Mr. Gantz pledged to forge a broad, secular government aimed at curbing the influence of the ultra-Orthodox, protecting the institutions of democracy and rule of law and healing internal divisions. He pledged to govern “from the center out,” saying 80 percent of Israelis agreed on 80 percent of the issues.
But in the hours after the election, Israel was effectively on hold, suspended between those two visions and unclear about its path forward.
Just five months after the last inconclusive ballot, the country could now face weeks of feverish coalition negotiations, political paralysis, brinkmanship and instability. A new government could take until November to be formed, marking a full year in campaign mode, a first for Israeli politics.
The process will begin in a few days when President Reuven Rivlin invites party representatives to recommend their choice for prime minister. Mr. Rivlin will give the mandate to the candidate with the best chance of forming a viable coalition, and has pledged to move as quickly as possible and do all he can to avoid a deadlock and a third election.
He could also bring Mr. Gantz and Mr. Netanyahu together for informal talks even before the final, official results are in.
The clearest winner on Tuesday, according to exit polls, was Mr. Liberman, the longtime Netanyahu ally turned nemesis who leads an ultranationalist secular party.
Mr. Liberman immediately moved to play the role of kingmaker, urging the formation of a “broad government, not a government that fights for its survival week to week, from one no-confidence motion to another.”
Speaking after exit polls came out on Tuesday night, he insisted he would stick to his campaign promise that his Yisrael Beiteinu party would not join a right-wing government that depended on ultra-Orthodox support.
“We only have one option,” he told supporters. “A broad, liberal, national government made up of Yisrael Beiteinu, Likud and Blue and White.”
Had Mr. Netanyahu come away with a clear victory, Mr. Liberman would have put the country through a costly, unwanted and exhausting second election for nothing. Instead, it appeared that he had triggered the do-over ballot, set the agenda for the contest and emerged from it in strong position to help decide Israel’s next leader.
For Mr. Gantz, 60, the preliminary results held the promise of a great achievement. A newcomer to politics, his first run in April ended in a tie for Likud and Blue and White. Now he is positioned to potentially take over as prime minister.
A late wave of exit polls showed Blue and White with a slight edge over Likud in two polls and the two coalitions tied in another poll. None of the surveys gave either man a governing majority.
The center-left had been waiting for many years for a candidate with the security credentials and stature to be a standard-bearer against Mr. Netanyahu, who has presented himself as the only leader capable of protecting Israel.
But the path to forming a unity government could be complicated. Mr. Gantz has pledged not to join a government with a prime minister who is facing indictment, while Mr. Netanyahu is not likely to give up easily on another chance at the helm.
“Someone is going to have to fold,” said Reuven Hazan, a professor of political science at the Hebrew University of Jerusalem, in an interview late Tuesday night. “Either Likud goes into a government without Netanyahu, or Gantz goes into a government with Netanyahu. It’s anybody’s guess. And right now, there’s no incentive for either of them to do it.”
Younger Likud leaders have signaled their desire for the chance to succeed Mr. Netanyahu. But his allies were in a defensive crouch on Tuesday.
“There won’t be an ousting of Netanyahu,” said Miri Regev, his culture minister and a Likud firebrand popular with the party’s grass roots. “We are all behind Netanyahu.”
Still, some rank-and-file Likud members gathered at the party’s election-night headquarters in Tel Aviv said bluntly that he had become a liability.
“I think Likud would have done far better with someone else at the top,” said Haim Guterman, 26, of Petach Tikva.
Mr. Netanyahu’s desperate-sounding campaign appeals had become a mainstay of Israeli elections, but if the exit polls were right, for the first time all of them may be proved true: His own voters were indeed being outnumbered, and right-wing votes were indeed being wasted on a small extremist party, Otzma Yehudit, that did not clear the threshold to be seated in Parliament.
In perhaps the most cutting twist, the Arabs did indeed flock to the polls “in droves,” Israeli news outlets reported: Turnout among Arab citizens appeared to surge past 60 percent, up from just 49 percent in April.
“Netanyahu discovered that incitement has a heavy price,” said Ayman Odeh, chairman of the Joint List of predominantly Arab parties.
Mr. Liberman’s fight with the ultra-Orthodox brought to the center of the election campaign an issue that has divided Israelis as long as they have had a country: the tension between secular Israelis, who once were a majority of Jewish citizens, and religious Israelis.
Mr. Liberman found himself aligning with liberals from the left and center in calling to curtail the financial and social burdens that the very religious impose on other Israelis. They demanded more pluralistic options for marriages and conversions, now dominated by the ultra-Orthodox rabbinate. And they expressed fury at the growing influence of a group of ultrareligious nationalist Jews who espouse anti-feminist, anti-gay views and a far-right, messianic ideology.
But Mr. Netanyahu had forged an ironclad bond with the ultra-Orthodox, and for good reason: They vote en masse, and at rates that are the envy of other parties. And with secular leaders singling them out as targets, ultra-Orthodox leaders said it was easier than ever to rally their voters to the ramparts.
Even Mr. Netanyahu’s biggest comfort zones — national security and diplomacy — were a source of unexpected headwinds.
President Trump pressured him into barring two Democratic members of Congress from entering Israel, setting off a political firestorm. Then Mr. Trump broached the idea of opening talks with Iran, which Mr. Netanyahu opposed. And Mr. Netanyahu’s staunchest advocate in the White House, John Bolton, the hawkish and fiercely anti-Iran national security adviser, was forced out.
In the end, Mr. Trump’s only election-eve gift to Mr. Netanyahu was a Twitter message on Saturday in which he talked of a United States-Israel defense treaty. National-security professionals in both countries have long opposed such a pact.
Mr. Netanyahu was battling on two fronts as his political timetable converged with his legal one.
Facing possible indictment in three corruption cases on charges of bribery, fraud and breach of trust, he has a last chance to avoid prosecution in a special hearing with the attorney general set for Oct. 2. Gaining parliamentary immunity may offer his best chance of avoiding prosecution.
One of the biggest surprises of the election was the apparent strength of the Arab vote. According to the exit polls, the Arab bloc may have gained up to three new seats in Parliament.
Only 49 percent of Arab voters cast their ballots in April, as many punished Arab lawmakers for splintering into rival factions. The politicians took the hint, and reunited into a single Joint List.
Mindful that Arab citizens want to see tangible improvements in their lives and to exert influence befitting one-sixth of the voting-age population, the Joint List’s leader, Ayman Odeh, broached the possibility of entering a center-left government under Mr. Gantz.
Mr. Gantz, for his part, gave interviews to Arabic-language news organizations, and Blue and White and other Jewish parties promised to fight crime, build housing and add hospital beds in Arab areas. Turnout among Arab voters was expected to approach 60 percent.