Though Blue and White edged ahead of Likud, Mr. Netanyahu’s broader right-wing, religious bloc of allied parties ended up slightly stronger than Mr. Gantz’s center-left bloc, with 55 seats to 54.

With one hard-line but secular party, Avigdor Liberman’s Yisrael Beiteinu, still refusing to back either candidate, neither group commands enough support to create a coalition with a majority in the 120-seat Parliament.

Negotiators from Blue and White and from Likud met for the first time on Tuesday, under pressure from Mr. Rivlin. Little was revealed, but what was did not sound propitious. In brief statements after the talks, both sides noted an early sticking point.

The top Likud negotiator, Yariv Levin, said that he was representing all 55 members of the right-wing, religious bloc. But Blue and White’s negotiator, Yoram Turbowicz, countered that from his perspective, Mr. Levin was only representing Likud and Mr. Netanyahu.

Another major sticking point in reaching a unity agreement will be who would serve first as prime minister in any rotation arrangement. In a similar situation in the 1980s, President Chaim Herzog successfully brokered a unity government agreement between Shimon Peres and Yitzhak Shamir, according to which Mr. Peres served the first two years as prime minister and Mr. Shamir the following two. The negotiations took a month.

The current situation is muddied because Mr. Netanyahu is facing an indictment in three corruption cases and could soon be charged. If that happened, he would be able to stay in office only if he were prime minister. In a lesser role, such as an ordinary minister in the government, he would have to resign if charged.