Talks between Israel and Hamas over the release of dozens of Israeli hostages held in Gaza have stalled, dimming hopes that a deal could be reached before Ramadan begins in a few days, according to several people briefed on the conversations.

Negotiators had been discussing a proposal for an initial six-week cease-fire during which Hamas would release about 40 people — including women, elderly and ill hostages, and five female Israeli soldiers — for a substantial number of Palestinian prisoners.

The discussions included terms for releasing at least 15 prisoners convicted of serious acts of terrorism who would be exchanged for the female soldiers. The terms also said Israel would release hundreds of other detainees or prisoners, at an average of 10 Palestinians for every Israeli civilian freed, officials said.

American officials had said that they hoped to reach an agreement to release some hostages and put in place a temporary pause in fighting before Ramadan, which is expected to start this Sunday. President Biden expressed confidence last week that a deal was within reach.

But in recent days, Hamas has backed away from the proposed agreement and made demands that Israel refuses to meet, according to officials briefed on the talks. The negotiations had been taking place in Doha, Qatar, before they moved to Cairo in recent days.

John F. Kirby, a National Security Council spokesman, said on Wednesday that while the United States was disappointed that an agreement had not been reached, negotiators were still confident in the parameters of the deal they had helped negotiate.

“It is just a matter of getting Hamas to sign on,” he said.

Hamas, Mr. Kirby said, had been engaging in proposals and counterproposals, working with the other parties to develop the framework of the agreement.

“There had been a robust back and forth on the details, but the fact that we are not there yet is an indication that the details still are not all worked out,” he said.

One official in the region said the main point of difference is the same one that has hovered over the talks for weeks: Hamas wants Israel to commit now to a permanent cease-fire during or after three phases of hostage releases, while Israel refuses to do so. Israel wants to focus on an agreement for the terms of the first phase only, a position the United States supports. Until now, the discussions around the first phase have centered on the potential release of those 40 people, out of about 100 remaining hostages.

The Israeli delegation has not attended the sessions in Cairo because of Hamas’s new demands. Israeli officials said they believed a broad consensus for the first phase of the agreement had been reached, only to have Hamas renew its push for broader demands.

Besides the permanent cease-fire, Hamas is also insisting on a withdrawal of Israeli troops from northern Gaza after the third phase of the hostage releases and greater aid into Gaza, with a guarantee that half go to northern Gaza, the official in the region said. These demands are ones that can be worked out between the Israeli government and Hamas, officials said.

The people briefed on the talks in Egypt declined to be identified by name or nationality, citing the fragile nature of the negotiations. A Hamas official did not respond to a request for comment.

The United States had been pushing for an agreement to be reached before Ramadan, worried that the situation could become more intractable during the holy month of fasting. Frustration and tempers could flare then, making an agreement far more difficult to achieve, U.S. officials said.

American officials continue to push for a deal. On Tuesday, Secretary of State Antony J. Blinken met in Washington with Benny Gantz, a member of the Israeli war cabinet who might eventually challenge Prime Minister Benjamin Netanyahu for his office.

After the meeting, the main State Department spokesman, Matthew Miller, said in a statement that Mr. Blinken “underscored the importance of reaching an agreement to achieve the release of Israeli hostages held by Hamas, which would lead to a temporary cease-fire and allow additional humanitarian assistance to enter Gaza.”

The same day, Prime Minister Mohammed bin Abdulrahman bin Jassim Al Thani of Qatar, the most senior Qatari negotiator in the hostage talks, spoke with Mr. Blinken separately in Washington during a previously scheduled meeting on common strategic concerns. Both men told reporters it was important to try to get hostages released and some form of cease-fire.

Qatar and Egypt have been bringing proposals to Hamas political and military leaders. The United States has tried to draft broad proposals to restart the talks after they hit various roadblocks following an initial seven-day pause in November during which Hamas released about 100 hostages, mainly civilians.

People familiar with the negotiations believe Hamas has issued new demands for a variety of reasons.

On Feb. 28, Ismail Haniyeh, a Hamas political leader based in Qatar, called publicly for a march during Ramadan in Jerusalem at the Al Aqsa Mosque, known to Jews as the Temple Mount. Some Israeli officials believe Hamas’s military wing wants those protests to turn violent. Hamas may want to avoid a cease-fire deal for fear of being accused of breaking it if the protests become violent.

Hamas, according to people briefed on the talks, believes an action at the mosque will show its strength despite the monthslong Israeli military campaign in Gaza and could increase pressure on Mr. Netanyahu to end the fighting.

But Hamas may have made new demands during the negotiations for another reason.

Last Thursday, Israeli forces opened fire in Gaza while a crowd had gathered near a long convoy of aid trucks. The chaotic scene led to more than 100 deaths.

U.S. officials harshly criticized Israel’s handling of the convoy and its failure to provide security for desperate Palestinian people.

Some officials briefed on the talks say Hamas leaders may believe the deaths around the humanitarian convoy have strengthened their position in the negotiations and weakened Israel’s international standing.

Adam Rasgon contributed reporting from Jerusalem.