Benny Gantz, the chief political rival of Prime Minister Benjamin Netanyahu, had only hours left on Wednesday before a midnight deadline to form a government and to extricate Israel from a monthslong political logjam.
A failure by Mr. Gantz, a former army chief, to establish a viable coalition could propel a deeply divided Israel into its third election in a year.
Mr. Gantz, a relative political newcomer and leader of the centrist Blue and White party, said he wanted to join forces with Mr. Netanyahu, Israel’s longest serving prime minister and leader of the conservative Likud, in a broad, liberal government of national unity based on their two large parties.
But a potential power-sharing arrangement has been complicated by Mr. Netanyahu’s legal situation. He is facing possible indictment in three graft cases involving allegations of bribery, fraud and breach of trust.
Israel’s attorney general, Avichai Mandelblit, is expected to announce his decision on charges against Mr. Netanyahu by the end of the month.
A late-night meeting on Tuesday between Mr. Gantz and Mr. Netanyahu ended abruptly and without results about an hour after it started.
“A third round of elections would be bad,” Mr. Gantz said after the meeting, signaling a lack of progress. “But one cannot abandon fundamental principles and values.” He pledged to continue to “leave no stone unturned” in an effort to reach an understanding in the allotted time he had left.
Though his chances of success appeared slim, he still had options to break the political paralysis that has gripped Israel since April, when the first of two inconclusive elections was held. The second took place in September.
Mr. Gantz and Mr. Netanyahu could still reach a last-minute deal. Or Mr. Gantz could declare the establishment of a narrow, minority government without Mr. Netanyahu and his right-wing and ultra-Orthodox allies. That would take the help of a few smaller parties that would join him in the coalition or support it from the outside.
But a minority government would require the cooperation of legislators from the predominantly Arab parties in the Parliament and of Avigdor Liberman’s ultranationalist Yisrael Beiteinu party. Analysts said that combination is unlikely to work and any resulting coalition would be inherently unstable and short-lived.
In the September election, neither Blue and White nor Likud won enough support to build a majority coalition in the 120-seat Parliament. Blue and White won 33 seats, edging ahead of Mr. Netanyahu’s Likud, which won 32.
But Mr. Netanyahu secured the endorsements of 55 right-wing and religious members of Parliament for the premiership, one more than Mr. Gantz did.
Mr. Liberman, a former Netanyahu ally turned rival, held the balance with the eight seats won by his party — and he appeared to relish his role as potential kingmaker. He has issued both political pleas and ultimatums to try to get Mr. Gantz and Mr. Netanyahu to compromise and join forces, though Likud and Blue and White commanded enough seats between them to form a joint government without him.
As leader of the larger parliamentary bloc, Mr. Netanyahu was given the first chance to try to form a government. He abandoned the effort days before his six-week deadline ran out. Mr. Gantz was then given four weeks to try and succeed where the seasoned Mr. Netanyahu had failed.
If Mr. Gantz also were to fail, Parliament would then have 21 days to come up with a candidate — any candidate, including Mr. Netanyahu and Mr. Gantz — who could command a majority of 61. If that final stage of the process also failed to produce a government, Parliament would be dissolved and Israel would start preparing for a third election in the spring.
Mr. Netanyahu’s insistence to go first as prime minister under any rotation agreement with Mr. Gantz has been a major sticking point in the negotiations for a unity coalition.
Taking the leadership role first in any coalition agreement is important to Mr. Netanyahu because as an ordinary minister he would have to resign immediately if indicted. Under current Israeli law, a prime minister charged with crimes may remain in office until a final court verdict, after the appeals process has been exhausted — a process that could take years.
That was a non-starter for most of the Blue and White leadership. The party had repeatedly pledged to its voters not to serve in a government under a prime minister facing a serious indictment.
In addition, Mr. Netanyahu insisted on bringing along his entire right-wing, religious bloc of 55 parliamentarians into any coalition, over Blue and White’s vehement objections.
Israel’s president, Reuven Rivlin, whose role is largely ceremonial, has been pushing for a unity government and presented his own proposal to try to resolve the impasse.
Mr. Rivlin suggested that Mr. Netanyahu go first as prime minister and, if indicted, declare himself incapacitated for an indefinite period. Mr. Netanyahu would still retain the title of prime minister, while Mr. Gantz would take over as an acting prime minister with full powers.
Mr. Netanyahu embraced the idea, but Blue and White’s leaders had difficulty accepting it. The proposal was vague on the timing of Mr. Netanyahu’s recusal and was also legally problematic, requiring changes to laws, including the one dealing with incapacitation.
Prof. Mordechai Kremnitzer, a former dean of law at the Hebrew University of Jerusalem and a senior fellow at the Israel Democracy Institute, a nonpartisan research center, said he understood Mr. Rivlin’s desire to try to avoid a third election.
But the president’s proposal essentially allowed for two prime ministers at the same time, a functioning one, Mr. Gantz, and another, Mr. Netanyahu, who would retain the title.
“The question,” Professor Kremnitzer said, “is will the symbolic prime minister really be able to refrain from interfering? It’s humanly hard to imagine and would create an impossible, dangerous situation in terms of governance.”
The talks for a unity government meant to heal national rifts have taken place in an atmosphere of unfettered divisiveness.
Mr. Netanyahu accused Mr. Gantz of plotting all along to form a narrow government with the support of Arab members of Parliament, describing such a government as “dangerous for Israel.” Netanyahu critics have denounced such heated rhetoric from the prime minister as racist, saying it incites violence.
For his part, Mr. Gantz condemned Mr. Netanyahu’s alliance with right-wing and ultra-Orthodox parties as an “immunity bloc,” meant to try to provide him with parliamentary protection from prosecution.
The political drama is not the only challenge facing Israel right now. On Wednesday, the Israeli military said it conducted strikes against dozens of Iranian military sites in Syria. The strikes came a day after rockets were fired at the Israeli-controlled Golan Heights of Syria.