JERUSALEM — With the negotiations over a unity government in Israel at a critical juncture, Prime Minister Benjamin Netanyahu and his chief rival, Benny Gantz, asked the country’s president early on Tuesday to extend the deadline to form a joint coalition to midnight Wednesday.

The two sides, hampered by discord and acrimony in their discussions over a power-sharing deal, had been unable to reach an agreement before a deadline passed at midnight Monday.

The president, Reuven Rivlin, acceded to the extension request on the understanding that the two sides were close to an agreement, according to a statement early Tuesday morning from his office.

If the two sides cannot resolve their differences by Wednesday night, Mr. Rivlin is expected to refer the task of forming a government to Parliament, a step that would start a countdown toward a possible new election, Israel’s fourth in little over a year.