The footage showed something Israel had not seen in a decade: an Israeli prime minister and the Palestinian president together, smiling. The smiles looked real. The meeting was not. Gadi Eisenkot is not prime minister — he is the front-runner in the parliamentary election due on October 27th, now less than a month away — and he has never actually met Mahmoud Abbas.

The fake summit was produced by Religious Zionism, the hard-right party of Bezalel Smotrich, the finance minister and an ally of Binyamin Netanyahu, to persuade voters that Mr Eisenkot, a tough former general, is really a dangerous left-winger ready to reconcile with Israel’s enemies. On July 26th it made history of a sort: it became the first Israeli campaign advert to fall foul of a law requiring AI-made material to be clearly labelled, and the Central Election Committee ordered it taken down.

Since then the AI disclaimers have spread to the corner of nearly every screen. Karine Nahon, an Israeli information scientist who studies disinformation, is not much troubled by what can be seen: “They’re easy to spot. What’s much more threatening is the way AI is being used beneath the surface to slant information and to monitor and manipulate voters.”

Mr Netanyahu’s coalition of ultra-nationalist and religious parties trails in the polls, but it holds one advantage: unity, and the machinery that comes with it. “Mr Netanyahu and his allies have been investing in election tech for years and have highly developed databases, and the parties of his bloc share voter information,” one tech-industry insider says. Over the past three years the government has also invested vast sums in online psychological warfare, using AI tools against audiences in the Middle East and public opinion in the West. Some of those tools are now turned inward.

The opposition is divided, and Mr Eisenkot’s party, Yashar, is only a year old. But it has an irregular army: anti-government protest groups rooted deep in Israel’s tech community. “Most tech professionals support the opposition and feel they’re fighting for their future in Israel,” the insider says. “We’re going to see them fighting fire with fire.”

The arsenal is already in plain view. Israeli tech outfits have built swarms of bots posing as human voters, nudging online conversations towards themes useful to whoever controls them; bots can also be hired to vote in online polls that are not statistically sound but make headlines, and headlines sway the wavering. More sophisticated are avatars — AI-made identities carrying real phone numbers, even credit cards — that hold complex opinions and slip into WhatsApp groups where nobody expects to meet a machine.

Chatbots, meanwhile, talk politics with voters and hoover up their preferences. Parties cross-reference the harvest with bought databases of online purchases and search histories, and build detailed profiles of potential voters. “The most hidden aspect of the campaigns is the automation of persuasion,” says Tehilla Shwartz-Altshuler of the Israel Democracy Institute. “AI is picking up every breadcrumb available on voters, including their viewing and music preferences.” Voters are geo-located, to work out where they may be on election day, and the messaging — online adverts, text messages, robocalls supposedly from party leaders — is tailored to each one. The Economist’s correspondent answered such a call and needed a couple of sentences to notice the politician speaking to him was software.

The parties also assume that many voters, especially the young, will ask chatbots whom to vote for, and they are flooding the wells the machines drink from. Nir Rozen, who runs FakeReporter, an NGO fighting disinformation, speaks of “inauthentic networks creating a wide range of digital assets designed to manipulate the algorithms of chatbots and AI-powered search engines” — fake interviews with politicians, mixed in with genuine material. “We’ve been posting all our old stuff on Reddit, because ChatGPT uses it,” one political activist says.

Whose job is it to stop any of this? The Shin Bet, the internal security service, appears willing only to prevent foreign meddling, broad as its mandate to protect Israel’s democracy may be. The National Cyber Directorate, in the prime minister’s office, seems no more prepared to step in. That leaves the police, with their limited resources, and the Central Election Committee, with its few powers — the same committee that has lately been busy barring Arab parties from the ballot.

The committee can issue rulings and fines, but its strongest lever is its relationships with the big internet firms, which generally heed its demands to remove dodgy content — and which, officials and privacy activists say, have so far been quick to act on what is flagged to them. Many of those firms keep research centres in Israel and know that campaigners abroad are studying this election for lessons. Election day, a public holiday, will be the hard test. Much of the illicitly gathered data feeds get-out-the-vote operations: knowing who your supporters are and what they plan to do with their day off is a key advantage, and knowing the other side’s voters is worth something too — such voters can be sent offers for shops or entertainment far from their polling station, or fake news about disturbances in their area.

The Supreme Court and the committee’s chairman have ruled that party observers in polling stations may no longer tell their bosses who has already voted — a practice allowed in past elections and central to tracking the vote on the day. “There’s a very narrow line between freedom of expression and censorship and we exercise discretion,” says Dean Livne, the committee’s acting director-general. “I don’t think we’re at the stage yet where we have to get involved with AI engines.” Israel votes on October 27th. Nobody has yet named the body that will be watching the machines.