JERUSALEM -- Prime Minister Benjamin Netanyahu invited his political rival Benny Gantz to join a unity government with him and his religious allies on Thursday, an offer that was greeted coolly amid continued deadlock following this week's election.

The deadlock has already raised speculation about a possible third election in the coming months, just two days after an unprecedented repeat vote left the country's two main political parties with no clear path to a coalition government. While weeks of negotiations to form a coalition government lay ahead, conditions set by the parties could hobble the task within the allotted time, forcing another election.

With nearly all votes counted Thursday, the centrist Blue and White party stood at 33 seats in Israel's 120-seat parliament. Netanyahu's conservative Likud stood at 31 seats. Neither party, however, can muster a majority coalition of 61 seats with their smaller allies.

"Throughout the campaign I called for a right-wing government, but unfortunately the election results show that's not possible," Netanyahu said in a video statement. "Therefore there is no choice but to form a broad unity government."

"We cannot and there is no reason to go to third elections," he added.

Netanyahu repeated the plea later Thursday at a memorial for late former Israeli President Shimon Peres, where he and Gantz, a former military chief of staff, shook hands in their first public encounter since Tuesday's vote.

Neither party can form a majority government without the support of the election's apparent kingmaker, Avigdor Lieberman of the Yisrael Beitenu party.

Lieberman refuses to sit with Netanyahu's ultra-Orthodox religious allies and has called for a broad, secular unity government with Likud and Blue and White.

Blue and White also favours a unity deal, but has pledged not to sit in the same government as Netanyahu due to the Israeli leader's legal woes. Netanyahu is expected to be indicted in a slew of corruption scandals in the coming months. But the fiercely loyal Likud is unlikely to oust Netanyahu.

At a Blue and White meeting, Gantz gave Netanyahyu's offer an icy reception, saying he planned to establish a unity government "headed by me." He shrugged off Netanyahu's offer as "spin."

Yair Lapid, a senior Blue and White member, accused Netanyahu of dragging the country to a third election and called for him to step down.

"One person is preventing right now the establishment of a liberal unity government. One person stands between what is good for the country and what's good for that person. And country always comes first," he said.

Both parties were meeting with allies in the vote's aftermath. The focus will soon shift to President Reuven Rivlin, who is to designate his preferred choice for prime minister after consultations with all of the parties in parliament.

Rivlin's office said these consultations will begin Sunday and are expected to last two days. After that, he'll announce his pick.

The designated prime minister then has six weeks to form a coalition. If he fails, the president can give another candidate 28 days to form a government. If that fails, the president could then order new elections, something that has never happened. Speaking at the Peres memorial, Rivlin promised he will do everything in his power to prevent a third election.

The deadlock follows the second Israeli elections this year, which were called because Netanyahu failed to cobble together a coalition following the April vote.

Instead of allowing another candidate a chance to form a government, Netanyahu dissolved parliament and ordered this week's unprecedented do-over election.

Israelis endured a caustic campaign that saw a combative Netanyahu fighting for his political survival amid the recommendation by Israel's attorney general to indict him on charges of bribery, breach of trust and fraud pending a hearing in early October.

Netanyahu had sought an outright majority with his allies in hopes of passing legislation to give him immunity from the expected indictment.

Israeli law does not require an indicted prime minister to resign. But a trial for a sitting prime minister would be a huge national distraction and fuel calls for the Israeli leader to step aside.

Tuesday's vote was largely seen as a referendum on Netanyahu, who this summer surpassed Israel's founding prime minister to become the country's longest-serving leader.

During the campaign Netanyahu cast himself as a seasoned statesman who was the only candidate able to steer Israel through a sea of challenges. But that message was mixed with frequent attacks on the country's Arab minority, drawing charges of racism. Netanyahu also frequently lashed out at the media, judiciary and his opponents, claiming they were conspiring to oust him.

Gantz, a former army chief, tried to paint Netanyahu as divisive and scandal-plagued, offering himself as a calming influence and honest alternative.

Despite the scorched earth campaign, Netanyahu failed to secure the resounding victory he needed to guarantee his political survival and perhaps save himself from a formal indictment.