JERUSALEM — Israel and Hamas on Tuesday appeared close to a deal to temporarily halt their devastating six-week war for dozens of hostages being held in the Gaza Strip to be freed in exchange for Palestinians in Israeli prisons.

But as Israeli Prime Minister Benjamin Netanyahu convened his Cabinet for a vote, he vowed to resume the Israeli offensive against Hamas as soon as the truce ends.

“We are at war, and we will continue the war,” he said. “We will continue until we achieve all our goals.”

The Israeli Cabinet was expected to vote on a plan that would halt Israel’s offensive in Gaza for several days in exchange for the release of about 50 of the 240 hostages held by Hamas. Israel has vowed to continue the war until it destroys Hamas’ military capabilities and returns all hostages.

Hamas predicted a Qatari-mediated deal could be reached in “the coming hours.”

Netanyahu acknowledged that the Cabinet faced a tough decision, but supporting the cease-fire was the right thing to do. Netanyahu appeared to have enough support to pass the measure, despite opposition from some hard-line ministers.

Netanyahu said that during the lull, intelligence efforts will be maintained, allowing the army to prepare for the next stages of battle. He said the battle would continue until “Gaza will not threaten Israel.”

The announcement came as Israeli troops battled Palestinian gunmen in an urban refugee camp in northern Gaza and around hospitals overcrowded with patients and sheltering families.

Details of the expected cease-fire deal were not released. Israeli media reported that an agreement would include a five-day halt in Israel’s offensive in Gaza and the release of 50 hostages held by Hamas in exchange for some 150 Palestinian prisoners held by Israel.

Israel’s Channel 12 TV said the first releases would take place Thursday or Friday and continue for several days.

Talks have repeatedly stalled. But even if a deal is reached, it would not mean an end to the war, which erupted Oct. 7 after Hamas gunmen stormed across the border into southern Israel and killed at least 1,200 people, most of them civilians, and kidnapped some 240 others.

In weeks of Israeli airstrikes and a ground invasion, more than 11,000 Palestinians have been killed, two-thirds of them women and minors, and more than 2,700 others are missing and believed to be buried under rubble, according to Gaza’s Health Ministry. The ministry says it has been unable to update its count since Nov. 11 because of the health sector’s collapse.

Gaza health officials say the toll has risen sharply since, and hospitals continue to report deaths from daily strikes, often dozens at a time.

The Health Ministry in the West Bank last reported a toll of 13,300 but stopped providing its own count Tuesday without giving a reason. Because of that, and because officials there declined to explain in detail how they tracked deaths after Nov. 11, the AP decided to stop reporting its count.

The Health Ministry toll does not differentiate between civilians and combatants. Israel says it has killed thousands of Hamas fighters but has not provided evidence for its count.

In southern Lebanon, an Israeli strike killed two journalists with Al-Mayadeen TV, according to the Hezbollah-allied Pan-Arab network and Lebanese officials. A separate Israeli drone strike in Lebanon killed four Hamas members, a Palestinian official and a Lebanon security official said.

The Israeli military has been trading fire almost daily across the border with Lebanon’s Hezbollah group and Palestinian militias since the outbreak of the war.

Israel, the United States and Qatar, which mediates with Hamas, have negotiated for weeks over a hostage release that would be paired with a temporary cease-fire and the entry of more aid.

In Washington, President Joe Biden said Tuesday that a deal on releasing some hostages was “very close.”

“We could bring some of these hostages home very soon,” he said at the White House.

Qatar’s Foreign Ministry spokesman, Majed al-Ansari expressed optimism, telling reporters that “we are at the closest point we ever had been in reaching an agreement.” He added that negotiations were at a “critical and final stage.”

Hamas’ leader-in-exile, Ismail Haniyeh, also said they were close to a deal.

Israel’s Channel 12 TV, citing anonymous Israeli officials, said a truce could be extended and additional Palestinian prisoners released if there were additional hostages freed.

Inside Gaza, the front line of the war shifted to the Jabaliya refugee camp, a densely built district of concrete buildings near Gaza City that houses families displaced in the 1948 war surrounding Israel’s creation. Israel has bombarded the area for weeks, and the military said Hamas fighters have regrouped there and in other eastern districts after being pushed out of much of Gaza City.

The fighting in Jabaliya also affected two nearby hospitals, trapping hundreds of patients and displaced people sheltering inside. A strike Tuesday hit inside one of the facilities, al-Awda, killing four people, including three doctors, the hospital director told Al-Jazeera TV. The director, Ahmed Mahna, blamed the strike on Israel, a claim that AP could not independently confirm. The medical aid group Doctors Without Borders confirmed that two of the doctors killed worked for it.