TEL AVIV - Prime Minister Benjamin Netanyahu's main rival on Wednesday conceded defeat in Israel's elections, paving the way for the longtime leader to forge a coalition that could be the most religious and far-right government in the country's history.

Leaders of the Blue and White party, headed by former military chief Benny Gantz, made the announcement once it appeared there was no way they could secure a majority in Israel's 120-seat Knesset to form a government.

"We didn't win this time," said Yair Lapid, a Blue and White leader vowing, the party would come back fighting in the next election. Speaking after him, Gantz said he would serve Israelis whether he was in the government or not.

"It's just my first day in the next 10 years that I plan to serve the Israeli public," he said. "The war is not over."

Netanyahu's Likud party and Blue and White are both on track to win 35 seats in Israel's Knesset, or parliament, with about 97% of the votes tallied. But Netanyahu is the one with the path to a majority coalition.

President Reuven Rivlin said he would wait until next week to gather recommendations from party leaders on who they want to lead the next government, leaving ample time for political jockeying. He will then nominate the leader of the party he thinks will have the best chance at forming a government based on recommendations from the heads of each of the parties.

President Donald Trump, who spoke with the prime minister by phone, congratulated Netanyahu and said it looked like he had "won it in a good fashion."

"The fact that Bibi won, I think we'll see some pretty good action in terms of peace," Trump told reporters at the White House, using Netanyahu's nickname. "Everybody said you can't have peace in the Middle East with Israel and the Palestinians. I think we have a better chance with Bibi having won."

But others disagreed, pointing to the likely makeup of his coalition and his campaign promise to annex settlements in the Israeli-occupied West Bank, which much of the international community see as illegal.

Netanyahu went all out to hold onto power. He forged a deal to ensure right-wing votes were not wasted by pressuring small right-wing parties to run jointly with the extremist Jewish Power party, considered toxic even for many on the right wing of Israeli politics. That far-right slate won five seats in the election and now says it expects to be a "senior partner" in a coalition, claiming that the electoral deal had "saved the right-wing government."

The ultra-orthodox Jewish parties, which Netanyahu has long courted, will also make up a larger proportion of the next Knesset than ever before. The two ultra-orthodox parties won a total of 16 seats,up from 13 last election.

Netanyahu's pledge on the settlements was geared toward voters on the Israeli right and in settler communities, and the prime minister will now face pressure to make good. Some of these voters have been frustrated that Netanyahu has not been tougher in confronting Palestinian attacks originating in the Gaza Strip and has not been more aggressive in expanding settlements.

His comments about annexation he said would entail extending Israeli sovereignty to the range of settlements, including large, established blocs as well as smaller outposts that lack legal standing even with Israeli government.

"Netanyahu will be very much beholden to the small right-wing parties," said Michael Halperin, executive director of the Israel Policy Forum, which supports a two-state solution for Israelis and Palestinians. "Even if he personally doesn't want to advance issues of religion and state like annexing the West Bank, he will be under pressure to do so."

Halperin said the election results "raise questions about the viability of any Trump peace plan in the near term."

"The strongly right-wing coalition that Netanyahu needs is not a coalition that is likely to accept any kind of compromise," he said.

Those sentiments were echoed by chief Palestinian negotiator Saeb Erekat. "What the early results suggest is that Israelis have voted to preserve the status quo. They have said no to peace and yes to the occupation," he tweeted.

Israel's left-wing was decimated after the split in the Zionist Union, which had brought together the Labor Party and former foreign minister Tzipi Livni's Hatnuah. While the Zionist Union had previously held 24 seats, Labor running alone won just six, according to partial results. Left-wing Meretz won four.

Dahlia Scheindlin said the election results show that the right wing in Israel has been moving even further right.

"What it means to be right wing is becoming more extreme, and that aligns with the trends of populism and nasty ethno-nationalism that we see globally," she said. When Naftali Bennett, who ran on a new ticket with Justice Minister Ayelet Shaked, first entered the Knesset, his party had appeared to be as far right as one could get, she said.

"Now we see that was not the case," she said, referring to Jewish Power.

Shaked and Bennett's New Right party appears to have fallen short of the 3.25% vote threshold required to win seats in the Knesset. That result is likely a relief to Netanyahu, who has a combative relationship with Bennett.

The formation of a far-right government - with an expanded role for ultra-orthodox parties that do not accept the legitimacy of Reform and Conservative Judaism - could widen the already growing gap between American Jews the Israeli government.

Israel Cohen, a commentator on the ultra-orthodox radio station, Kol Barama, said that issues of religious-secular balance in Israel would likely be central in negotiations between ultra-orthodox political leaders and Netanyahu over forming a coalition. Among the main issues, he said, will be how the government would respond to the request by some non-Orthodox Jews for a pluralistic worship space at the Western Wall, Judaism's holiest site.

The negotiations will also surely address the controversy over whether ultra-Orthodox men should be required to serve in the Israeli military, as are most other Israeli men. Traditionally, ultra-orthodox men have been exempted from military service so they can continue their religious studies, but many other Israelis have sought to eliminate what they see as a double standard.

Tzipy Yarom, a reporter for the ultra-Orthodox magazine Mishpacha, noted that the government had called early elections in large part because of a disagreements over a law aimed at drafting students in yeshivas, or religious schools.

"Now it will likely be the first issue they discuss," she said. "And the fact that we now have more power makes us very hopeful."

The Central Elections Committee, which oversees the vote count, said the final tally would not be available until Thursday evening. In the partial count published Wednesday, Likud was slightly ahead in the total number of votes, with 13,375 ballots more than Blue and White.

In a statement Wednesday, President Rivlin said he would start his consultations next week and, "in a historic and pioneering decision," would broadcast all the meetings live "in the name of transparency."