This is not the way Benjamin Netanyahu planned his Likud leadership primary. It was all supposed to be over very quickly - a month or so of low-profile campaigning, voting day by the end of January, polling stations closed at 10pm. Then a swift tallying of his overwhelming majority, with everything wrapped up before midnight. But it did not quite work out as planned.
As Tuesday wore on, the Likud membership seemed disinclined to leave their homes on a cold and rainy day. By late afternoon, with only 16 per cent of members having voted, the Prime Minister took to the airwaves. "Come and vote" he implored Likudniks, fearing that low turnout would help the only other candidate, far-right Moshe Feiglin. Voting was extended by an hour - and in some places until midnight - by which time 48 per cent had voted.
At Tel Aviv Exhibition Centre, the party faithful were waiting for the final results and for their leader. Rumours were circulating that Feiglin had done well, and "hawkish" Likudniks were smiling. They had all supported Netanyahu, but a strong performance by his rival meant an easy ride for them in the next primaries, for the Knesset list.
Finally, Netanyahu turned up at 1.15am and gave a short victory speech without mentioning Feiglin. On the stage sat the party's senior ministers with frozen looks - they knew that they now face their own personal campaigns of survival and that to get on the list they have to sell themselves to an increasingly radical membership.
Normally, in most democratic parties, the 75 per cent that Netanyahu won would be a regarded as a landslide victory. Not in this case: even though Feiglin has never held office or been a Knesset member, was convicted in the 1990s of sedition and is on the UK's no-entry list, a quarter of the Likud members who turned up voted for him.
That was not enough to jeopardise Netanyahu's leadership but it will affect the make-up of the party's Knesset faction and reduce the Prime Minister's room for manoeuvre in future negotiations with the Palestinians.
Netanyahu seems unbeatable, within Likud and among the general electorate. That does not mean he will end up the leader of a party or a coalition of his liking.