With just five days to go until Israel’s election, the polling gives opponents of Prime Minister Benjamin Netanyahu cause for cautious optimism. Several polls released on Wednesday show his principal challengers, Zionist Union, ahead of Netanyahu’s Likud by two to four seats in the 120-seat Knesset, which appoints the prime minister. That’s hardly a landslide, of course, and it’s worth remembering that Netanyahu was re-elected prime minister in 2013 with just 31 seats — of which Likud had only 19, with the remaining 12 provided by Foreign Minister Avigdor Lieberman’s Yisrael Beitenu party.

Nor would a second-place finish prevent Netanyahu from remaining prime minister. Israel’s proportional representation parliamentary system means that the key question is not which party finishes first in the race but which has enough natural allies in the new Knesset to form a governing coalition. In 2009, Netanyahu received one seat less than his main opponent of the time, Tzipi Livni. But Netanyahu emerged victorious from the negotiations with smaller parties that followed. This time, even if Zionist Union leaders Isaac Herzog and Livni beat Netanyahu by several seats, the distribution of votes, loyalties and priorities makes it more than likely that history will repeat itself.

Averaging the most recent polls predicts the following outcome:

Zionist Union 24

Likud 22

The United Arab List 12

Habayit Hayehudi (led by right-wing settler Naftali Bennett) 12

Yesh Atid (the centrist bloc of Yair Lapid) 12

Kulanu (a center-right breakaway from Likud) 8

Shas (ultra-Orthodox Sephardi) 7

United Torah Judaism (Ashkenazi ultra-Orthodox) 6

Yisrael Beitenu (hard-right party of Avigdor Lieberman) 5

Meretz (liberal Zionist) 4

Yachad (ultra-right) 4

Grouping these parties into predictable coalitions produces the following:

Right-wing parties Likud, Yisrael Beitenu, Habayit Hayehudi and Yachad: 43 seats

Ultra-Orthodox religious parties: 13 seats

Centrist parties Yesh Atid and Kulanu: 20 seats

Liberal-left parties Zionist Union and Meretz: 28 seats

United Arab List: 12 seats

It’s important to note that Herzog’s apparent surge in the polls in recent weeks appears to have come largely at the expense of Meretz: Rather than pulling voters from the center to the left of the spectrum, his clout has grown at the expense of his closest allies.

Even if the Herzog-Livni alliance beats Netanyahu’s Likud by a couple of seats, the prime minister’s bloc of natural allies is far larger, which makes him more likely to lead the next coalition; that remains the case even if he sidelines the ultra-right Yachad to make the rest of his bloc look more palatable. He’s in a strong position to attract the ultra-Orthodox parties, and even the centrist parties who cast themselves as moderates share much of Netanyahu’s worldview when it comes to questions such as ending the occupation of Palestinian territories. While the pace of the drift may vary, the Israeli public remains on a long-term swing ever further to the right — it has been 16 years since the center-left last ruled Israel, and the current crop of centrists looks unlikely to return them to power. The steady right-wing drift also makes centrist parties less keen to associate themselves with a left-wing government that may well be just a flash in the pan.

The United Arab List is expected to make the biggest electoral impact ever by Palestinian citizens on an Israeli election, and they’re not going to support the right. History suggests, though, that Herzog won’t draw them into a coalition, although he might have hoped to count on their votes in parliament, as the late Yitzhak Rabin did in 1992. But Herzog has severely alienated the Palestinian-majority party by turning on one of their most prominent legislators, Haneen Zoabi, and by adopting a militarist tone in his campaign ads, praising his own military prowess and attacking Netanyahu for not hitting Gaza hard enough. It didn’t take long for the Joint List to announce Herzog can forget about their support.

So, even if his party holds its lead in the polls, the math suggests Herzog is unlikely to become prime minister. His only prospect of doing so, which remains abstract, would be to make common cause with parties to his right. That would simply freeze the current impasse in prospects for an agreement with the Palestinian leadership. Rumors persist that the surprisingly resilient Lapid might try and claim the premiership for himself, but without the ultra-Orthodox or the right wing — none of which are keen on seeing a secular, centrist novice politician as prime minister — this also seems unlikely. Another Netanyahu government remains the most plausible scenario predicted by the polls.

But who would Netanyahu choose as coalition partners?

He would face the choice of a relatively narrow right-wing coalition — with Habayit Hayehud, the ultra-Orthodox and one or both centrist parties thrown in for good measure — or a broad national unity government, with Zionist Union replacing Bennet.

A right-wing government would allow Netanyahu to pursue his conservative policies with more vigor, but would allow more hawkish rivals such as Bennet to outflank him from the right on issues such as settlements, and drag his government onto a path that risks isolating Israel and drawing pressure from Western powers.

A national union government, by contrast, would allow Netanyahu to continue hewing to the right, while cloaking his policies in a veneer of moderation that would be comforting to Western powers. Experience shows that the actual influence of Labor (now reinvented as the Zionist Union) inside a Likud-led coalition tends to range from minimal to nonexistent.

Still, if Netanyahu makes the offer, Herzog will have great difficulty refusing it, for two reasons. Traditionally, Herzog always supported such offers from right wing governments, and served as a welfare minister under Netanyahu until he was unceremoniously sacked in 2010. More urgently still, committing his party to the coalition is just about the only way Herzog can survive as Labor leader until the next elections. Labor is famously unforgiving of leaders who lose elections, particularly if that loss is not cushioned by consolation cabinet seats.

A Netanyahu-led national unity government that includes Zionist Union would create a unique situation in which Israel’s parliamentary opposition is led by Palestinian citizens. Being the leadership of the opposition entitles a party to select seats on key parliamentary committees, including the ones overseeing Israel’s defense and intelligence establishments, and the opposition leader himself is entitled to regular briefings from the prime minister. That would produce some interesting fireworks as other opposition parties and Netanyahu himself could be expected to work together to prevent a Palestinian-led opposition in the Knesset from having the same privileges as one committed to Israel’s founding Zionist ideology would enjoy.