JERUSALEM (Reuters) - After failing to secure a clear election victory twice in six months, Israel’s longest-serving prime minister now seems to be calculating that he can stay in power only by sharing it.

A combination picture shows Blue and White party leader Benny Gantz in Tel Aviv, Israel September 18, 2019 and Israeli Prime Minister Benjamin Netanyahu in the Jordan Valley, in the Israeli-occupied West Bank September 15, 2019. REUTERS/Amir Cohen

Benjamin Netanyahu has invited centrist rival Benny Gantz to join forces in a unity government, saying neither has enough support from respective allies to secure a majority of 61 seats in the 120-member parliament.

Avigdor Lieberman, leader of the far-right Yisrael Beitenu party and a possible kingmaker, said on Monday he believed the only obstacle to such a government was the unresolved question of whether Netanyahu or Gantz would serve first in a rotating premiership.

Weakened by last week’s deadlocked parliamentary election, Netanyahu met Gantz at the behest of President Reuven Rivlin, who is tasked with picking a candidate to try to form the next coalition.

But there was little sign that Gantz, head of the Blue and White Party, would agree to a coalition with Netanyahu’s right-wing Likud. Gantz cited looming corruption charges against Netanyahu when Blue and White rebutted the prime minister’s proposal last week.

Rivlin has called for a unity government - but does not have the legal power to compel Gantz or Netanyahu to form one together. On Monday, Rivlin wrapped up two days of consultations with leaders of all parties that won parliamentary seats in the Sept. 17 ballot.

WHO HAS THE EDGE?

On paper, Netanyahu now has a slim lead over Gantz in building a parliamentary bloc, with pledges of support from 55 members of a right-wing grouping to 54 for Gantz from left-wing and Arab parties. But it also means that neither has secured a governing majority of at least 61 legislators.

Netanyahu’s slight edge might move Rivlin to ask him to try to build a narrow coalition if a unity government proves impossible. A nominee gets 28 days to do so, with a possible 14-day extension, before Rivlin can turn to someone else.

Slideshow ( 9 images )

Gantz had appeared to have 57 backers but three of the Arab Joint List’s 13 members on Monday withdrew support they had pledged to him a day earlier.

Likud won 31 seats to Blue and White’s 33, near-complete results show.

Lieberman, whose party won eight seats, would remain the kingmaker if unity efforts fail.

In his meeting with Rivlin, he refused to commit to either Netanyahu or Gantz, citing his own policy differences with Likud’s Jewish ultra-Orthodox allies and Blue and White’s Arab backers. But Lieberman has also said he wants to ally his party with both Likud and Blue and White in a unity government.

WHAT ARE THE CHANCES FOR A UNITY GOVERNMENT?

It’s complicated, even though there are only narrow policy differences between Netanyahu and Gantz on many important issues, such as relations with the United States, the regional struggle against Iran and the Palestinian conflict.

Both men appear to be more deeply divided on the composition of a unity government.

Gantz has called for a “liberal” administration, political shorthand for one that does not include Netanyahu’s ultra-Orthodox partners. After the election, Netanyahu swiftly signed a new alliance with them.

And then there’s the question of who would get the top job: Netanyahu, Gantz, or both men - in rotation?

Left-winger Shimon Peres and right-winger Yitzhak Shamir set a historic example when they took turns as prime minister in a unity government from 1984 to 1988.

This time around, if a “rotating” power-sharing agreement is reached, it could be imperative for Netanyahu to serve as prime minister first.

“Happily, the two big parties have taken aboard the current necessity of setting up a unity government with a rotating premiership,” Lieberman said on Facebook after meeting Gantz on Monday.

“The entire argument right now is over the question of who will serve first prime minister, and who as second.”

Next month, Israel’s attorney-general will hold a pre-trial hearing at which Netanyahu can argue against his announced intention to indict the Israeli leader on fraud and bribery charges in three corruption cases.

As prime minister, Netanyahu, who denies any wrongdoing in the long-running investigations, would be under no legal obligation to resign if formal charges are filed. But any other cabinet post he might hold would not offer him that protection.

Netanyahu’s supporters in the legislature have also pledged to seek parliamentary immunity for him against prosecution. Any unity deal with Gantz would likely have to address that issue.