JERUSALEM — A cease-fire aimed at ending 11 days of withering combat between Israel and Hamas militants took effect early Friday, hours after Israel’s security cabinet voted to approve an Egyptian initiative to stop the fighting.

The cabinet, made up of top security officials and ministers, voted unanimously to accept what Israel described as a bilateral and unconditional cease-fire. Facing mounting international pressure, including from President Biden in recent days, the Israeli government said it decided to bring the air and artillery campaign to a halt after significantly degrading Hamas’s military infrastructure and killing many of its commanders.

Hamas, which governs the Gaza Strip, said it had also agreed with the Egyptian proposal, which came into force at 2 a.m. local time. “The Palestinian resistance will abide by this agreement as long as the occupation is committed,” said Taher al-Nounou, a media adviser to the head of the Hamas political bureau, referring to Israeli forces.

The conflict has taken a steep toll. Israel pounded Gaza with airstrikes and artillery fire, causing extensive destruction and killing 232 Palestinians, including at least 65 children, local health officials said. Hamas’s ferocious rocketing left 12 dead in Israel, two of them children, and sent residents of much of the country repeatedly fleeing for shelter.

In the hours leading up to the start of the cease-fire, the two sides continued to trade barrages, and air raid sirens repeatedly sounded in Israeli communities near the Gaza Strip. But Hamas rocket fire stopped about 10 minutes before the 2 a.m. deadline, and Israeli airstrikes also ceased.

As the hour struck, Gaza residents cheered from their terraces. Celebratory gunfire sounded over the mostly dark neighborhoods, a few horns sounded from cars braving streets pocked with shell craters and praise for God rang out from mosques around Gaza City. Gazans paraded along the beach, holding up their phone lights.

Celebrations also broke out in the West Bank cities of Nablus, Jenin, Ramallah and Hebron, and fireworks were set off in East Jerusalem.

Here’s what to know:

  • Israel and Hamas have agreed to an Egyptian cease-fire initiative after 11 days of combat.
  • The Palestinian death toll in Gaza rose to 232, including at least 65 children, local health officials said. In the West Bank, at least 21 Palestinians have been killed since Friday, officials there said.
  • The death toll in Israel stood at 12, including two children, after police said two Thai workers were killed Tuesday by rockets fired from Gaza.

Osama Hamdan, Hamas’s top official in Lebanon, said the militant group had won concessions from Israel on several contentious points. It said these include Israel’s interference at al-Aqsa Mosque in Jerusalem and in the East Jerusalem neighborhood of Sheikh Jarrah, where Israeli settlers have been seeking to evict several Palestinian families. These were two flash points that triggered the military escalation earlier this month.

“We obtained guarantees regarding lifting the hand of the occupation from Sheikh Jarrah and the mosque,” he said in an interview on Hezbollah’s television channel.

But Israeli officials said the cease-fire agreement called only for the immediate halt to military operations. The security cabinet statement emphasized that the deal entailed a “mutual and unconditional cease-fire.” Members of the cabinet speaking later to Israeli media said no concessions had been made on Jerusalem.

The Israel Defense Forces said their campaign, including 200 hours of bombardment, had largely achieved the goal of sharply degrading Hamas’s capability.

“I’d like to commend our security forces and the IDF, led by the chief of staff, who have, over the past 11 days, reached military achievements unprecedented in their scale, precision and strategic significance for the struggle with terrorist organizations in Gaza,” Defense Minster Benny Gantz said in a statement.

Efforts to broker a cease-fire between Israel and Hamas had stepped into high gear earlier on Thursday as hostilities neared a 12th day, with Egyptian and U.N. mediators furiously working to find a resolution acceptable to both sides. The Egyptian government will now send security delegations to Israel and the Palestinian territories, to follow up on implementation and secure agreement on other measures to maintain stability.

Speaking at the White House, Biden commended Netanyahu for deciding to end the military campaign. “These hostilities have resulted in the tragic deaths of so many civilians, including children, and I send my sincere condolences to all the families, Israeli and Palestinian, who have lost loved ones,” Biden said.

The president repeated his support for Israel’s right to defend itself against Hamas attacks and said the United States would help Israel replenish its missile defense system, which military officials say had intercepted most of the rockets fired across the border. Biden added, “I believe the Palestinians and Israelis equally deserve to live safely and securely and enjoy equal measures of freedom, prosperity and democracy.”

Shortly after the president’s remarks, Secretary of State Antony Blinken announced he would be visiting the region “in the coming days” to meet with Israeli, Palestinian and regional leaders.

Palestinians inspect damage to buildings in northern Gaza City on Thursday. (Fatima Shbair/Getty Images)

On Wednesday, in the most assertive language used publicly by the White House since the fighting began, Biden had told Netanyahu he “expected a significant de-escalation today on the path to a cease-fire.”

Biden’s intervention was a sharp departure from what Netanyahu experienced during four years of Donald Trump’s presidency, and sources inside the prime minister’s circle told Israeli media that Netanyahu was taken aback. He found himself caught between pressure to accommodate Israel’s most important ally and the need not to appear weak before his right-wing base.

“To Israeli ears, a cease-fire means a kind of Hamas victory, where they get the amalgamated West Bank, Gaza and Arab Palestinian political victory, and also got to fire 4,000 rockets at us,” said Michael Oren, a former Israeli ambassador to Washington. “For many Israelis this time, they’re increasingly telling themselves: once we’ve started, we might as well keep going to the end.”

Netanyahu was days, perhaps hours, away from being ousted from Israel’s top job last week when the fighting began. A coalition of opposition parties was reportedly close to announcing it had secured a bare majority of parliamentary votes to form a new government when Hamas fired missiles at Jerusalem. The escalation has derailed that effort, opening the door for Israel’s fifth election in two years. Political observers say Netanyahu needs a decisive military victory to improve his odds at the ballot box.

Netanyahu publicly resisted Biden’s entreaty at first, releasing a video message that made no mention of a cease-fire. “I especially appreciate the support of U.S. President Biden, for the right of self-defense for the state of Israel,” he said, adding that the operation would “continue until its goal is achieved — to restore peace and security to you, citizens of Israel.”

The American pressure may have played to the prime minister’s benefit. Chuck Freilich, a former Israeli deputy national security adviser, said that Netanyahu has for years leveraged U.S. criticism of Israeli actions toward Palestinians in political talking points for his right-wing supporters.

“Netanyahu needs to do whatever he can to rally his base, to show that he’s the only one to stand up to the world, and standing up to international pressure is always popular,” said Freilich.

After enduring 11 days of air and artillery strikes, Gaza has seen its infrastructure devastated, including damaged electricity and water systems, according to aid agencies, which have warned of a burgeoning humanitarian crisis. Israel has kept checkpoints into Gaza closed throughout most of the conflict. Trucks carrying medical supplies and relief workers were turned back in recent days.

An electrical workers union in Israel said Thursday that its members would refuse to carry out repairs on power lines heading into Gaza in protest of Hamas’s refusal to return a civilian and the bodies of two Israeli soldiers believed to have been held in the enclave since 2014.

Layan Muhareb, 10, is treated for wounds caused by an Israeli airstrike Thursday in Khan Younis in the southern Gaza Strip. (Yousef Masoud/AP)

Even as the diplomacy accelerated on Thursday, military activity continued. Large explosions rocked Gaza, lighting up the predawn sky and drowning out the morning calls to prayer, according to local television footage. Witnesses in Gaza said Israeli tanks shelled targets near Khan Younis, the enclave’s second-largest city. Video on social media showed a three-story building in the Jabalya refugee camp exploding in a fireball Thursday morning. The family had been warned to evacuate, witnesses said.

The Israeli military said it had struck a number of Hamas military targets, including a weapons manufacturing facility, underground rocket launchers and “a weapons storage unit located inside the residence of the former Minister of Justice and Released Prisoners who previously served as a member of the Hamas Political Bureau.”

Israeli soldiers inspect a house in Ashkelon damaged by a rocket fired from the Gaza Strip. (Ariel Schalit/AP)

A Hamas spokesman acknowledged that several of its leaders’ homes were hit, but denied that the residences also served to store weapons.

“Homes of many Hamas members and leaders were targeted and destroyed, but Israeli claims that they were weapons caches were raised just to justify targeting civilian and residential facilities,” the spokesman said in response to a query on the group’s media WhatsApp account. “Israeli army has to provide evidence to its claims, and we are sure it will never find this evidence because we know very well where we keep our stockpiles and where we launch our rockets.”

Both Hamas and Islamic Jihad, meantime, said they carried out multiple mortar attacks across the border. Residents of the Israeli communities of Netiv Haasara and Nahal Oz, near the Gaza border, were told to stay inside during what civilians on both sides hoped would be the final hours of fighting.

Rubin and Morris reported from Tel Aviv and Balousha from Gaza City. Sufian Taha in Jerusalem and Anne Gearan in Washington contributed to this report.