Soon after, the Taliban arrived at the shelter in the city of Pul-e-Kumri.
They gave the women two options: Return to their abusive families _ some of whom had threatened them with death for leaving _ or go with the Taliban, recalled one of the women, Salima, who asked only that her first name be used.
Most of the women chose to return home, fearing the Taliban more than their families. Salima said she knew of at least one who was since killed, likely by an angry family member.
But Salima decided to leave with the Taliban. She didn't know what they would do, but she had nowhere else to go, having fled her abusive, drug-addicted husband months earlier. Now she finds herself housed in a prison _ but protected and safe, she says.
Whether under Taliban rule or not, women in Afghanistan's deeply conservative and often tribal society are often subject to archaic codes of behavior that hold them responsible for the honor of their families. They can be killed for simply marrying a man of their choice. They are often married at puberty. Fleeing even an abusive husband is considered shameful. Hundreds of women are jailed for so-called ``morality crimes,'' including adultery or running away from home, even though they are not officially crimes under the Afghan penal code.
Over the past two decades, activists set up dozens of women's shelters around Afghanistan. But even before the Taliban takeover, conservative Afghans, including government officials, viewed them with suspicion, as places that help women and girls defy their families or abet ``moral crimes.''
Women's shelters are just one of a myriad of social changes that became more prevalent in the past 20 years or didn't even exist when the Taliban last took power in 1996 _ everything from social media and the internet to businesswomen and women judges. Now since overrunning Kabul and sweeping into power on Aug. 15, the hard-line militant group is wrestling with how to deal with the changes, with the Taliban leadership at times uncertain and fighters on the ground acting on their own.
Salima was taken to Kabul, along with another woman, Razia, who had lived in the shelter nearly a year after fleeing a predatory brother-in-law.
With nowhere to put them, the Taliban put them in the abandoned women's section of Afghanistan's main prison, called Pul-e-Charkhi. The prison was empty because when the Taliban took over Kabul, they freed all the inmates, including thousands of men, 760 women and more than 100 children, according to the prison's new Taliban administrator, Mullah Abdullah Akhund.
The Associated Press was given rare access to the women in the prison. Now there are only six women there, including Salima and Razia.
A massive steel gate leads to the women's prison. Rolls of barbed wire are strung atop the 20-foot-high walls. Inside, the women move freely with their children. Salima's 5-year-old daughter Maria and son Mohammad, 6, spend most of their day in a main, large, carpeted room. There is no school and just a giant red teddy bear and a few small toys for their amusement.
``We mostly pray and read the Quran all day,'' said Salima.
Salima said that she has no idea what the future holds, but for the present, with no money and no family, she said she feels safe here.
But Mujdha, another woman in the prison, said she wants her freedom. She had been pregnant by a boyfriend but her family refused to let her marry him, and instead forced her to marry a relative. She ran away. ``I told them I would never stay with him'' she said. The family reported her to the Taliban, who arrested her and her boyfriend.
Mujdha gave birth in prison to a baby daughter 15 days ago, soon after her arrest. She hasn't seen her boyfriend, jailed elsewhere in the prison, and he has yet to meet his infant daughter.
``I want to leave, but they say I can't,'' she said.
Akhund said a court will decide whether to charge her, adding, ``It is wrong that she left her husband. She has no right.''
Since taking power, the Taliban's response to women's shelters has varied. In the western city of Herat, several have been shut down, said Suraya Pakzad, a women's rights activist from Herat who opened several shelters.
Pakzad said Friday in text messages from a place in hiding that she faces threats from all sides _ from the Taliban and from the families of the women who found refuge in her shelters.
For the past several years, Pakzad and other women pressed for a voice in the negotiations between the U.S.-backed government of the time and the advancing Taliban. They hoped to ensure rights for women in any final arrangement. Now, in one fell swoop, they are scrambling for their own safety.
Pakzad shared an arrest warrant for her and seven other activists and journalists from western Afghanistan, issued by the new Taliban police chief in Herat. The warrant accuses the eight of ``spreading propaganda against the Islamic Emirate'' and accuses Pakzad of ``involvement with Western countries to spread prostitution.''
But Mahboba Suraj, who runs a shelter for 30 women in Kabul, said the Taliban have come and investigated the shelter and let the women remain there unharmed. She said she was visited by various departments of the new Taliban government, including senior officials.
``The higher ups were absolutely the best. They want to protect us ... and understand that they have problems within their own people'' who may not be as supportive of women's shelters, she said.
For now, ``they want to have protection for us,'' she said. ``Thank God, I do believe that. I honestly do.''