JERUSALEM (Reuters) - Israeli Prime Minister Benjamin Netanyahu secured a clear path to re-election on Wednesday, with religious-rightist parties set to hand him a parliamentary majority and his main challenger conceding defeat.

With more than 99 percent of votes counted - ballots cast by soldiers at military bases will be tallied over the next two days - Netanyahu’s conservative Likud party looked likely to muster enough support to control 65 of the Knesset’s 120 seats and be named to head the next coalition government.

It would be Netanyahu’s record fifth term as premier.

In a televised statement, Yair Lapid, number two in the centrist Blue and White party led by former general Benny Gantz, said: “We didn’t win in this round. We will make Likud’s life hell in the opposition.”

U.S. President Donald Trump, who Netanyahu featured on campaign billboards to highlight their close relationship, phoned to congratulate him on his re-election, the Israeli leader said, adding that he thanked his American ally for “tremendous support for Israel”.

Netanyahu tweeted that Trump had called him from Air Force One. The president was on a flight to Texas.

Trump told reporters at the White House that Netanyahu’s re-election improved the chances of peace between Israel and the Palestinians. “He’s been a great ally and he’s a friend. I’d like to congratulate him on a well-thought-out race.”

A team led by Trump’s adviser and son-in-law Jared Kushner has been working on an Israeli-Palestinian peace plan, but it has not disclosed details. Palestinians, angered by what they see as Trump’s pro-Israel bias, have called it a non-starter.

Israeli President Reuven Rivlin said on Twitter he would begin meeting next week with political parties that won parliamentary seats to hear who they support for prime minister.

At the sessions, which Rivlin said would be broadcast live “to ensure transparency”, he will then pick a party leader to try to form a coalition, giving the candidate 28 days to do so, with a two-week extension if needed.

The close and often vitriolic contest was widely seen in Israel as a referendum on Netanyahu’s character and record in the face of corruption allegations. He faces possible indictment in three graft cases, and has denied wrongdoing in all of them.

Despite that, Netanyahu gained four seats compared to his outgoing coalition government, according to a spreadsheet published by the Central Elections Committee of parties that garnered enough votes to enter the next parliament.

“It is a night of colossal victory,” the 69-year-old Netanyahu told cheering supporters in a late-night speech at Likud headquarters in Tel Aviv after Tuesday’s vote.

“He’s a magician!” the crowd chanted as fireworks flared and Netanyahu kissed his wife Sara. Earlier that night, Gantz had claimed victory.

Tel Aviv Stock Exchange main indexes were up nearly 1 percent in late trading on Wednesday, displaying confidence in a veteran prime minister who has overseen a humming economy and blunted various security threats, including from Syria.

Netanyahu was now poised to become, in July, the longest-serving Israeli prime minister, overtaking the country’s founding father, David Ben-Gurion. That could be scuppered if criminal charges are filed and force his removal.

Israel election graphic - tmsnrt.rs/2D916Uv

Slideshow ( 12 images )

IMMUNITY?

An indictment decision would follow a review hearing where Netanyahu can be expected to argue he should be spared in the national interest. Some analysts predict he may try to pass a law granting himself immunity, as a sitting leader, from trial.

During the campaign, the rival parties accused each other of corruption, fostering bigotry and being soft on security.

Israel’s 21 percent Arab minority saw its parties lose seats. Voters blamed divisions between Arab factions which had united in the previous election, disillusionment, and a voting boycott campaign rooted in dismay at the 2018 “nation-state” law declaring that only Jews have the right of self-determination in Israel.

Slideshow ( 12 images )

In Taybeh, an Arab town, Hadash party official Hosam Azem, 52, said: “Arabs who don’t vote, most of them don’t do it for ideological reasons - just because they don’t think their vote will have an impact,” he said.

During the campaign, Netanyahu sought to tap into Trump’s popularity among Israelis, who delighted in his recognition of Jerusalem as Israel’s capital in 2017 and transfer of the U.S. Embassy to the holy city last May from Tel Aviv.

Two weeks before the election, Trump signed a proclamation, with Netanyahu at his side at the White House, recognizing Israeli sovereignty over the occupied Golan Heights captured from Syria in the 1967 Middle East war.

In a rare turn during the race toward the Israeli-Palestinian conflict, Netanyahu further alarmed Palestinians by pledging to annex Jewish settlements in the occupied West Bank if re-elected. Palestinians seek a state there and in the Gaza Strip, with East Jerusalem as its capital.

This pre-election promise from Netanyahu was widely seen as an attempt to draw right-wing votes rather than a change of policy. But with Trump’s moves on Jerusalem and the Golan, the prime minister may feel emboldened to advocate annexation.

Commenting on the election, Palestinian chief negotiator Saeb Erekat said: “Israelis have voted to preserve the status quo. They have said no to peace and yes to the occupation”.

The last round of U.S.-brokered peace talks between Israel and the Palestinians collapsed in 2014.

Trump is expected to release his administration’s Middle East peace plan after the election. If it includes Israeli concessions to the Palestinians, Netanyahu’s probable far-right coalition allies will probably object.