For most Israelis, the general election on Tuesday was about one thing and one thing only. Not the economy, nor the occupation, nor even corruption scandals. It was about Benjamin Netanyahu. Should he head yet another far-right government, or should his 10-year divisive rule come to an end?
Barring a last-minute upset as the final ballot papers are counted, it is clear that Mr Netanyahu does not command a majority and could well be on his way out.
In April’s inconclusive election, which led to this re-run, Mr Netanyahu’s Likud party tied with its main opponent in the Blue and White party, led by retired general Benny Gantz. This time Mr Gantz appears to have nudged ahead, with 32 seats to Mr Netanyahu’s 31 in the 120-member parliament. Both parties fared worse than they did in April, when they each secured 35 seats.
But much more significantly, Mr Netanyahu appears to have fallen short of the 61-seat majority he needs to form yet another far-right government comprising settler and religious parties.
His failure is all the more glaring, given that he conducted by far the ugliest – and most reckless – campaign in Israeli history. That was because the stakes were sky-high.
Only a government of the far-right – one entirely beholden to Mr Netanyahu – can be relied on to pass legislation guaranteeing him immunity from a legal process due to begin next month. Without it, he is likely to be indicted on multiple charges of fraud and breach of trust.
So desperate was Mr Netanyahu to avoid that fate, according to reports published in the Israeli media on election day, that he was only a hair’s breadth away from launching a war on Gaza last week as a way to postpone the election.
Israel’s chief law officer, attorney general Avichai Mendelblit, stepped in to halt the attack when he discovered the security cabinet had approved it only after Mr Netanyahu concealed the army command’s major reservations.
Mr Netanyahu also tried to bribe right-wing voters by promising last week that he would annex much of the West Bank immediately after the election – a stunt that blatantly violated campaigning laws, according to Mr Mendelblit.
Facebook was forced to shut down Mr Netanyahu's page on two occasions for hate speech – in one case after it sent out a message that "Arabs want to annihilate us all – women, children and men". That sentiment appeared to include the 20 per cent of the Israeli population who are Palestinian citizens.
Mr Netanyahu incited against the country’s Palestinian minority in other ways, not least by constantly suggesting that their votes constituted fraud and that they were trying to “steal the election”.
He even tried to force through a law allowing his Likud party activists to film in Arab polling stations – as they covertly did in April's election – in an unconcealed attempt at voter intimidation.
The move appeared to have backfired, with Palestinian citizens turning out in larger numbers than they did in April.
US President Donald Trump, meanwhile, intervened on Mr Netanyahu’s behalf by announcing the possibility of a defence pact requiring the US to come to Israel’s aid in the event of a regional confrontation.
None of it helped.
Mr Netanyahu’s only hope of political survival – and possible avoidance of jail time – depends on his working the political magic he is famed for. That may prove a tall order. To pass the 61-seat threshold, he must persuade Avigdor Lieberman and his ultra-nationalist Yisrael Beiteinu party to support him.
Mr Netanyahu and Mr Lieberman, who is a settler, are normally ideological allies. But these are not normal times. Mr Netanyahu had to restage the election this week after Mr Lieberman refused in April to sit alongside religious parties in a Netanyahu-led government.
Mr Netanyahu might try to lure the fickle Mr Lieberman back with an irresistible offer, such as the two of them rotating the prime ministership.
But Mr Lieberman risks huge public opprobrium if, after putting the country through a deeply unpopular re-run election, he now does what he refused on principle to do five months ago. Mr Lieberman has nearly doubled his party’s seats to nine by insisting that he is the champion of the secular Israeli public.
Most importantly for Mr Lieberman, he finds himself once again in the role of kingmaker. It is almost certain he will shape the character of the next government. And whoever he anoints as prime minister will be indebted to him.
The deadlock that blocked the formation of a government in April still stands. Israel faces the likelihood of weeks of frantic horse-trading and even the possibility of a third election.
Nonetheless, from the perspective of Palestinians – whether those under occupation or those living in Israel as third-class citizens – the next Israeli government is going to be a hardline right one.
On paper, Mr Gantz is best placed to form a government of what is preposterously labelled the “centre-left”. But given that its backbone will comprise Blue and White, led by a bevy of hawkish generals and Mr Lieberman’s Yisrael Beiteinu, it would, in practice, be nearly as right wing as Mr Netanyahu’s.
Mr Gantz even accused Mr Netanyahu of stealing his idea in announcing last week that he would annex large parts of the West Bank.
The difficulty is that such a coalition would depend on the support of the 13 Joint List legislators representing Israel’s large Palestinian minority. That is something Mr Lieberman has rejected out of hand, calling the idea “absurd” early on Wednesday as results were filtering in. Mr Gantz appears only a little more accommodating.
The solution could be a national unity government comprising much of the right: Mr Gantz’s Blue and White teamed up with Likud and Mr Lieberman. Both Mr Gantz and Mr Lieberman indicated that was their preferred choice on Wednesday.
The question then would be whether Mr Netanyahu can worm his way into such a government, or whether Mr Gantz demands his ousting as a price for Likud’s inclusion.
Mr Netanyahu’s hand in such circumstances would not be strong, especially if he is immersed in a protracted legal battle on corruption charges. There are already rumblings of an uprising in Likud to depose him.
One interesting outcome of a unity government is that it could provoke a constitutional crisis by making the third-largest party, the Joint List, the official opposition. That is the same Joint List described by Mr Netanyahu as a “dangerous anti-Zionist” party.
Ayman Odeh would become the first leader of the Palestinian minority to attend regular briefings by the prime minister and security chiefs.
Mr Netanyahu will continue as caretaker prime minister for several more weeks – until a new government is formed. If he stays true to form, there is plenty of mischief he can instigate in the meantime.
Jonathan Cook is a freelance journalist in Nazareth