Fighters soon decided they were ruthless enough to be ready for weapons training, she said, handing them guns and lining up other captives for live target practice.

One of the girls who had thrown her bomb into the well was so distraught that she ran into the hail of bullets in the firing squad, killing herself, Ms. Mohammed said.

For women trying to escape Boko Haram’s clutches, all the options are bad. Those trying to surrender to the authorities are sometimes killed by nervous soldiers, according to UNICEF. Members of a civilian vigilante force said they had shot one woman last year who approached their outpost on the edge of Maiduguri, and her bomb exploded.

One teenager, whose name was withheld for security reasons, was 16 when she said she was drugged and strapped with a suicide belt and sent out with two other women who also carried bombs to blow up soldiers at a checkpoint. One of the women had an infant strapped to her back. The three decided they would turn themselves in.

As the group approached the checkpoint to surrender, one of the women stopped behind a tree to urinate, the teenager said. When the woman squatted, her bomb accidentally detonated. Soldiers heard the blast and ran toward the group. Terrified, the woman with the infant ran off, untying the baby, who dropped to the ground. The baby girl sat on the ground crying, and the teenager thought of her own baby, who had died of starvation a month earlier in the Boko Haram camp where they were held hostage.

The teenager, her bomb still attached, said she picked up the child and soothed her until soldiers removed her explosives. She still cares for the girl, now age 3, and plans to never tell her that she is adopted.

“To her, I am her real mother,” she said. “This is what God sent to me.”