Israel’s has agreed a ceasefire deal with the Hamas militant group that would bring a temporary halt to the devastating war which has stretched on for more than six weeks.

Under the deal, Hamas is to free 50 of the roughly 240 hostages it is holding in the Gaza Strip over a four-day period, the Israeli government said this morning.

It said it would extend the lull by an additional day for every 10 hostages released, but stressed that hostilities would resume after the pause until it destroys Hamas’ military capabilities and returns all hostages.

More than 200 Israeli citizens were kidnapped and taken to Gaza during the terrorist rampage on its territory on October 7, which left more than 1,300 people dead. 

Israel said the first hostages to be released would be women and children. A statement released by Qatar, which mediates with Hamas, said on Wednesday morning the deal includes “the release of a number of Palestinian women and children detained in Israeli prisons, the number of those released will be increased in later stages of implementing the agreement,” and that it would allow additional humanitarian aid into Gaza.

The statement from Qatar’s foreign ministry described the talks that produced the agreement as a mediation by Egypt, the US and Qatar for a “humanitarian pause,” adding that the start time of the truce will be announced within the next day.

It is understtood the US, which backs Isreal with funding and arms, was heavily involved in brockering the deal. 

READ MORE: Humza Yousaf's Mother-in-law breaks silence on Gaza ordeal

Many nations have called for a ceasefire in the fighting, which has left more than 13,000 dead, according to the Hamas-run health ministry in the strip. 

The Scottish parliament became the latest to add its voice to calls for peace with a vote at Holyrood on Tuesday night. 

Ahead a vote in the Israeli cabinet early this morning, Prime Minister Benjamin Netanyahu said Israel would resume its offensive against Hamas after the ceasefire expires.

It was not immediately clear when the truce would go into effect. Mr Netanyahu convened his Cabinet for the vote late on Tuesday.

The meeting stretched well into the early hours, underscoring the sensitivity of a proposal that would suspend an Israeli offensive against Hamas before it has reached its goals.

Mr Netanyahu sought to assure the government ministers that the break was only tactical, vowing to resume the offensive after the truce expires. Top security officials also attended the meeting.

Israel Palestinians Netanyahu Blame GameIsraeli Prime Minister Benjamin Netanyahu (Abir Sultan/Pool Photo via AP)

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

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.”

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.

The deal does not mean an end to the war, which erupted after Hamas militants stormed across the border into southern Israel and killed hundreds of people, most of them civilians.

In weeks of Israeli airstrikes and a ground invasion, thousands of Palestinians have been reported to be killed, two-thirds of them women and children, while 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 November 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.

BidenUS President Joe Biden (Evan Vucci, AP)

United States President Joe Biden said in a statement late on Tuesday that he welcomes the agreement to release at least 50 hostages being held in Gaza and stressed that “it is important that all aspects of this deal be fully implemented.”

“I am extraordinarily gratified that some of these brave souls, who have endured weeks of captivity and an unspeakable ordeal, will be reunited with their families once this deal is fully implemented,” Mr Biden said.

He said the agreement should release some American hostages, and added, “I will not stop until they are all released.”

READ MORE: Humza Yousaf says MPs who refused to back ceasefire in Gaza 'unforgivable'

Mr Biden emphasised that Mr Netanyahu has committed to supporting an “extended pause” to make sure not only all hostages are released but that humanitarian assistance can be sent to Palestinians in Gaza.

“Today’s deal is a testament to the tireless diplomacy and determination of many dedicated individuals across the United States Government to bring Americans home,” Mr Biden said.

Earlier on Tuesday, Mr Biden said a deal on releasing some hostages was “very close.”

Izzat Rishq, a senior Hamas official, said on Tuesday that an agreement could be reached “in the coming hours.”