President Biden said on Monday that he believed negotiators were nearing an agreement that would halt Israel’s military operations in Gaza within a week in exchange for the release of at least some of the more than 100 hostages being held by Hamas.

Speaking with reporters during a stop in New York, Mr. Biden offered the most hopeful assessment of the hostage talks by any major figure in many days, suggesting that the war might be close to a major turning point.

“I hope by the end of the weekend,” he said when asked by reporters when he expected a cease-fire to begin. “My national security adviser tells me that we’re close. We’re close. We’re not done yet. My hope is by next Monday, we’ll have a cease-fire.”

The president delivered the comments spontaneously in response to questions during a visit to an ice cream shop after taping a segment on Seth Meyers’s late-night talk show. They came amid an active period of talks in the region, as Israel’s war cabinet over the weekend approved the broad terms of a deal that would involve a six-week truce for the release of about 40 hostages. An Israeli delegation is expected to meet in Qatar with intermediaries from the United States, Egypt and Qatar.

An agreement for a lengthy cease-fire timed to start with the beginning of the Muslim holy month of Ramadan next week would halt the Israeli bombardment in the Gaza Strip, which has killed many thousands of Palestinians and created a humanitarian crisis. It could also provide an opening for a surge in humanitarian assistance into Gaza, where food, water, electricity and other basics are in short supply.

A negotiated deal would be a dramatic, and perhaps defining, moment in the nearly five-month-old Middle East conflict and could lead to the release of the six remaining American hostages, who were among more than 200 seized and taken to Gaza when Hamas attacked Israel on Oct. 7. About 1,200 people were killed in Israel.