KABUL, Afghanistan — (TNS) Anti-Taliban protesters defied their new rulers for the second day Thursday, marking Afghan Independence Day by attempting to hoist the red, green and black national banner but often getting beaten down by militant fighters who continue to control the streets of the capital and elsewhere.

The jarring, violent scenes marked the latest unrest as the Taliban sought to gain a firmer grip on a nation that has changed much since it first ruled two decades ago. That was proving increasingly difficult, even as the militant group sought to compare Afghanistan’s independence from Britain in 1919 to the insurgents’ swift takeover of the country today from an American-backed government.

The Taliban said in a statement that its “jihadi resistance forced another arrogant power of the world, the United States, to fail and retreat from our holy territory of Afghanistan.”

But anger against the group was rising, and governing was proving perilous.

A gridlock crush at the international airport in Kabul, meanwhile, surged again, with desperate Afghans and others attempting to escape the country. In Washington, the Pentagon said that since July it had flown 12,000 people out of the airport, including U.S. diplomats, Afghans eligible for special visas because of their work on behalf of the U.S. military and diplomatic missions, and others.

Only about 2,000 were airlifted out of Kabul in a dozen military flights in the last 24 hours, State Department spokesman Ned Price said in a Thursday briefing. Another 6,000 evacuees were processed and awaiting departure at the Kabul airport Thursday evening.

Still, the numbers fell far short of the up to 9,000 people a day that the Pentagon says it has the capacity to evacuate. The shortfall highlights both the slow bureaucratic process to finish paperwork for Afghans needing to leave and the terrifying difficulty many Americans and others are confronting as they attempt to make their way to the airport for evacuation flights.

Price repeatedly attempted to turn aside persistent questions from reporters citing numerous accounts of Americans and especially Afghans unable to maneuver the gantlet of Taliban checkpoints to reach the airport.

He said all U.S. citizens who have “expressed interest in leaving” Afghanistan were contacted by U.S. diplomatic officials overnight and told to proceed to the airport — even though the U.S. government has said it cannot guarantee safe passage. Price would not give a number of how many people were involved. The administration says it reached a “safe passage” agreement with the Taliban, but it seems to work only spottily.

“The U.S. military is undertaking a gargantuan airlift operation right now,” Price said. But he acknowledged, as Defense Secretary Lloyd J. Austin III said this week, that the estimated 5,000 U.S. forces at the Kabul airport do not have the equipment or troop numbers to venture outside of the airport and into the city to retrieve Americans or Afghans eligible to leave.

There are reports that British special forces have launched such rescue missions.

Though it has yet to formally appoint its government, the Taliban is about to confront many of the difficulties of actually governing, with shortages of cash and supplies. Other countries and world institutions, such as the International Monetary Fund, have warned they would withhold the much-needed foreign aid that has sustain much of Afghanistan’s economy for years.

The Taliban has offered contradicting portrayals of its intentions, claiming to be more moderate than it was during its brutal rule in the 1990s, but also saying it will abide by Shariah law. The Taliban interpretation of Shariah is among the most draconian in the world.

A U.N. official also warned of dire food shortages in this nation of 38 million people reliant on imports. “A humanitarian crisis of incredible proportions is unfolding before our eyes,” Mary Ellen McGroarty, the head of the World Food Program in Afghanistan, warned in a statement. Drought, she said, has destroyed more than 40% of the country’s crops lost. And many people fleeing the Taliban are living in open spaces in the capital.

“This is really Afghanistan’s hour of greatest need, and we urge the international community to stand by the Afghan people at this time,” she said.

With such pressures, the Taliban leadership also appeared keen to quell dissent. Many fear the Taliban will succeed in erasing two decades of efforts to expand women’s and human rights in Afghanistan and build democratic institutions. Pockets of resistance were emerging across the country, and in Kabul this was most evident in the independence day flag-raising ceremonies.

At one traffic circle in central Kabul, a group of Afghans was raising the traditional Afghan flag to replace the white Taliban banner. A group of Taliban fighters approached and pointed their guns at the group.

Los Angeles Times photographer Marcus Yam was attempting to photograph the scene when a Taliban fighter emerged out of nowhere and punched him on the side of the head. The fighter continued to beat Yam and another photographer working for a major U.S. newspaper and then to demand they erase the images they had shot.

Yam said at one point he was on his knees urging the armed fighter not to hurt him. After the beatings stopped, Yam and the other photographer were held for some 20 minutes until an English-speaking militant came along and asked the men who they worked for. This militant then attempted to defuse the situation, aware that attacking Western media was not in keeping with the image that the Taliban leadership is trying to project. He offered the photographers an energy drink and released them.

In Khost province, Taliban authorities instituted a 24-hour curfew Thursday after violently breaking up another protest, according to information obtained by journalists monitoring from abroad and reported by The Associated Press. The militants did not immediately acknowledge the demonstration or the curfew.

Protesters also took to the streets in Kunar province, according to witnesses and social media videos that lined up with reporting by The Associated Press.

At a rally Wednesday in the eastern city of Jalalabad, demonstrators lowered the Taliban flag and replaced it with Afghanistan’s tricolor. At least one person was killed.

“I predict that we will start seeing all kinds of resistance, some of it will be peaceful, some of it will be violent,” Candace Rondeaux, former adviser to the U.S. Special Inspector General for Afghanistan Reconstruction, a government watchdog agency, said in a teleconference Thursday sponsored by the New America think tank.

In Kabul, artist Basira Shahnawaz, 25, was watching the protests Thursday. “People protest that they do not accept the Taliban,” she said via WhatsApp. “In the streets, they raise the Afghan flag and chant slogans.”

Shahnawaz was hiding at her home, which is filled with paintings and sculptures, amid reports that Taliban militants are conducting door-to-door searches. As soon as the fighters enter, they will know she’s an artist and likely target her, she said.

“They kill artists,” she said, recalling the past rule of the Taliban, but, “I have no choice.”

President Joe Biden said he was committed to keeping U.S. troops in Afghanistan until every American is evacuated, even if that means maintaining a military presence there beyond his Aug. 31 deadline for withdrawal. In an interview with ABC’s “Good Morning America” that aired Thursday, Biden said he didn’t believe the Taliban had changed.

“I think they’re going through sort of an existential crisis about ‘do they want to be recognized by the international community as being a legitimate government,’” Biden said. “I’m not sure they do.”

(By Marcus Yam and Tracy Wilkinson, Los Angeles Times via Tribune News Service. Yam reported from Kabul and Wilkinson from Washington. Times staff writer Molly Hennessy-Fiske in Houston contributed to this report.)