JERUSALEM — Israel's unprecedented political stalemate — in which no party has been able to construct a governing majority in the deeply divided country for more than a year — has persisted through three ugly national elections, relentless campaigning and round after round of negotiations.

Now, not even the surrender of one side has been enough to create a breakthrough. At least, not yet.

More than a week ago, Benny Gantz, the former army chief of staff who spent the past 16 months trying to unseat Prime Minister Benjamin Netanyahu, stunned the country when he announced that he was willing to join forces with his rival in an emergency unity government as the country battles the coronavirus outbreak.

Some Israelis were devastated, others cheered, but all wondered whether finally — finally! — Israel would get its first government since the political system locked up at the end of 2018.

But Gantz’s move only plunged the parties back into the tar pit of compromise as they tried to divvy up dozens of ministerial portfolios and settle major policy disputes, illustrating just how rusty and broken the country’s governing machinery remains.

Leaked reports from inside the talks have consistently portrayed the broad outlines of a deal in which Netanyahu will remain prime minister for a fixed period, possibly 18 months, after which Gantz will take over the top job. Each will serve as the other’s deputy premier in turn.

But the rest of the government has reportedly been harder to build as the parties have vied for the most influential ministries, factions have fiercely resisted giving up their plum jobs, and thorny policy issues — including the timing of future moves to annex Jewish settlements of the West Bank — have proved to be stubborn sticking points.

Would Gantz take over as foreign minister, as some reports hinted? Would he take over the Defense Ministry or remain as the speaker of the Knesset, a job he was elected to last week after his parliamentary forces unseated the previous speaker, a Netanyahu ally? Even the living arrangements of the two party leaders became an issue when a proposal was floated that the new position of deputy prime minister would require a second official residence.

Negotiators also have wrestled over the size of the government, which is on track to become Israel’s biggest — with 34 or 36 ministries, according to reports — leading many to warn of a bloated, costly structure just as the economy is sagging under the coronavirus slowdown.

Gantz has said he wants a government in place by the beginning of the Passover holiday next week.

The haggling has unfolded against the backdrop of a worsening covid-19 outbreak, with the number of infections in Israel topping 7,000. Twice during negotiations, Netanyahu himself has had to go into isolation after being exposed to infected individuals, including, most recently, his own minister of health.

It was the pandemic that forced Gantz to finally give up his drive to end Netanyahu’s long tenure at the top of Israeli politics.

“These are unusual times, and they call for unusual decisions. That’s why I intend to explore the formation of a national emergency government,” Gantz said in an address to the Knesset after his election as speaker.

Analysts said Gantz and Netanyahu were forced to come together after it became clear that, once again, the March 2 election had left both short of taking control. As the pandemic worsened, the stalemate became even more intolerable.

“The thought of another election is unbearable these days,” said Aviv Bushinsky, a political commentator and former Netanyahu aide. “For Gantz, because of all his political mistakes, he will not be able to get the same kind of results as in the past. And for Netanyahu, because no one knows how he will exit this crisis. Will he still be King Bibi, or will he be a loser?”

But bringing Gantz to the table was also a triumph of Netanyahu’s relentless efforts to stay in power even after failing to achieve a majority in three elections and being indicted on corruption charges.

As the pandemic erupted, Netanyahu became the public face of the response, appearing almost nightly on television and beseeching Gantz to drop his opposition and join him in government.

“King Bibi,” as his unshakable base of supporters calls him, still faces trial on multiple counts of bribery, fraud and breach of trust. But the proceeding was put on hold when his justice minister shut down most courts, citing the virus outbreak, two days before his trial was to begin.

Netanyahu, who tried unsuccessfully to win parliamentary immunity from prosecution earlier this year, is expected to use his office to delay it further or to seek some form of official protection.

Gantz’s surrender, after more than a year of pledging never to serve with Netanyahu, broke apart the Blue and White party he helped found.

Some of its members have agreed to join him in the unity government. Others said he has been hoodwinked by the savvy prime minister. And some accused Gantz of betraying their common cause of finally breaking Netanyahu’s grip on power.

Yair Lapid, one of the Blue and White party’s co-founders, said his former partner was “crawling” into their rival’s government.

“The coronavirus crisis doesn’t permit us to give up our values,” Lapid said. “This is rewarding criminality.”

Members of the Joint List, a coalition of Arab parties that broke years of precedent by agreeing to support Gantz’s bid for prime minister, condemned him as well.

“He has now demonstrated that he is a clone of Netanyahu,” said Yousef Jabareen, a Joint List member of the Knesset.

Whatever their view of his motives in joining a Netanyahu government, all were still awaiting the elusive final step that would end the country’s longest stretch with no elected government at all.