Prime Minister Benjamin Netanyahu is asking Israelis to re-elect him on Oct. 27 on the argument that only he can keep them safe, and he has tied his campaign to the war in Gaza.

On Sept. 29, Mr. Netanyahu said Israel’s enemies were plotting an attack before the vote. He gave no evidence. He then turned to Gaza, where he said Israeli troops had killed more than 100 “terrorists” in recent weeks, Al Jazeera reported in an analysis published Sunday. A day after the warning, a Flydubai flight from Dubai to Tel Aviv, full of Israeli passengers, nearly crashed when the co-pilot attacked the pilot with an ax in the cockpit. Mr. Netanyahu used the episode to argue that he was still the man for the job.

It is the first general election since the Hamas-led attack of Oct. 7, 2023, which killed 1,139 people in Israel. Israel’s war in Gaza has killed more than 74,000 Palestinians since then, nearly 1,500 of them after a ceasefire took hold last year, according to Al Jazeera’s figures.

The race is close. A Maariv poll published Friday put Mr. Netanyahu’s coalition and the opposition at 52 seats each, short of the 61 needed for a majority in the 120-seat Knesset, The Jerusalem Post reported. Gadi Eisenkot’s Yashar party had 21 seats, Likud 20 and Naftali Bennett’s B’yachad 13. A Channel 13 poll had Mr. Netanyahu’s bloc ahead 55 seats to 50, still short of a governing majority.

Last month, reports said Mr. Netanyahu had been warned of an imminent Hamas attack in 2023 by Egypt’s intelligence chief, Abbas Kamel, and by the president of the United Arab Emirates, Sheikh Mohamed bin Zayed Al Nahyan. His two main rivals cited the reports to call him “unfit” to lead. Mr. Netanyahu has denied being forewarned. The polls barely moved.

Mairav Zonszein, an Israel-Palestine analyst at the International Crisis Group in Tel Aviv, said trust in the government had already been damaged by its judicial overhaul before the attack. “Israelis in general still see Netanyahu as kind of the guy on security. And more to the point, they don’t really see an alternative,” she told Al Jazeera.

A June survey by Mitvim, the Israeli Institute for Regional Foreign Policies, found that Israelis backed the government’s military approach and rejected ending the occupation, even as they worried about the country’s isolation abroad.

The far right has pushed further. Finance Minister Bezalel Smotrich, who is under sanctions in several Western countries, told Ynet late last month that the army should “go to war” in the occupied West Bank and “do there what we did in Gaza.” Less than two weeks later his electoral ally Moshe Feiglin told The Jerusalem Post that “the enemy is Gaza, not Hamas” and called for annexing the territory after the vote. “The baby that will be born tomorrow in Gaza will do exactly the same,” Mr. Feiglin said.

Ahmed Najar, a Palestinian political analyst, said those were not “stray comments” but a campaign message. “The frightening reality is that the coming election risks becoming a competition not over whether Palestinian life should be protected, but over who can promise to erase it most aggressively,” he said.

Ahron Bregman, a senior teaching fellow at King’s College London, said the shift began after the 1973 war “but it has intensified dramatically since October 7,” especially among younger Israelis. He called Mr. Netanyahu’s decision to bring Mr. Smotrich and Itamar Ben-Gvir, the national security minister, into his coalition his greatest mistake, because it gave them legitimacy. Mr. Ben-Gvir, who has been convicted of inciting racism and supporting a terrorist organization, now hopes to become defense minister, Mr. Bregman said. “This is madness. But that’s contemporary Israel.”

Several parties on both sides of the race back expelling Palestinians from Gaza, according to analysts who spoke with Al Jazeera. Omar Baddar, director of Palthink for Strategic Studies, said leaders were trying to outbid one another: “Who[ever]’s more radical is more likely to get more votes.”

Sami Abu Shehadeh, a prominent Palestinian citizen of Israel, was forced to withdraw from the election over remarks about the war. Far-right leaders have faced no such penalty.

The war has also worn on the army. The Defense Ministry said Tuesday that nearly 30,000 soldiers and security personnel had entered its rehabilitation system since Oct. 7, about 63 percent of them with psychological effects, Ynet reported. Al Jazeera described all of them as facing trauma. Some of that strain has reached the psychiatric wards for children, and voters are also watching grocery prices.

The ministry’s rehabilitation budget has risen 88 percent in three years, to 10 billion shekels, or about $3.3 billion, and most of it pays for mental health and post-traumatic stress treatment.