Israeli Prime Minister Benjamin Netanyahu said negotiators have reached an agreement on a cease-fire in the Gaza Strip that would free Israeli hostages, ending two days of debate that had underscored the pact’s fragility.

The prime minister, who had accused Hamas of reneging on parts of an agreement originally announced Wednesday, said the country’s security cabinet would meet to approve the deal Friday and that his full cabinet would be convened later to sign off.

The deal is likely to go into effect on Monday, a person familiar with the matter said.

President-elect Donald Trump , who had pushed hard for a deal to be wrapped up before his inauguration Monday, weighed in again as negotiators debated the last points.

“Frankly, it better be done before I take the oath of office,” Trump said in a radio show interview Thursday. “I assume it is now. You know, we shook hands, and we signed certain documents. But it better be done.”

A day earlier, President Biden and the prime minister of Qatar had announced that both Israel and Hamas had accepted the truce, the result of a year of painstaking diplomacy.

Palestinian militant group Hamas also said it had reached a deal with Israel, while Israeli President Isaac Herzog welcomed the agreement and urged the Israeli government to accept it.

But as celebrations erupted across the Gaza Strip and leaders exchanged congratulations, Netanyahu raised uncertainty by accusing Hamas on Thursday of reneging on parts of the agreement during negotiations taking place in Qatar, creating what his office called “a last-minute crisis.”

Ezzat Al-Rishq, a senior Hamas official and member of the group’s political bureau, said Thursday that the group remained committed to the deal. Another Hamas official, Sami Abu Zuhri, told a pan-Arab satellite channel that Netanyahu’s comments were “baseless.”

Biden administration officials had said they were confident the deal would go ahead despite the last-minute disputes.

“We’re aware of these issues and we are working through them with the Israeli government, as well as other partners in the region,” White House National Security Council spokesman John Kirby said. “We are confident these implementing details can be hammered out and that the deal will move forward this weekend.”

One issue that arose in the talks in the Qatari capital, Doha, was the matter of Israel’s withdrawal from a strip of land on the Gaza-Egypt border known as the Philadelphi corridor . Israeli officials have said they want Israel’s forces to remain in the area longer. The text of the agreement, viewed by The Wall Street Journal, calls on Israel to gradually reduce its forces in the area in the first of the three phases of the deal.

And while the two sides have agreed on the hostages that would be freed from Gaza, a disagreement remains over which Palestinian prisoners Israel would release in return, the mediators said.

Hamas had again raised the release of six prominent Palestinian detainees, including political leaders Marwan Barghouti and Ahmad Saadat, mediators said. The group brought up the issue after initially agreeing to postpone discussion of it to a later phase of the deal, they added.

Hamas had made new demands that Israel won’t agree to, including regarding the list of prisoners to be released, the Israeli official said.

In the end, nothing of substance was changed in the agreement over the two days of debate, Arab mediators said.

The prospect of a cease-fire hasn’t brought about a lull in the fighting. Israel launched more airstrikes in the Gaza Strip on Wednesday and Thursday morning, according to Palestinian authorities and residents of the enclave. Israeli strikes killed 81 people in the past 24 hours, according to Palestinian health authorities, who don’t say how many were combatants. A number of casualties were still under the rubble and on the roads where rescue and recovery workers couldn’t reach them, they said.

The Israeli military said it had struck 50 targets across the enclave over the past day, including members of Hamas and Islamic Jihad, another militant group in Gaza, and weapons and other military facilities belonging to Palestinian armed groups. It also said it killed a Hamas member who participated in the Oct. 7, 2023, attack on Israel that sparked the current war.

The cease-fire deal’s announcement on Wednesday came after negotiators—including Steve Witkoff , Trump’s designated Middle East envoy, and officials from the U.S., Israel and Arab countries—convened in Doha to complete the draft agreement.

The deal envisions several phases, starting with an initial release of hostages by Hamas and Palestinian prisoners by Israel, along with convoys of humanitarian supplies entering Gaza. Hamas and Israel would negotiate the terms of a more lasting truce during the initial stage.

Within Israel, the deal also faces resistance from far-right politicians who want Israel to stick to its original stated war aim of eliminating Hamas. Hard-line Israeli politicians such as National Security Minister Itamar Ben-Gvir and Finance Minister Bezalel Smotrich hold key positions in Netanyahu’s government and have threatened in the past to leave his cabinet if he accepts a cease-fire, risking the collapse of the ruling coalition.

Ben-Gvir on Thursday said he would leave the government if a deal were passed and urged Smotrich and members of Netanyahu’s party, Likud, to join him.

Groups of right-wing protesters who oppose the deal took to the streets of Jerusalem on Thursday, with dozens blocking roads and holding signs that read, “Yes to victory, no to surrender!” Protests in recent days against the deal have drawn hundreds of activists.

If it is fully implemented, the deal could mark the beginning of the end of one of the deadliest episodes in modern Middle Eastern history. The war has killed more than 46,000 Palestinians in Gaza and hundreds of Israeli soldiers, leaving much of the enclave in ruins.

Israel launched its offensive in Gaza in response to the Hamas-led attack in southern Israel that killed around 1,200 people. Palestinian militants seized another 250 hostages, setting in motion a painful ordeal for hundreds of the captives’ families who have campaigned for their release.

A cease-fire in Gaza could also calm tensions across the region after the conflict ignited wider hostilities, including a war between Israel and Hezbollah in Lebanon and the first-ever exchanges of direct fire between Israel and Iran last year.

Write to Summer Said at summer.said@wsj.com , Jared Malsin at jared.malsin@wsj.com and Anat Peled at anat.peled@wsj.com