A U.S. military drone strike blew up a vehicle laden with explosives in Kabul on Sunday, a Defense Department official said, as the immense effort to airlift U.S. citizens and Afghan allies fleeing the Taliban neared its conclusion.

a house covered in snow: Damage from what was reportedly a U.S. drone strike on a vehicle carrying explosives at a house in Kabul on Sunday.© EPA, via Shutterstock Damage from what was reportedly a U.S. drone strike on a vehicle carrying explosives at a house in Kabul on Sunday.a group of people standing in front of a building: A bank in Kabul on Sunday. Some lenders opened in the capital on Sunday, and long lines formed outside their doors.© Jim Huylebroek for The New York Times A bank in Kabul on Sunday. Some lenders opened in the capital on Sunday, and long lines formed outside their doors.

Afghans said the drone strike killed as many as nine civilians, including children, and the U.S. military said it was investigating.

The strike came during a precarious final chapter of America’s 20-year war in Afghanistan, with just two days remaining before President Biden’s Tuesday deadline to complete the withdrawal.

Sign up for The Morning newsletter from The New York Times

The strike thwarted an imminent threat to Hamid Karzai International Airport from the Islamic State Khorasan, a spokesman for the U.S. Central Command said.

Defense officials in a statement Sunday evening acknowledged the possibilities that civilians may have been killed after the strike.

“We are aware of reports of civilian casualties following our strike on a vehicle in Kabul today,” Capt. Bill Urban, the CentCom spokesman, said. “We are still assessing the results of this strike, which we know disrupted an imminent ISIS-K threat to the airport. We know that there were substantial and powerful subsequent explosions resulting from the destruction of the vehicle, indicating a large amount of explosive material inside that may have caused additional casualties. It is unclear what may have happened, and we are investigating further.”

He added: “We would be deeply saddened by any potential loss of innocent life.”

The chief Taliban spokesman and people in Kabul who posted on social media said that both a house and a vehicle had been hit in a neighborhood just west of the airport and that several civilians had been killed, as well.

Samim Shahyad, a 25-year-old journalism student, said the strike killed his father, his two brothers, four of his young cousins, his niece and his sister’s fiancé. Three of the dead were girls 2 years old or younger, he said, and his aunt and uncle lost all three of their children.

“The American aircraft targeted us,” he said. “I do not know what to say, they just cut my arms and broke my back, I cannot say anything more.”

A doctor at a nearby hospital said four bodies were taken there, two of them those of children.

A senior U.S. military official responded that the military was confident that no civilians had been in the targeted vehicle but acknowledged that the detonation of the explosives in it could have caused “collateral damage.”

Video of the scene showed a tangle of metal barely recognizable as the remains of a vehicle, and just a few feet away, the charred, pockmarked wreck of another vehicle, an S.U.V. Mr. Shahyad said his father had been pulling into their garage when the explosion hit.

Earlier Sunday, the U.S. Embassy in Kabul had said that there was a “specific, credible threat” to the airport area, where a suicide bombing on Thursday killed as many as 170 civilians and 13 members of the American military. The Islamic State Khorasan claimed responsibility for the attack. Mr. Biden had warned on Saturday that another attack was “highly likely” in the coming hours.

With Mr. Biden’s Tuesday deadline looming, the military was shifting its focus from vetting and airlifting Afghan and American civilians to bringing its own personnel home. And the impending exit created anguishing questions about who would be left behind.

Hundreds of students and alumni from American University of Afghanistan, among the country’s most outspoken advocates for human rights, were turned away at the Kabul airport on Sunday, leaving them with the choice of fleeing overland or remaining in the country to face possible persecution.

At the airport on Sunday night, armed Taliban members in commando uniforms stood outside South Gate. Minibuses were parked nearby, where Afghans paid to shelter while they waited in hopes of making it into the airport.

One man, Hamid, had been waiting inside one of the minibuses for six nights.

“They let Europeans and Americans into the airport and they keep us, the Afghans, waiting outside the gate while we hold a valid ticket and documents,” he said. But he was not giving up. “I still have hope that they will open the gate again and we can make it in,” he said.

As many as 250 Americans remain in Afghanistan who are seeking to leave the country, while some 280 Americans are undecided about leaving or intend to stay, the State Department said on Sunday.

For Americans who choose to stay past Tuesday, the administration plans to ensure there is a “mechanism to get them out of the country should they choose in the future to come home,” Jake Sullivan, Mr. Biden’s national security adviser, said on “Fox News Sunday.”

“The Taliban have made commitments to us in that regard,” he said. “We intend to hold them to those commitments, and we have leverage to hold them to those commitments.”

The American troop departures will mark the tumultuous end to a war that has left the country awash in grief and desperation, with many Afghans fearing for their lives under Taliban rule and struggling to support their families amid cash shortages and rising food prices. At least some banks had opened in Kabul on Sunday, and long lines had formed outside their doors.

The attack at the airport on Thursday, which happened as U.S. troops were screening people hoping to enter, once again underscored the human toll of the war — both for Afghans, the overwhelming majority of the victims, and for the American families who lost loved ones sent to fight it.

The 13 American military personnel who were killed came from across the country, from California to Wyoming to Tennessee, and had an average age of just over 22. Eleven were Marines, one was a Navy medic and another was in the Army.

Mr. Biden and the first lady, Jill Biden, traveled to Dover Air Force Base in Delaware on Sunday to witness the transfer of their remains.

Jim Huylebroek contributed reporting.

If you or someone you know is considering suicide, please contact the National Suicide Prevention Lifeline at 1800-273-TALK (8255), text "help" to the Crisis Text Line at 741-741 or go to suicidepreventionlifeline.org.