(Bloomberg) -- Israeli Prime Minister Benjamin Netanyahu is starting to regain his popularity after struggling politically for more than a year, out-polling main rival Benny Gantz for the first time since the war against Hamas started in October.

A Channel 12 survey conducted on Wednesday of 500 voters representing a cross-section of Israeli society asked “Who is better suited to serve as prime minister?” It found 36% chose Netanyahu and 30% Gantz. The margin of error was 4.4%.

Last month, Gantz was ahead 35% to 29%.

In the new poll, Netanyahu was also ahead of opposition leader Yair Lapid by 37% to 30% and edged above former Prime Minister Naftali Bennett 34%-32%.

Read More: Israel Sees Seven More Months of Fighting to Defeat Hamas

The findings represent a setback to Israeli opposition leaders who have been trying to figure out a way to drive Netanyahu from office as the conflict in Gaza drags on, yet no election is due till 2026 and there’s little evidence that Netanyahu’s party members or coalition partners are ready to desert him. 

The survey comes two weeks after Gantz gave Netanyahu an ultimatum: present a plan for postwar Gaza or he’ll leave the cabinet on June 8. The prime minister brought Gantz in to join a three-man leadership team to help manage the war against Hamas, alongside Defense Minister Yoav Gallant.

Read More: Israel’s War Cabinet in Turmoil But Netanyahu Seen as Secure 

Gantz may have made the move to stem his already falling poll numbers, though some analysts say it mainly served to drive voters back to Netanyahu, concerned that the middle of a war is no time to engage in political maneuvering. Israelis continue to support the goal of defeating Hamas and seem willing to grant Netanyahu more time to do so.

Gadi Eisenkot, a former military chief of staff and a member of Gantz’s party who’s in the inner cabinet, spoke harshly of Netanyahu on Wednesday, accusing him of failing Israel and urging new elections before the end of the year. The speech made clear how serious his party’s plan is to leave the cabinet.

The various coalition options favor the opposition forming a government if elections were held now. 

The survey found Netanyahu’s right-wing Likud party making gains on Gantz’s centrist National Unity party. If elections were held today, Likud would win 21 seats and National Unity 25 out of parliament’s 120. That four-point gap compares with a December poll that had Gantz’s party at 37 and Netanyahu’s at 18.

The Gaza war started when Hamas militants invaded Israel on Oct. 7, killing 1,200 people and abducting 250. Israel’s counterattack has left 36,000 dead, according to authorities in the Hamas-run territory who don’t distinguish between civilians and fighters. Hamas is viewed as a terrorist group by the US and European Union.

©2024 Bloomberg L.P.