“These vulnerable and unaccompanied children are easy prey for terrorists and criminals alike,” said Manizha Naderi, the executive director of Women for Afghan Women. “With the cutting of aid to projects around the world by the Trump administration, the future is unknown,” Ms. Naderi said.

Women for Afghan Women, which runs an extensive network of shelters and other facilities for vulnerable women and girls in Afghanistan, began opening the orphanages in 2009. “Since then, with generous U.S. government support, we have offered lifesaving services to over 1,100 children whose families could not afford an alternative care while their mothers were serving their time in prison,” Ms. Naderi said.

The centers’ supporters say they have been more successful than they originally imagined was possible. The children are taken to normal public schools in buses, but aside from occasional outings, most of their free time is spent in the center, where extra tutoring is available. The result is grades for the centers’ children far above the average for children from less troubled homes — generally in the 90th percentile or better, according to Ms. Nasim.

One of the Kabul center’s high achievers was Laila Rasekh, 19, who did so well that she won scholarships first to a high school in India, and then to college. She now studies at Ashoka University in Haryana, India.

Ms. Rasekh said her mother forced her into prostitution beginning at the age of 8. When her mother was sentenced to five years in prison for that crime, Ms. Rasekh would have had to join her mother in jail, even though she was a prosecution witness against her.