At least three people were killed by gunfire Monday morning at the passenger terminal of Kabul’s international airport, where thousands of Afghans who fear for their lives after the Taliban takeover of the country have converged in hopes of getting an evacuation flight.

Witnesses reported seeing the prone, bloodied bodies lying on the ground just outside the terminal building. Officials at the U.S. Central Command weren’t immediately available for comment.

The U.S. military has taken over security of the Kabul airport to execute the massive airlift of foreign diplomats and citizens after the Afghan government collapsed on Sunday. Those evacuation flights are processed on the separate, military, side of the airport.

The U.S. military extended its footprint to the civilian terminal, where thousands of desperate Afghans—many of whom used to work for American forces—continued to flock as the victorious Taliban combed Kabul for those who had collaborated with the West.

U.S. Marines fired warning shots late on Sunday when hundreds of Afghans who breached the perimeter rushed to board an idling C-17 transport aircraft, a Western military official said.

According to people trapped in the airport, American troops also repeatedly shot in the air to disperse the crowds during the night. Hundreds of Afghan civilians were seen close to the runway and around parked planes on Monday morning, with some hanging from boarding ramps as they scrambled to get into the aircraft.

The Taliban entered Kabul on Sunday, having conquered the rest of the country in recent weeks. The airport is the only place where the Afghan republic’s flag still flies, but the Taliban are deployed just a short distance away.

Afghan security forces and other Afghan workers at the airport abandoned their posts Sunday. Left without food or water, people sheltering in the terminal—many without passports or bookings—helped themselves to the contents of coffee shops there.

All civilian flights have been canceled, and so their only hope is to get on flights chartered by foreign governments and private companies and organizations.

There are roughly 6,000 American troops in the Kabul airport or headed there, U.S. military officials said Sunday. More remain on standby in Kuwait.

Write to Saeed Shah at saeed.shah@wsj.com and Yaroslav Trofimov at yaroslav.trofimov@wsj.com