LESS THAN two months ago Binyamin Netanyahu warned that Israel was in a “sensitive security period” and, therefore, should not hold an early parliamentary election. Yet on December 24th the prime minister announced that an election would be held on April 9th, seven months earlier than originally scheduled. With a tiny majority in the Knesset, the governing coalition was finding it difficult to get things done. That, at least, was the official reason for calling the early vote.

The more likely motive is that Mr Netanyahu is trying to head off possible corruption charges. In December the state prosecutor’s office recommended that the attorney-general, Avichai Mandelblit, indict Mr Netanyahu on charges of bribery in two corruption cases (and for breach of trust in a third case). Mr Mandelblit had signaled that he would make a decision early in the new year, but now he may wait until after the election. Mr Netanyahu hopes that a fourth straight electoral victory will shield him from calls that he step down if he is indicted.

Mr Netanyahu is popular. He has overseen the growth of Israel’s high-tech economy and avoided wars. He has forged closer ties with Arab states, which share an interest in countering Iran. His alliance with Donald Trump has paid dividends, such as America’s recognition of Jerusalem as Israel’s capital. So it is no surprise that the prime minister’s party, Likud, is on track to win the election. Polls show it receiving a quarter of the vote. If nothing changes, Mr Netanyahu’s coalition of religious and nationalist parties will probably hold a small majority in the next Knesset.

Critics say Mr Netanyahu is undermining Israel’s democracy. They point to the corruption allegations and his government’s push for laws that would, in effect, stifle critics. A nation-state law passed in July seemed designed to offend Israel’s non-Jewish minorities. Meanwhile, the prime minister shows little interest in negotiating a peace deal with the Palestinians. The opposition, though, is fragmented, with five centrist parties running separately. The most popular among them is Resilience for Israel, which was formed in December by Benny Gantz, a former general. Mr Gantz has yet to lay out his platform, but his clean image stands in sharp contrast to that of Mr Netanyahu.

Even if he wins, Mr Netanyahu faces the prospect of being forced to resign months later. The leaders of at least two potential centrist coalition partners, Kulanu and Yesh Atid, have said they would not serve under an indicted prime minister. To forestall such an outcome Mr Netanyahu is hoping to increase the number of seats held by Likud, at the expense of other right-wing parties. He is also pushing a narrative that dark forces on the left—including journalists, police officers and prosecutors—are conspiring to remove him by undemocratic means. His own allies in the media echo this message.

The three-month campaign is likely to be vicious. In the end, Mr Netanyahu will probably win a fifth term and become Israel’s longest-serving prime minister. But victory is just the first step in his battle for political survival.