A disparate group of American veterans, military contractors, aid workers and former spies is scrambling to get as many people out of Afghanistan as they can before President Biden shuts the window for rescues in coming days.

Even as tens of thousands of Afghans who helped the U.S. and a large number of American and other foreign citizens remain stranded, Mr. Biden is sticking by his plan to withdraw the remaining military forces from Kabul’s U.S.-controlled airport by Aug. 31.

Erik Prince, the American defense contractor, said he was offering people seats on a chartered plane out of Kabul for $6,500 per person. U.S. and NATO forces are sending special rescue teams into Taliban-controlled areas of the city to spirit their citizens into the airport. And countless Afghans who thought the U.S. would protect them after having assisted the U.S.-led coalition forces in the past two decades are now realizing they will most likely be left behind.

Aid organizations have been told by Western governments that evacuation flights won’t continue past Friday, as the U.S. military will need the days remaining until the Aug. 31 deadline to remove its own equipment and troops from Kabul.

Private rescue efforts are facing growing obstacles this week, just as the urgency grows. Chartered planes are flying out of Kabul with hundreds of empty seats. New Taliban checkpoints on the road to Pakistan have made driving out of the country increasingly risky. Bureaucratic hurdles have prevented many from leaving Afghanistan.

The U.S. and its allies have evacuated more than 70,000 people since the Taliban closed in on Kabul on Aug. 14.

Photo: Xinhua/Zuma Press

In Washington on Wednesday, White House press secretary Jen Psaki denounced Mr. Prince when asked about The Wall Street Journal article.

“I don’t think any human being who has a heart and soul would support efforts to profit off people’s agony and pain if they’re trying to depart a country and fearing for their lives,” she said.

A U.S. military official said the situation at the airport gates was challenging and that American forces were doing their best to allow people through when they were cleared. But charter-flight organizers said the process was broken and that it was proving to be impossible to get people into the airport in time to get on their flights.

“It’s total chaos,” said Warren Binford, a law professor at the University of Colorado who has been working on evacuation efforts. “What’s happening is that we’re seeing a massive underground railroad operation where, instead of running for decades, it’s literally running for a matter of hours, or days.”

Mr. Biden’s decision to rebuff requests from other Western allies to extend the Aug. 31 deadline means that private efforts by everyone from Mr. Prince to former Secretary of State Hillary Clinton have little time left for last-minute rescue missions. The president said Tuesday that he had instructed the Pentagon and the State Department to develop contingency plans in the event the timeline for leaving Afghanistan must be adjusted.

The U.S. and its allies have evacuated more than 88,000 people since the Taliban closed in on Kabul on Aug. 14. In the final days, the focus is shifting to pulling out the remaining Westerners rather than vulnerable Afghans.

“There is no way with the numbers of people on the ground that we will be able to get everybody out by Aug. 31,” said Alex Plitsas, a U.S. Army combat veteran working on rescue operations in Afghanistan.

Private rescue efforts have been ad hoc, scattershot and, at times, divisive. Mr. Prince, whose Blackwater guards were convicted of killing civilians in 2014 while providing security for Americans during the Iraq war, said he was charging each passenger $6,500 to get them safely into the airport and on a plane, and it would cost extra to get people who have been trapped in their homes to the airport. It remained unclear whether Mr. Prince had the wherewithal to carry out his plans.

Most of the evacuation efforts, however, are driven by genuine empathy for Afghan friends and colleagues who anticipate facing Taliban retribution. The biggest challenge the groups faced was getting people with seats on the charter planes through the Taliban checkpoints, crushing crowds at the airport entrances and U.S. forces who refuse to let manifested passengers in.

“It’s a combination of tragic, surreal and apocalyptic,” said Stacia George, director of the Carter Center’s Conflict Resolution Program, who has been working round-the-clock to get people out of Kabul. “It’s so frustrating to get high-risk people up to the gate and have them risking their lives to go there and you still can’t get them through. It’s a disaster in slow and fast motion.”

A member of the Taliban stands guard outside the office of the group's spokesman Zabiullah Mujahid, in Kabul, on Wednesday.

Photo: akhter gulfam/EPA/Shutterstock

Last week, Sayara International, a Washington-based development firm that has long worked in Afghanistan, lined up plans to take 1,000 Afghan refugees to Uganda, whose government has offered sanctuary. Sayara chartered three planes for the operation, said George Abi-Habib, one of the company’s co-founders. Then it ran into a series of obstacles. Marines at the airport gates refused to allow Afghans with seats on the plane to get inside. At one point, Sayara asked partners to help fill an urgent cash shortfall it needed to plug before they could fly, but shelved the idea as the effort foundered, said Scott Shadian, the CEO of Sayara. One Ugandan woman had to crawl through a sewage pipe to get into the airport, Mr. Abi-Habib said.

On Tuesday night, after trying unsuccessfully for days to resolve the issues, the 345-seat plane flew out of Kabul with 50 passengers. “We can’t expect everyone to crawl through a sewer pipe to safety,” said Mr. Abi-Habib. “The window is closing.”

The same thing happened on Sunday to a charter flight heading for Ukraine. Activists brought 40 vulnerable Afghan women to the chaotic airport gates where they carried balloons that said “Ukraine” on them so they could be easily identified. But U.S. soldiers wouldn’t let them through, Ms. George said. The flight, which had been waiting for two days to try to get the women on board, took off without them. In all, said Ms. George, 70 of the 240 seats were empty.

Private rescue efforts have a rapidly narrowing window left to pull off last-minute missions to evacuate people from Afghanistan.

Photo: aamaj news agency/Reuters

Successes have been harder to come by. No One Left Behind, a nonprofit set up to help Afghans who worked with the U.S. government, expects to get 5,000 Afghans out of the country by Thursday, said Doug Livermore, a board member with the group. The School of Leadership, Afghanistan has managed to fly 250 students, staff and faculty to Rwanda in a special operation that allowed the private school to relocate.

One private company flew the president of the American University of Afghanistan, along with his dog and other U.S. citizens, to Switzerland. Georgetown University, Johns Hopkins University and the Truman National Security Project have helped to get hundreds of people out of Kabul in recent days, according to people working on the rescue missions. The Clinton Foundation has been working to get scores of people out of Afghanistan.

Some advocates dubbed the effort the Digital Dunkirk, a reference to the World War II rescue mission by hundreds of private boats that saved more than 330,000 allied forces trapped on a French beach by Nazi forces.

“It’s the most American story we’ve seen in a long time,” said Navy veteran Shawn VanDiver, who has been working to get Afghans safely out of the country. “A bright glimmer of hope in this dark history.”

Write to Dion Nissenbaum at dion.nissenbaum@wsj.com