HONG KONG — In August 2021, when U.S.-led forces were withdrawing from Afghanistan and evacuation flights were being overwhelmed by people desperate to leave with them, Mahbouba Seraj decided to stay.

Seraj, 75, an Afghan-American women’s rights activist and founder of the nonprofit Afghan Women’s Network, had been in Afghanistan since 2003, when she moved back with a mission to help the country’s women and girls. More than 25 years earlier, Seraj — the niece of the country’s former king — had been forced into exile by Afghanistan’s Communist government, settling in the United States.

But in 2021, that government was being toppled, leaving the Taliban poised to take over once again and Afghan women facing an uncertain future.

“I knew that they are going to be needing some kind of support, at least something from the past that remained, so that will give them the feeling that, okay, things have not gone to hell completely,” Seraj told NBC News in an interview in Hong Kong in November.

Since the Taliban returned to power in August 2021, the fighters and clerics espousing an extremely conservative version of Islam have arrested women’s rights activists, ended education for women after sixth grade, barred women from gyms and parks, ordered the closure of beauty salons, and prohibited women from working at nongovernmental organizations.

They have also shut down most shelters for victims of domestic abuse, with Seraj’s among the few remaining.

The Taliban government has been largely ostracized internationally, but with its control firmly established, the United Nations Security Council is considering how to engage with it politically and perhaps reintegrate it into the global system. Some, including Seraj, see this as an opportunity to pressure the Taliban into restoring some rights to women in exchange for diplomatic recognition.

Afghanistan’s Taliban government on August 15, marked the second anniversary of their return to power, with supporters celebrating as critics denounced ever-tightening restrictions on women’s rights.

Others, such as Nobel Peace laureate Malala Yousafzai, say the Taliban cannot be trusted or given any kind of legitimacy and governments should continue to shun them.

An independent assessment of potential engagement that was submitted to the Security Council in November said the basic rights of women and girls “are not only fundamental obligations of a state, but also critical to build state capacity for long-term development and economic growth and peace and security,” according to Reuters.

In its response to the assessment, Reuters reported, the Taliban said it was obligated to consider Afghanistan’s “religious values and national interests” and that no one would be allowed to interfere in the country’s internal affairs.

The Taliban also defended their record on women, saying they respected women’s rights in line with their interpretation of Islamic law.

Seraj argues that the best way forward with the Taliban “is to talk, and come up with some kind of an agreement.”

“Every single day that it goes on with the Taliban not being recognized, it’s not that the Taliban are being pushed in a corner, it’s the people of Afghanistan that are being denied their rights everywhere — in the United Nations, in the world, in the conferences and the meetings,” she said.

Though the Taliban are struggling to transition from waging war to running a country, Seraj said, trying to install a new, more palatable government would only bring more chaos.

“If we keep on changing government, after government, after government, we cannot afford that,” she said.

That doesn’t mean consigning Afghanistan’s 20 million women to second-class citizenship, Seraj said, arguing that the world cannot move to accept the Taliban unless they engage in parallel, step-by-step reforms.

“They have to recognize [women’s rights] first for the world to recognize them, but it has to happen,” she said. “So in order for that to happen, they have to have a talk.”

There is no time to waste, she added.

The head of a major aid organization said Thursday, May 25, that the Taliban have agreed to consider allowing Afghan women to resume work at the agency in the southern province of Kandahar, the religious and political center for the country’s rulers.

“The boys [who] are growing up in this era, you will not be able to tell them that they have to respect a woman later,” Seraj said. “They won’t. Even right now they are not.”

Boys, too, are facing an education crisis under Taliban rule, Human Rights Watch said in a report on Dec. 6. With women barred from teaching boys, the group found, they are often replaced by unqualified male teachers or not replaced at all.

Afghanistan’s problems have been compounded this fall by the arrival of hundreds of thousands of Afghans from neighboring Pakistan, which said in October it would arrest and deport any foreign nationals living in the country without documentation. Though the Pakistani government says it is not targeting any particular nationality, most of those affected are from Afghanistan.

The crackdown has created a humanitarian crisis as Afghans who fled Soviet occupation in the 1980s or Taliban rule after that stream into a country that some have never lived in and that is struggling to take them in.

“They’re not kicking out people who have been there [in Pakistan] for five years and six years, they’re kicking out people that were there for 40 years,” Seraj said.

The International Organization for Migration, a U.N. agency, said in late November that about 375,000 Afghans had left Pakistan in the last two months, many of them forced to leave behind their savings and possessions.

Many of those returning, including women and children, “could lose their lives in a harsh winter if left without adequate shelter,” the U.N. refugee agency said in December.

An additional 345,000 Afghan refugees have been deported from neighboring Iran since late September, the Afghan news channel TOLOnews reported in December, citing the Iranian Ministry of Refugees and Repatriation.

Afghanistan is also still dealing with the aftermath of a series of 6.3-magnitude earthquakes that hit the northwestern province of Herat in early October. U.N. officials said the vast majority of the people killed were women and children, most of whom were at home while their male relatives were working outside.

Though the Taliban regime has not been formally recognized by any foreign government, in September neighboring China became the first country to name a new ambassador to Afghanistan, and in December the Taliban said they had appointed an ambassador to China, their first to any country.

The Taliban are also joining Chinese President Xi Jinping’s signature Belt and Road infrastructure initiative.

The Chinese Foreign Ministry said Dec. 5 that while Afghanistan “should not be excluded from the international community,” the Taliban government must engage in political reform before it can receive diplomatic recognition.

“We believe that diplomatic recognition of the Afghan government will come naturally as the concerns of various parties are effectively addressed,” ministry spokesperson Wang Wenbin said at a regular news briefing in Beijing.

China’s role in Afghanistan “could be very beneficial,” Seraj said, as long as any deals between the two countries are made in the interest of the Afghan people.

“If the interest of the people of Afghanistan is taken into consideration, then China is a fantastic resource. Why not?” she said. “They are interested in what we have, they are our neighbor, we can work with them. I don’t see any problem.”

Though she worries about her safety and sometimes gets discouraged, Seraj said she has no plans to leave Afghanistan.

“My responsibility towards the women in my shelter is huge,” she said. “I love those girls. I cannot just leave them and go somewhere and do something else.”

Seraj said she wants Afghanistan to stay in the global spotlight, but not as a “disaster.”

Rather, she said, she hopes it will one day be seen “as a country with possibilities, as a country that can go on and can be alive, and maybe one day can thrive.”

Jennifer Jett is Asia digital editor for NBC News, based in Hong Kong.