By Wednesday morning it was all but officially confirmed. After an all-night vote count, Israel's combative incumbent prime minister Benjamin Netanyahu emerged, in defiance of exit polls, as the clear winner of the country's election; putting him on course to be the country's longest serving leader.
Initial results from polling station surveys showed a 27-27 seat tie between the Likud party and its rival center-left Zionist Union. But any lingering hopes of a leftist-led coalition were quickly erased as figures from the actual ballot count showed a dramatic last minute surge for the Netanyahu camp, after the prime minister played on security fears by warning Israelis that Arab voters were "coming out in droves" for the left.
By the time 99 percent of the ballot papers were counted Netanyahu's Likud party had steamed ahead to lead the race by 30 to 24 seats; more than enough daylight to form a workable right-wing coalition.
Not that Netanyahu, dubbed "King Bibi" by both his fans and critics, waited for the results to come in before he announced his return to the throne. By midnight on Tuesday, with less than a third of ballots counted, had already announced his "great victory against all odds."
"Reality won't wait for us," Netanyahu told an ecstatic crowd at the Likud party headquarters to chants of "he's a magician."
The Likud leader began his so-called "gevalt campaign" — a Yiddish word for "alarm" — in the chambers of the US Congress where two weeks ago he took to the stand to deliver an impassioned address to defend Israel against Iran. Yet the speech did not have the desired affect, giving him only a small bump in the polls and attracting criticism from some at home for isolating Israel from the Obama administration, which had not approved the appearance. Likud campaign videos suggesting the Islamic State would be on their way to Tel Aviv fared little better and opponents attacked the prime minister for failing to have a platform on real issues such as the housing crisis and economy.
Moshe Kahlon, leader of the Kulanu party, lashed out at such tactics, saying no young Israeli had ever left the country because of the Islamic State or Iran, but plenty had gone because the economy had made them "lose hope."
On Friday, the final polls before election day showed the prime minister lagging behind his Zionist Union rivals by two to four seats.
Yet a mere three days later the prime minister was returned to power, with his Likud party winning by a clear seven seats.
The crucial uptick came after Netanyahu thrust the Palestinian question to the fore. Barely mentioned by either major party in the three months of election campaigning, with just hours to go Palestinians suddenly found themselves at the center of a furore. Visiting Har Homa, a Jewish settlement in West Bank, on Monday Netanyahu announced a sudden about turn on his 2009 commitment to a two-state solution. Earlier, at a right-wing rally in Tel Aviv on Saturday night, he told the crowd he was the only one that could keep Jerusalem "united." On polling day itself, his Likud party sent out barrages of SMS messages to Israeli cellphones warning that Arabs — backed by an unlikely cohort of Hamas, leftists, and US money — were being "bussed" to polling stations to vote in "droves." The warning was repeated in a video posted on his Facebook page, immediately drawing criticism as racist fear-mongering and discrimination against legitimate voters.
But invoking the Palestinian threat, much more real and closer to home than Iran or the Islamic State, was in the end apparently enough to galvanize the right into action and finish off the left.
Many of those who were thinking of voting for Moshe Kahlon's center-right Kulanu or far-right parties instead threw their weight behind Netanyahu and Likud, as the incumbent managed to turn the left's "anyone but Bibi" campaign on its head.
One Likud member, who did not wanted to be named, said at Tuesday night's celebrations: "It's not that Israelis love Netanyahu so much, it's that they are afraid of a left-wing government."
Follow Harriet Salem on Twitter: @HarrietSalem