Israel and Hamas appeared close to a deal to temporarily halt their devastating six-week war for dozens of hostages being held in Gaza 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 in exchange for some 150 Palestinian prisoners held by Israel.

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

Israel has vowed to continue the war until it destroys Hamas’ military capabilities and returns all hostages.

Mr Netanyahu said the intervention of US President Joe Biden had helped to improve the deal so that it included more hostages for fewer concessions.

In an earlier briefing, chief military spokesman Daniel Hagari said: "The military will know how to maintain its military achievements in Gaza while preparing for the next stages of the war."

Mr Netanyahu acknowledged that the Cabinet faced a tough decision, but supporting the ceasefire was the right thing to do.

The prime minister appeared to have enough support to pass the measure, despite opposition from some far-right ministers.

Mr 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".

"We are advancing," the prime minister told troops during a visit earlier to a training base. "I hope there will be good news soon."

Parents and relatives of children kidnapped on 7 October and families of hostages demonstrate in Tel Aviv

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

Mr Netanyahu's office said the special three-member war cabinet met, followed by meetings of his security cabinet, a forum of senior security officials, and the full cabinet.

Israel’s Channel 12 TV said the first releases would take place on 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 on 7 October after Hamas militants stormed across the border into southern Israel and killed at least 1,200 people, most of them civilians, and kidnapped some 240 others.

A source familiar with the negotiations said those released would include foreigners. Nine-year-old Irish-Israeli girl Emily Hand is believed to be among those being held hostage by Hamas.

This afternoon, the Taoiseach said the Government is doing everything it can to facilitate her release.

A Hamas official told Al Jazeera TV that negotiations were centred on how long the truce would last, arrangements for delivery of aid into Gaza and details of the exchange of captives.

Both sides would free women and children, and details would be announced by Qatar, which is mediating in the negotiations, said the official, Issat el Reshiq.

Ismail Haniyeh, the leader of Hamas, pictured speaking in 2019
Ismail Haniyeh, the leader of Hamas, pictured speaking in 2019

Mirjana Spoljaric, president of the International Committee of the Red Cross (ICRC), met Mr Haniyeh in Qatar on Monday to "advance humanitarian issues" related to the conflict, the Geneva-based ICRC said in a statement. She also separately met Qatari authorities.

The ICRC said it was not part of negotiations aimed at releasing the hostages, but as a neutral intermediary it was ready "to facilitate any future release that the parties agree to".

Talk of an imminent hostage deal has swirled for days.

Palestinians perform funeral prayers at the Indonesian Hospital for loved ones killed by Israel

Israeli Ambassador to the United States Michael Herzog said on ABC's "This Week" on Sunday that he hoped for an agreement "in the coming days", while Qatar's Prime Minister Sheikh Mohammed Bin Abdulrahman al-Thani said that the remaining sticking points were "very minor".

US President Joe Biden said a deal was "very close, very close".

The Hamas raid on 7 October, the deadliest day in Israel's 75-year-old history, prompted Israel to invade Gaza to annihilate the militant group that has ruled there since 2007.

Since then, Gaza's Hamas-run government says at least 14,100 Palestinians have been confirmed killed, including nearly 6,000 children, by Israeli bombardment that has turned much of Gaza, especially its northern half, into wasteland.

Around two-thirds of Gaza's 2.3 million people have been made homeless, with thousands a day still trekking south on foot with belongings and children in their arms. The central and southern parts of the enclave, where Israel has told them to go, have also regularly come under attack.

A day and a night of rain and cold winter weather worsened the dire conditions in Gaza for the displaced, many thousands of whom are sleeping rough or in makeshift tents.

Gaza health authorities have said at least 20 Palestinians were killed in Israeli bombing of the Nuseirat refugee camp in central Gaza at midnight. There was no immediate comment from Israel.

Death toll in Gaza to date

The already crowded Nuseirat district, which grew out of a camp for Palestinian refugees from the 1948 Israeli-Arab war, is just south of the wetlands that bisect the strip and has been the arrival point for huge numbers escaping the fighting further north.

Bombing in southern areas leaves Gazans fearing they have no place safe to go. Neighbouring Egypt has allowed the evacuation of some wounded and foreign passport holders, but says it will not accept a mass exodus.

"Continued bombing targeting displaced people in the South has a clear objective, and that is to force Gaza's residents to leave the Strip," Egypt's foreign ministry spokesman said on social media.

"Egypt has clearly declared its utter rejection of any enforced displacement attempt of Palestinians."

Tens of thousands of civilians are believed to remain in the north despite an Israeli order to flee. All hospitals there have ceased functioning normally, many still housing patients and displaced Gazans. Israel says Hamas uses hospitals as shields for its fighters, which Hamas and the hospitals deny.

The World Health Organization said it was working on plans to evacuate three Northern Gaza hospitals: Al-Shifa, Al Ahli and the Indonesian Hospital, lamenting this as a last resort.

"It's robbing the entire population of the north of the means to seek health (care)," WHO spokesperson Christian Lindmeier told a Geneva press briefing.

Issam Nabhan, head of the nursing department of the Indonesian Hospital, where the WHO and Gaza authorities say 12 people were killed on Monday by Israeli fire, told Al-Jazeera there were 60 dead bodies on the grounds.

"There is no oxygen to supply the patients. All those on artificial respiration have died. We speak out to the free world. The Indonesian hospital has become a cemetery, not a hospital."