There are few experiences more unsettling for a child than watching a mother being taken away to prison for months or years. For years, women’s advocates have worked to establish alternatives for mothers convicted of crimes, saying the lives of their children become so upended they often end up in jail themselves.

On Wednesday, the Brooklyn district attorney, Charles J. Hynes, with leaders from various women’s groups, announced a new program that represents one of the most ambitious efforts yet: It will allow a carefully chosen group of women who plead guilty to felonies to remain in their own homes with their children.

Georgia Lerner, executive director of the Women’s Prison Association, a New York City nonprofit organization that will administer the program, known as JusticeHome, said she believed it would be one of the first of its kind in the country. It will start with 45 women screened by prosecutors in the district attorney’s office to ensure they present little danger to the public.

“In most cases, women are the primary caretakers,” she said. “When men get arrested, children stay with the mother. When women get arrested, there’s a much higher risk that the children wind up in foster care.”