Prime Minister Benjamin Netanyahu can reasonably contemplate another term in office, albeit with a fractious coalition, having dragged himself from the jaws of defeat in the final days of a difficult campaign.

With the arithmetic still fluctuating in the early hours of the vote count late Tuesday and early Wednesday, there were coalition constellations that could have deprived him of another stint as prime minister, though they required extremely implausible alliances of ideologically disparate parties. By dawn Wednesday, however, the TV exit polls had been discredited, Netanyahu had clearly scored a decisive victory, and it was near-certain that the next coalition will be led by Netanyahu and Likud and comprised of right-wing and Orthodox parties. That represents a remarkable turnaround. A victory “against all odds,” as he called it in his victory speech.

Opinion surveys last week showed Netanyahu’s Likud trailing Isaac Herzog’s Zionist Union by four seats, with the momentum running firmly in Herzog’s favor. Long Israel’s peerless political operator, Netanyahu reversed that momentum, while Herzog failed to put up a sufficiently effective fight.

In the cause of his re-election — fighting what his delighted Likud ally Yuval Steinitz late Tuesday called “the entire world and its wife” — Netanyahu shifted drastically away from traditional strategy. Rather than seeking to bolster his share of the vote by reaching out to the center of the electorate, the Likud leader turned inward. He directed his appeals over the final few days of the campaign to the Israeli right, to his home territory.

He didn’t quite say, “Don’t vote for the Jewish Home or Yisrael Beytenu,” his natural right-wing allies, led by two men — Naftali Bennett and Avigdor Liberman — who used to work for him. He most emphatically did say, over and over and over, that Israelis who want him as prime minister simply had to vote Likud: “Those who support the national camp have to understand that in the days that are left they have to rally around me and the Likud,” Netanyahu told The Times of Israel in an interview on Friday. They have to “vote for my party, to prevent the left from taking over Israel…. Vote for my party, Likud.”

In the course of Monday and Tuesday, he escalated the anguished rhetoric and staked out increasingly hawkish positions.

As voting proceeded Tuesday, he protested that foreign funding was being used to transport disproportionate numbers of Israeli Arab voters to the polling stations — an inaccurate assertion and an incendiary one; Israeli Arab citizens have every right and responsibility to vote. Netanyahu later half-clarified, half-restated: “There is nothing illegitimate with citizens voting, Jewish or Arab, as they see fit. What is not legitimate is the funding — the fact that money comes from abroad from NGOs and foreign governments, brings them en masse to the ballot box in an organized fashion, in favor of the left, gives undue power to the extremist Arab list, and weakens the right bloc in such a way that we will be unable to build a government.”

He also confronted the (Israeli Arab) judge, Salim Joubran, who heads the Central Elections Committee, by protesting that Netanyahu, uniquely, was being denied the right to directly address the Israeli public when Joubran barred live transmission of a press conference he wanted to hold. “Tzipi [Livni], Boujie [Herzog], Yair [Lapid], representatives of the left, spoke in every possible studio and conducted flagrant electioneering,” Netanyahu complained. “The ‘Just not Bibi’ party speaks nonstop in the media without anyone disturbing them. The only one they decided to prohibit from speaking in the media is me, the Likud prime minister… No one will shut us up. In a democratic state, even a Likud prime minister has the right to say his piece.”

In fact, Joubran, himself a relentless critic of the archaic election day propaganda laws, also barred live broadcast of a planned Zionist Union press conference. Herzog and Livni quietly accepted the ruling. Netanyahu spoke anyway, and posted his remarks on his Facebook page.

More dramatic and far-reaching than these gambits, however, was his statement, in an interview on Monday evening, that if re-elected he would not allow the establishment of a Palestinian state. This hardened stance — a step further than his previous, oft-expressed warnings that any territory relinquished to the Palestinians would inevitably fall into the hands of Islamist terror groups, and that Israel could not give up overall security control over the West Bank — marked the reversal of his previous agreement-in-principle to the two-state solution.

“The goal (of avoiding a binational state) stands,” he said in our interview on Friday, “but in the current circumstances in the Middle East, any territory that you vacate will be used for an armed Islamist state against us. That’s exactly what happened in Lebanon. That’s what happened in Gaza. And since the Arab Spring that’s what’s going to happen exactly in the West Bank — in Judea and Samaria — if we vacate territory.”

By Monday, he was telling the NRG Hebrew website, “I think that anyone who moves to establish a Palestinian state today, and evacuate areas, is giving radical Islam an area from which to attack the State of Israel.” Asked directly whether no Palestinian state would be created under his leadership, the prime minister answered: “Indeed.”

Herzog vowed to retain a united Jerusalem and to extend sovereignty to the major West Bank settlement blocs in any permanent accord, but the Zionist Union leader also spoke of the imperative to dismantle isolated settlements, and said those settlements should not be funded further. He did not confidently predict progress toward an accord, and was wary about Palestinian Authority President Mahmoud Abbas’s positions, but he did vow to try to inject new life into a peace effort with the help of moderate Arab states.

Netanyahu, by contrast, has now cornered himself with a stance that puts him on a collision course even with Israel’s closest international allies.

What Tuesday’s exit polls indicated, and the near-final results underlined still further, however, was that his narrow, urgent, domestic electoral cause was well served. Worried, increasingly hardline Netanyahu lifted Likud from four seats behind Herzog’s National Union last Thursday to close that gap and head to victory. Those extra seats came overwhelmingly from other right-wing parties, whose voters were evidently moved by the prime minister’s repeated plea: “Vote for my party, Likud.”

Disgruntled though they may be, bitter that the prime minister’s last-minute tactics ate into their support, the leaders of those parties will almost certainly ultimately fall into line behind Benjamin Netanyahu.

How long will such a coalition hold together? How effectively will it be able to govern? Those are critical questions for another day.