From the beginning, however, exit polls conducted by Israeli television channels all showed that Netanyahu and his Likud party were in a stronger position to form a majority coalition in the Knesset, or parliament, which is what ultimately matters.

AD

As the night went on, with 95 percent of the ballots counted, Israeli broadcasters reported that Likud and Gantz’s Blue and White party were tied, with 35 seats each but Netanyahu had the clearer path to form a government.

AD

“I want to thank all of you from the bottom of my heart. It’s an unbelievable, tremendous victory,” Netanyahu told his supporters, his wife, Sara, at his side.

A few hours earlier, Gantz had told a flag-waving crowd that it was a “historic” day for Israel.

“In elections there are winners and losers, and we are the winners,” he said. “We won and we will keep on winning.”

What is certain is that Gantz, a former military chief of staff who first entered politics late last year, has put up a formidable challenge, even if he fails to secure the position of prime minister.

AD

“He started his move three months ago and it looks like he could have won as many seats as the Likud party that’s existed for more than 40 years,” said Meir Rubin, executive director of the right-wing Kohelet Policy Forum. “It’s an incredible achievement.”

AD

But if Netanyahu prevails, that will be perhaps the greater political feat, given that Israel’s attorney general has recommended indicting the prime minister in three corruption cases, including on bribery, corruption and breach-of-trust charges.

Netanyahu, a dominant force in Israeli politics for a quarter of a century and Israeli leader for a total of 13 years, had painted the election as a referendum on his leadership. He has been battling to win a new political mandate even as the corruption allegations close in.

AD

If he forms a new government and survives until July, he will make history, becoming the country’s longest-serving prime minister, outstripping Israel’s founding father David Ben-Gurion.

In coming days, Israeli President Reuven Rivlin will nominate the leader of the party with the majority of support to try to form a government. Rivlin will make this choice after consulting with parties that have won Knesset seats.

AD

“The name of the game is forming a majority,” said Reuven Hazan, a political science professor at Hebrew University.

If the election had been a straight referendum on Netanyahu, Gantz might have a closer chance to become prime minister, according to partial results and exit polls. But even in the number of votes, Netanyahu had the edge over Gantz on Wednesday morning, with Likud at 26.3 percent and Blue and White at 25.9 at 9 a.m. Israeli time.

In Israel’s fragmented political system, about 40 party slates contested the election. To become prime minister, a party leader must cobble together a majority consisting of at least 61 seats — so it is not necessarily the head of the party with the most seats that becomes prime minister.

Affecting the ease with which Israel’s veteran leader could make a coalition is whether smaller right-wing parties, which would join a Netanyahu coalition, reach the 3.25 percent vote threshold required to enter the Knesset, the equivalent of winning around four seats. The New Right party of right-wing education minister Naftali Bennett looked set to drop out.

AD

AD

The Arab Ram-Balad party, also hovering around the threshold level, looked like it could squeak in.

Meanwhile, Moshe Feiglin, a libertarian pro-marijuana candidate who says he’s open to joining either coalition, was also hovering around the threshold, but looked like he might not make it into the Knesset.

“The small parties will be the story of this election,” Rubin said. “They will change everything.”

Israeli television stations broadcast dramatic countdowns to their exit polls, which the three main channels all released at 10 p.m., as soon as the polls closed. While Channel 12 had initially called a much closer race, with the Knesset evenly split and Netanyahu four seats behind Gantz, that channel later adjusted its projections to include voters polled in the last hours of voting and predicted that Netanyahu would lead by one seat.

AD

AD

“I want to tell you something personal: I am thrilled the people of Israel have shown their belief in me for the fifth time,” said Netanyahu.

Gantz, also expressed confidence in his speech that he could form a coalition, but not all were convinced. “It was a nice victory speech,” quipped Channel 12 anchor Yonit Levy. “But we don’t know if it was a victory.”

Gantz has tried to rally people around a message of unity, but some saw a vote for him simply as a vote against Netanyahu.

“I don’t really care who comes in his place,” said Michael Livny, a doctor voting near Jerusalem. “I just don’t want a crook as my leader anymore.”

In the lead-up to the election, Netanyahu urged his supporters not to be complacent, saying right-wing rule was in peril and the election was not in the bag. He sought to pull votes away from smaller right-wing parties by telling their supporters that there might not be a right-wing government at all if they didn’t vote for his Likud party.

AD

AD

In a final bid to garner right-wing support, he promised to apply Israeli sovereignty to Jewish settlements in the West Bank, which are considered illegal by much of the international community. He had also stoked fears that Gantz would team up with the Arab parties to form a coalition.

Despite the legal challenges he faces and the controversies he has courted, Netanyahu has a die-hard base that will vote for him unquestioningly. Michaela Ben Lulu, a lifetime Likud supporter, called Netanyahu a magician and said she admired his diplomacy, especially his relationship with President Trump.

“He loves this nation and the nation loves him,” she said of Netanyahu. “I don’t care about the corruption claims or indictment. He doesn’t need money. He’s straight and trustworthy.”

AD

Overall voter turnout stood at 67.9 percent, dipping from 72.33 percent in 2015, according to the elections committee.

Police said they were investigating “irregularities” in polling stations in Arab-majority areas in northern Israel, after reports that as many as 1,200 Likud volunteers were found with hidden cameras. But Arab party representatives said that they had more-pressing matters on their minds.

There were indications that turnout among Arab Israelis, who account for around 20 percent of the population, may have dipped amid dissatisfaction over a split in the main Arab slate. Meanwhile, moves by Netanyahu’s government that were perceived as ­anti-Arab, such as the adoption of the controversial Nation State law last year, bolstered calls for an Arab boycott of the vote.

AD

AD

Yohanan Plesner, the head of the Israel Democracy Institute said it had been an “extraordinary” election given the prime minister is fighting from under a legal cloud and a new centrist party has emerged as a contender.