JERUSALEM — A strike in Gaza killed several members of a family Friday as Israel ordered ground forces to advance deeper into the territory and vowed to hold more land until Hamas releases its remaining hostages.

The explosion east of Gaza City killed a couple and their two children, plus two children who weren’t related to them but were in the same building, according to witnesses and a local hospital. The Israeli army said it struck a militant in a Gaza City building and took steps to minimize civilian harm. It was not clear whether the army was referring to the same strike.

The Israeli military said on social media that it was planning to conduct raids in three neighborhoods west of Gaza City, and it warned Palestinians to evacuate the area in advance. The warning came shortly after the military said it intercepted two rockets fired from northern Gaza that set off sirens in the Israeli coastal city Ashkelon.

After retaking part of a corridor that divides Gaza’s north from south, Israeli troops moved Thursday toward the northern town Beit Lahiya and the southern border city Rafah. The military said it had resumed enforcing a blockade on northern Gaza, including Gaza City.

Defense Minister Israel Katz said Friday that Israel would carry out operations in Gaza “with increasing intensity until the hostages are released by Hamas. The more Hamas continues its refusal to release the kidnapped, the more territory it will lose to Israel.”

Meanwhile, in Israel, Prime Minister Benjamin Netanyahu was delivered a setback in his attempt to fire the country’s domestic security chief.

Hours after Netanyahu’s Cabinet unanimously approved the firing Ronen Bar, head of the Shin Bet security service, the Supreme Court ordered a temporary halt to his dismissal until an appeal can be heard no later than April 8. Netanyahu’s office had said Bar’s dismissal was effective April 10 but that it could come earlier if a replacement is found.

Israel’s attorney general has ruled that the Cabinet has no legal basis to dismiss Bar.

A Shin Bet report into Hamas’ Oct. 7, 2023, attack that prompted the war in Gaza acknowledged failures by the security agency. But it also said policies by Netanyahu’s government created the conditions for the attack.

Netanyahu has resisted calls for an official state commission of inquiry into the attack and has tried to blame the failures on the army and security agencies.

A number of senior security officials, including a defense minister and army chief, have been fired or forced to step down. Bar had been one of the few senior security officials since the attack to remain in office.

The decision to sack Bar deepens a power struggle focused largely over who bears responsibility for the Hamas attack. It also could set the stage for a crisis over the country’s division of powers.

Critics say the move is a power grab by the prime minister against an independent-minded civil servant, and tens of thousands of Israelis have demonstrated in support of Bar, including outside Netanyahu’s residence Friday.

Netanyahu sounded defiant in a social media post Friday, saying: “The State of Israel is a state of law and according to the law, the Israeli government decides who will be the head of the Shin Bet.”

Nearly 600 Palestinians have been killed since Tuesday, when Israel shattered a truce that had facilitated the release of more than two dozen hostages and brought relative calm since late January.

In Rafah, officials said Israeli bombardments had forced residents into the open, deepening their suffering. Officials said they halted the building of shelter camps to protect employees.

Israel had already cut off the supply of food, fuel and humanitarian aid to Gaza’s 2 million Palestinians. It says military operations will escalate until Hamas releases the 59 hostages it holds — 24 of them are believed to be alive — and gives up control of the territory.

The ceasefire agreed to in mid-January was a three-phase plan meant to lead to a long-term cessation of hostilities, a full Israeli withdrawal from Gaza, and the return of all hostages taken by Hamas.

In the first phase of the ceasefire, Hamas returned 25 living hostages and the remains of eight in exchange for the release of nearly 1,800 Palestinian prisoners. Israeli forces also withdrew to buffer zones inside Gaza, and hundreds of thousands of displaced Palestinians returned to northern Gaza.

The ceasefire was supposed to last as long as talks on the second phase continued but Netanyahu balked at entering substantive negotiations.

Instead, he tried to force Hamas to accept a new ceasefire plan put forth by U.S. Mideast envoy Steve Witkoff.

That plan would have required Hamas to release half its remaining hostages — the militant group’s main bargaining chip — in exchange for a ceasefire extension and a promise to negotiate a lasting truce. Israel made no mention of releasing more Palestinian prisoners — a key component of the first phase.

Hamas says it will only release the remaining hostages in exchange for a lasting ceasefire and a full Israeli withdrawal from Gaza, as called for in the original ceasefire agreement mediated by the United States, Egypt and Qatar.

Netanyahu said he ordered the resumed strikes because of Hamas’ rejection of the new proposal.