T HE NEWS could not have come at a worse time for Benny Gantz, the main challenger to Binyamin Netanyahu, the prime minister. Less than four weeks before Israelis go to the polls it was reported that Mr Gantz’s telephone had been hacked by Iran and that stolen information may have included embarrassing images. While the candidate dismissed it as “political gossip”, some in his party blamed Mr Netanyahu for spreading the dirt. The prime minister shot back, “If Gantz can’t protect his phone, how will he protect the country?”

Security is the overriding concern for voters in this election, which gives Mr Netanyahu an advantage. He has kept the country safe for a decade. But many Israelis dislike his divisiveness and alleged misdeeds. He faces a preliminary indictment for corruption, fraud and breach of trust. That leaves an opening for Mr Gantz, the towering, blue-eyed former chief of staff of the Israel Defence Forces. Though a political novice, his party, Blue and White, is running neck-and-neck in the polls with Mr Netanyahu’s Likud party. “The key to winning is taking the Mr Security title away from Netanyahu,” says a Gantz adviser.

To do that Mr Gantz has enlisted two other former army chiefs, Gabi Ashkenazi and Moshe Yaalon, as running mates. As he launched his campaign, his party put out four videos, three of which highlight his toughness. As a general Mr Gantz led two wars in Gaza, in 2012 and 2014. The videos show neighbourhoods reduced to rubble and tally the number of “terrorists killed” and “targets destroyed”. “Parts of Gaza were returned to the stone age,” says a narrator. One clip shows footage of a leader of Hamas, the militant Islamists who run Gaza, being assassinated by a drone.

But those videos belie a less hawkish, more easy-going figure. When Mr Gantz commanded the elite paratroopers brigade he was nicknamed “Bennyhuta”, a play on his name and the Aramaic word meaning laid-back. Others called him “the prince” for his swift, seemingly effortless rise through the ranks. In some ways he was lucky. He was made deputy chief of staff as a compromise after the chief of staff and the defence minister failed to agree on a candidate. He became chief of staff after two other contenders were tainted by scandal. More than anything, he was seen as a safe pair of hands.

“There’s no shame in striving for peace,” says Mr Gantz in the fourth ad, which seems more in keeping with his character. While bashing Gaza, he spoke of how his mother, a Holocaust survivor, told him to make sure the Palestinians got food. In meetings with Mr Netanyahu’s cabinet, while head of the armed forces, he opposed plans to attack Iran’s nuclear installations, though he did put the army on a war footing. His rivals grumbled that he achieved little yet somehow managed not to get blamed for operational failures, such as Israel’s chaotic withdrawal from Lebanon in 2000, which Mr Gantz oversaw.

Like many retired generals, Mr Gantz, whose father was prominent on the left of the Labour party, is a shade left of centre on Israel’s spectrum. “Hawkish on security, moderate on diplomacy,” as a party colleague describes him. He has privately endorsed a peace plan by the Institute for National Security Studies, a think-tank in Tel Aviv, that would increase Palestinian control of the West Bank and “build an infrastructure for a two-state solution in the long term.” His party’s manifesto is vaguer, calling for deeper separation from the Palestinians. But if he wins, he may seek to restart peace talks, cut off in 2014.

That is one difference with Mr Netanyahu, who shuns the Palestinians. Another is the so-called nation-state law, which states that the right of national self-determination is “unique to the Jewish people”. Mr Netanyahu championed it. Mr Gantz wants to amend it to guarantee equal rights for all. But issues have been given short shrift in a campaign largely about image. Mr Netanyahu brands his opponents as the “weak left”, in league with “Arab parties that oppose the Jewish state”. Mr Gantz’s slogan, “Israel before everything”, is meant to contrast his squeaky-clean persona with the incumbent’s supposedly dodgy one.

The tone of the contest is getting nastier. Mr Gantz has accused Mr Netanyahu of receiving 16m shekels ($4.4m) in a deal tied to the Israeli navy’s purchase of German submarines. Mr Netanyahu pushes back with the phone-hacking story. “Benny Gantz, what do the Iranians know about you that you’re hiding from us? What are the Iranians holding over you?” he asks.

The race will ultimately come down to whether centrist parties, such as Blue and White, and left-wing parties, such as Labour, win more seats in total than Mr Netanyahu’s right-wing coalition. On this the polls suggest a tight race. But Mr Netanyahu has not seemed as vulnerable for years. “It would just be Benny’s luck to be there at the right moment, with Netanyahu ripe to fall,” says one of Mr Gantz’s former comrades-in-arms.