People enter the Rafah border crossing in the southern Gaza Strip before crossing into Egypt on November 1, 2023. Scores of foreign passport holders trapped in Gaza started leaving the war-torn Palestinian territory on November 1 when the Rafah crossing to Egypt was opened up for the first time since the October 7 Hamas attacks on Israel, according to AFP correspondents. (Photo by Mohammed ABED / AFP) (Photo by MOHAMMED ABED/AFP via Getty Images)
CNN  — 

The breakthrough that allowed an initial group of foreign nationals, including US citizens, to depart Gaza on Wednesday came together after weeks of intensive, multi-party diplomatic efforts, sources familiar with the negotiations told CNN.

The agreement to allow foreign passport holders and a group of critically injured civilians to depart through the Rafah border crossing was reached on Tuesday, prior to the Israeli forces’ bombing of Gaza’s largest refugee camp.

Qatar, which coordinated with the United States, was the key broker of the deal between Israel, Egypt, and Hamas, according to sources familiar with the talks.

The development was hailed as a critical first step in getting thousands of foreign nationals out of the war-torn strip as Israel intensifies its military operations there. Though US officials have stressed that the situation remains fluid, they have expressed optimism that hundreds more will be able to depart in the coming days.

The negotiations were consistently described as immensely complicated, and the breakthrough came after “intense and urgent American diplomacy with our partners in the region,” President Joe Biden said Wednesday.

Negotiators had to contend with Hamas’ control of the Gaza strip, Israel’s blockade and bombing, as well as Egyptian security concerns.

Leading up to Wednesday, there had been a number of moments where US officials thought they would be able to get the Americans out, and the State Department had advised Americans to consider making their way toward the crossing. Those ultimately fell through, leading to frustration, fear, and confusion for the hundreds of US citizens trapped in Gaza.

US officials, led by Ambassador David Satterfield, engaged in on-the-ground diplomacy in both Israel and Egypt, but relied on partner countries to communicate with Hamas.

“We’re dealing with Israel, Egypt, and Hamas, and we’re not talking directly to Hamas, Egypt can send messages to Hamas, Qatar can send messages to Hamas. But you can imagine how difficult every little thing is, every bit of this is complicated,” a State Department spokesperson said last week.

At the outset of the negotiations, Egyptian President Abdel Fattah el-Sisi insisted that humanitarian aid make its way into Gaza before Egypt would consider letting civilians depart. Egypt had also made clear they would not accept a flood of refugees.

Since Hamas’ attack on Israel on October 7, Egyptian officials have expressed serious concerns about a scenario where Palestinians in Gaza are permanently displaced to Egypt. That anxiety had been a major complicating factor, as negotiations in part centered around Hamas’ request to allow wounded Palestinians to leave Gaza, two sources familiar said.

Hamas insisted that wounded Palestinians be able to leave alongside foreign nationals. Notably, the group wanted some of its own fighters to be included in the group of injured allowed into Egypt – a demand that was rejected, a senior US official said.