The likelihood that Benjamin Netanyahu will emerge victorious after Israel’s election on Tuesday is doubtless pleasing for his rightwing supporters and his oleaginous pal in the White House. But it is a worrying prospect for the country and the Middle East as a whole. Mr Netanyahu has dominated domestic politics for a decade, yet has failed in the most important task of any Israeli leader: making the country safe.

The polls point to a Netanyahu-led coalition comprising his party, Likud and several rightwing and far-right minor parties. It remains possible, though less likely, that the centrist Blue and White alliance led by the former army chief, Benjamin Gantz, will prevail. Either way, winning margins will be tight, raising doubts about the stability and longevity of the next government.

Assuming he retains office, Mr Netanyahu may be quickly undermined by criminal proceedings. Israel’s attorney general has said he plans to indict him after the vote on three separate charges of bribery, fraud and breach of trust, which could result in jail sentences. Mr Netanyahu, who denies the allegations, could try to claim immunity from prosecution while he remains prime minister, though Likud colleagues say they would oppose such a move.

Whoever emerges as Israel’s next leader is sure to face daunting challenges that, to a large degree, are the product of 10 years of missed opportunities. Mr Netanyahu’s lack of strategic vision, coupled with his polarising and divisive style, has left the country vulnerable to a range of potential threats that many Israelis do not appear to appreciate fully .

The most dangerous is Iran. His success in derailing Tehran’s 2015 nuclear agreement with the US and EU has increased, not decreased, the risk to Israel. Donald Trump’s decision to tear up the pact and reimpose sanctions on Iran was decisively influenced by Mr Netanyahu and, to a lesser extent, the Saudis. Now, predictably, pressure is building inside Iran to engage in the very sort of nuclear activities the pact was designed to guard against. The virtual collapse of the deal, and Mr Netanyahu’s persistently bellicose rhetoric, is reviving the spectre of future, pre-emptive Israeli airstrikes against presumed Iranian nuclear facilities. Knowing this, Iran has responded by exploiting its Syrian alliance to establish permanent military bases on Israel’s northern border, which it claims are defensive and which Israel’s air force frequently attacks. Far from warding off a conflagration, his policy has made one more likely.

Mr Netanyahu’s disdain for Israel’s traditional European allies, echoing his fractious relationship with Barack Obama, and his preference for “strongman” rightwingers cast in his own image, has produced some unedifying liaisons. Hungary’s populist-nationalist leader, Viktor Orbán, cannot be counted a reliable partner. Neither can Russia’s Vladimir Putin, with whom Mr Netanyahu has grown close, nor, for that matter, Sunni Muslim autocrats in Riyadh who detest Iranians marginally more than Jews.

In encouraging and facilitating Mr Netanyahu’s obstructive, do-nothing attitude to a Palestinian settlement, President Trump, the ultimate rightwing populist, does Israel no favours. Mr Netanyahu counts illegal US recognition of Israel’s claims to Jerusalem and the Golan Heights as signal triumphs. But President Trump is a false friend offering disastrous counsel. All that these ill-advised gestures will ultimately achieve is a deepening of long-term risks to Israel’s security.

Mr Netanyahu’s stubborn refusal to seek an equitable peace with the Palestinians, based on the two-state solution he once endorsed, forms a backdrop to almost daily confrontations in Gaza and Hamas’s murderous and deplorable rocket attacks on Israeli civilians. It helps radicalise the intimidated, dispossessed and disenfranchised Arabs of the Occupied Territories, where hope is usurped by anger.

Mr Netanyahu’s strategic blindness has failed to check war-hardened Hezbollah’s missile build-up in southern Lebanon, now estimated at 130,000 rockets, all aimed at Israeli cities. More dangerous still, his bullish intransigence and ill-disguised racism have damaged Israel’s international standing. Netanyahu has had his chance. Better for all concerned that he go – and go now.