Israeli voters have chosen Prime Minister Benjamin Netanyahu in what was essentially a referendum over whether he should be re-elected for a fifth term. He was elected despite a hostile media, three pending corruption charges and 13 years in office. In three months, he will surpass David Ben-Gurion as Israel’s longest-serving leader.

Netanyahu ruthlessly dumped his allies at the very end of the campaign to increase his vote—a maneuver that led to his success.

His campaign also received an unprecedented boost from foreign leaders, including U.S. President Donald Trump, Russian President Vladimir Putin and Brazilian President Jair Bolsonaro, all of whom effectively endorsed him the week prior to the election.

But the main reason for Netanyahu’s triumph was that Israeli voters, despite recoiling at his hedonism, instinctively felt that his expertise and experience were still critical and that none of his opponents could display even remotely similar levels of strategy and leadership.

Education Minister Naftali Bennett and Justice Minister Ayelet Shaked’s New Right Party failed (by a hair) to win enough votes to enter the Knesset. Had it qualified, Netanyahu would have the support of 69 Knesset members instead of 65.

This failure was a product of Bennett’s hubris. He persuaded Shaked—one of Israel’s most talented Knesset members—to join him in political oblivion. There is a likelihood that despite Netanyahu’s intense dislike of her, the Likud will bring her into its ranks. As of now, the Likud is also negotiating a merge with Moshe Kahlon’s Kulanu Party, which would raise its numbers to 39.

In addition to the nightmare of satisfying conflicting ministerial demands, the prime minister faces enormous external challenges.

The Trump peace plan is soon likely to be revealed. Even in the absence of a two-state policy, Israel will be asked to make territorial concessions that do not compromise security. Most Israelis may accept the proposals but Netanyahu is dependent on the Union of Right-Wing Parties, which has threatened to leave any government that accepts territorial compromise.

The bulk of non-Orthodox American Jews have essentially abandoned Israel yet feel entitled to influence our security policies even against the will of the Israeli people and their democratically elected government. They are also incentivizing the Democrats, including hitherto supporters of Israel, to exert pressure on the Israeli government.

Is it unreasonable for Netanyahu to apply Israeli sovereignty to the major settlement blocs? We have waited decades—to no avail—to negotiate with the Palestinians on the future of the territories. Clearly, the settlement blocs should no longer be subject to negotiation. Now is a propitious time—unless the Palestinians miraculously reverse themselves and become flexible when the Trump peace plan is released—to finally formalize the status of over 500,000 settlers by extending Israeli sovereignty to them. Most Israelis would support this move, which would not reduce the Palestinians’ quality of life by an iota.

Such a step, even restricted to the major settlement blocs, would create an upheaval and the bulk of the world would condemn us. But if the U.S. stands by us, we should not miss such an opportunity to stabilize the area, laying the ground for a future settlement.

Should we fail to do so, in the absence of a supportive U.S. government we will find ourselves continually negotiating over our rights in the major settlement blocs.

While Netanyahu has a powerful case regarding the major blocs, the U.S. is unlikely to allow annexation of the isolated settlements, and he would not necessarily have the support of most Israelis for such a move, either.

All this will require sensitive negotiations within his coalition. Avigdor Lieberman’s Yisrael Beytenu Party has already threatened to oppose the government if the haredi bloc prevents the passage of the draft conscription bill. If this happens, Netanyahu will lose his majority and we could face new elections.

The haredim polled exceedingly well and have proved to be masters of extortion in the past. Aside from additional diversion of funds toward their yeshivot and the aggrandizement of the chief rabbinate, we can expect efforts to impose even greater stringencies regarding conscription, conversion, marriage, gender separation and kashrut. This will widen Israel-Diaspora rifts.

Netanyahu may brazen out the confrontations and reach an accommodation. That would be his first choice—leading a right-wing government and satisfying haredi demands.

But given the external as well as internal pressures, despite his spectacular victory he may be obliged to consider alternatives. Despite confrontationist approaches by both the incoming Likud government and Blue and White-led opposition, the dominant policies of the two parties are almost indistinguishable.

For now, it looks like a right-wing government will prevail. But if Netanyahu finds that the demands from his satellite parties are too extreme, or they block what he considers a reasonable American peace plan, he may well reach an accommodation with Blue and White leader Benny Gantz regarding his legal problems and form a unity government in the months ahead—which would be applauded by the vast majority of Israelis.

Isi Leibler’s website can be viewed at www.wordfromjerusalem.com. Email: ileibler@leibler.com.

This column originally appeared in Israel Hayom.