President Biden on Wednesday said the U.S. has secured safe passage for wounded Palestinians and for foreign nationals to exit Gaza for Egypt. 

"We expect American citizens to exit today, and we expect to see more depart over the coming days," Biden wrote in a post on X. "We won't let up working to get Americans out of Gaza." 

State Department spokesperson Matthew Miller later said during a press briefing that there are "around 400 Americans in Gaza with whom we are in communication, who have expressed a desire to leave" and that there are "a number of American citizens who have crossed through Rafah and are in Egypt today."

Egypt, Israel and Hamas earlier came to an agreement allowing limited evacuations out of Gaza and into Egypt through the Rafah crossing after Qatar mediated talks.  

LIVE UPDATES: ISRAEL AT WAR WITH HAMAS 

Ambulance at Rafah border crossing

Ambulances carrying Palestinians, injured in ongoing Israeli airstrikes in Gaza, arrive at the Rafah border crossing near Egypt on Wednesday. (Ashraf Amra/Anadolu via Getty Images)

The deal allows for foreign passport holders and some critically injured Gaza residents to evacuate, though no timeline has been set for how long the crossing will remain open, a source briefed on the deal told Reuters. 

Dozens of foreign passport holders reportedly could be seen entering the crossing Wednesday morning in evidence of the deal. 

The negotiations came as the Israeli military has been carrying out the second stage of its war against Hamas. The Israel Defense Forces have greatly expanded ground operations in Gaza, clearing Hamas terrorists out of their fortified positions and tunnels. 

Military officials have warned that the campaign will be a long and difficult affair. So far, at least 16 Israeli soldiers have been killed in the fighting. 

IRAN’S LEADER SAYS COUNTRIES SHOULD ‘BLOCK THE FLOW OF OIL AND FOOD’ TO ISRAEL 

People wait to leave Gaza Strip for Israel

People gather in the waiting area at the Rafah border crossing in the southern Gaza Strip before crossing into Egypt on Wednesday. (Majdi Fathi/NurPhoto via Getty Images)

Biden’s announcement comes about a day after National Security Council spokesperson John Kirby accused Hamas terrorists of "putting up obstacles" to prevent Americans from leaving Gaza. 

"Why have Americans and foreign nationals still been unable to get out of Gaza, even though aid trucks have been going in?" a reporter asked Kirby during Tuesday's White House press briefing. "Beyond putting blame on Hamas, what more can you say about what's going on here and what the progress is?" 

Gaza Strip airstrike damage

Palestinians wander among debris of buildings that were targeted by Israeli airstrikes in the Jabalia refugee camp in the northern Gaza Strip on Wednesday. (AP/Abed Khaled)

CLICK HERE TO GET THE FOX NEWS APP 

"I mean, they are putting obstacles up to allow us to get folks out," Kirby said. 

Fox News’ Anders Hagstrom and Andrea Vacchiano contributed to this report.