CAIRO -- Israeli troops seized control of Gaza’s vital Rafah border crossing on Tuesday in what the White House described as a limited operation, as fears mount of a full-scale invasion of the southern city as talks with Hamas over a ceasefire and hostage release remain on a knife's edge.

The UN warned of a potential collapse of the flow of aid to Palestinians from the closure of Rafah and the other main crossing into Gaza, Kerem Shalom, at a time when officials say northern Gaza is experiencing “full-blown famine.”

The Israeli foray overnight came after hours of whiplash in the now seven-month-old Israel-Hamas war, with the militant group saying Monday it accepted a ceasefire proposal that Israel insisted fell short of its own core demands.

The high-stakes diplomatic moves and military brinkmanship left a glimmer of hope alive — if only barely — for a deal to bring at least a pause in the war, which has killed more than 34,700 Palestinians, according to local health officials, and has devastated the Gaza Strip.

The Rafah and Kerem Shalom crossings are critical entry points for food, medicine and other supplies for Gaza’s 2.3 million people. They have been closed for at least the past two days, though the smaller Erez crossing between Israel and northern Gaza continues to operate.

By capturing the Rafah crossing, Israel gained full control over the entry and exit of people and goods for the first time since it withdrew soldiers and settlers from Gaza in 2005, though it has long maintained a blockade of the coastal enclave in cooperation with Egypt.

Israeli Prime Minister Benjamin Netanyahu called the capture of the crossing an “important step” toward dismantling Hamas' military and governing capabilities, and Defense Minister Yoav Gallant said Israel would “deepen” the Rafah operation if the talks on the hostage deal failed.

Osama Hamdan, a Hamas official based in Beirut, said the militant group would not respond to military pressure or threats and would not accept any “occupying force” at the Rafah crossing.

White House National Security Council spokesman John Kirby said the operation along the Gaza-Egypt border in eastern Rafah was not a full-on invasion of the city that President Joe Biden has repeatedly warned against on humanitarian grounds. He said Israel had described it as “an operation of limited scale and duration” aimed at cutting off Hamas arms smuggling.

Kirby also expressed optimism about the negotiations, saying Israel and Hamas “should be able to close the remaining gaps” to complete an agreement, without offering a timetable. He said CIA chief William Burns will attend further talks in Cairo with representatives from Israel, Egypt and Qatar. Hamas also sent a delegation to Cairo, which will meet separately with the Arab mediators.

“Everybody is coming to the table,” Kirby said.

Fighting forced the evacuation of the Abu Youssef al-Najjar Hospital, one of the main medical centers receiving people wounded in airstrikes on Rafah in recent weeks. It was not immediately clear how many patients had been moved to other facilities.

The looming operation threatens to widen a rift between Israel and its main backer, the United States, which says it is concerned over the fate of around 1.3 million Palestinians crammed into Rafah, most of whom fled fighting elsewhere.

Biden warned Netanyahu again Monday against launching an invasion of the city after Israel ordered 100,000 Palestinians to evacuate from parts of Rafah. But Netanyahu's far-right coalition partners have threatened to bring down his government if he calls off the offensive or makes too many concessions in ceasefire talks.

Palestinians' cheers of joy over Hamas' acceptance of the ceasefire deal turned to fear Tuesday. Families fled Rafah's eastern neighborhoods on foot or in vehicles and donkey carts piled with mattresses and supplies. Children watched as parents disassembled tents in the sprawling camps that have filled Rafah for months to move to their next destination — which for many remained uncertain.

“Netanyahu only cares about coming out on top. He doesn't care about children. I don't think he'll agree” to a deal, said Najwa al-Saksuk as her family packed up while Israeli strikes rang out amid plumes of black smoke.

Families of the hostages also saw their hope turn to despair. Rotem Cooper, whose 85-year-old father, Amiram, was among scores abducted during Hamas' Oct. 7 attack, slammed what he said was the government’s inaction on a deal.

“We see all sorts of explanations — this isn’t the deal that we gave them, Hamas changed it without saying something,” Cooper said at a parliamentary hearing Tuesday. He questioned whether military pressure was an effective bargaining tactic.

Israel's 401st Brigade took “operational control” of the Gaza side of the Rafah crossing early Tuesday, the military said. Military footage showed Israeli flags flying from tanks in the area. It also said troops and airstrikes targeted suspected Hamas positions in Rafah.

Rafah, Gaza Strip

The military claimed it had intelligence the crossing was “being used for terrorist purposes,” though it did not immediately provide evidence. It said Hamas fighters near the crossing launched a mortar attack that killed four Israeli troops near Kerem Shalom on Sunday and that more mortars and rockets were fired from the area Tuesday.

Israeli authorities denied the UN humanitarian affairs office access to the Rafah crossing Tuesday, said its spokesman, Jens Laerke, warning the disruption could break the fragile aid operation. All fuel for aid trucks and generators comes through Rafah, and Laerke said there was a “very, very short buffer of about one day of fuel."

Israeli strikes and bombardment across Rafah overnight killed at least 23 Palestinians, including at least six women and five children, according to hospital records.

Mohamed Abu Amra said his wife, two brothers, sister and niece were killed when a strike flattened their home as they slept. “We did nothing. ... We don’t have Hamas,” he said.

Egypt’s Foreign Ministry condemned the seizure of the crossing, calling it “a dangerous escalation.”

It has previously warned that any seizure of Rafah — which is supposed to be part of a demilitarized border zone — or an attack that forces Palestinians to flee into Egypt would threaten the 1979 peace treaty with Israel that’s been a linchpin for regional security.

Netanyahu has said an offensive to take Rafah — which Israel says is Hamas' last major stronghold in Gaza — is crucial to destroying Hamas after its Oct. 7 attack on southern Israel that triggered the war. Hamas and other militants killed some 1,200 people, mostly civilians, and took around 250 hostages.

The United States, Egypt and Qatar have spent months trying to broker an agreement on a ceasefire and the release of the estimated 100 hostages and remains of 30 others still held by Hamas, which insists it will not release them unless Israel ends the war and withdraws from Gaza.

Israeli forces seize Rafah

Netanyahu and other top officials have publicly rejected those demands, saying they plan to resume the offensive after any hostage release and continue it until Hamas is destroyed. For now, the hostages serve as Hamas' strongest bargaining chip and potential human shields for its leaders.

An Egyptian official and a Western diplomat said the draft Hamas accepted had only minor changes in wording from a version the U.S. had earlier pushed for with Israeli approval. The changes were made in consultation with the CIA chief, who embraced the draft before sending it to Hamas, they said, speaking on condition of anonymity to discuss the deliberations.

According to a copy released by Hamas, the proposal outlines a phased release of the hostages alongside gradual withdrawal of Israeli troops from the entire enclave and ending with a “sustainable calm,” defined as a “permanent cessation of military and hostile operations.”

Lidman reported from Jerusalem. Associated Press journalists Aamer Madhani in Washington, Ashraf Sweilam in el-Arish, Egypt, and Abby Sewell in Beirut contributed to this report.