DALORI, Nigeria — Zara and her little brother thought they were finally safe.

After being held captive by Boko Haram for months, they made it to this government camp for thousands of civilians who have fled the militants’ cruelty. But instead of a welcome, residents gathered around, badgering them with questions and glares.

They beat her 10-year-old brother, convinced that anyone who has spent time among the militants, even a young kidnapping victim, could have become a sympathizer, possibly even a suicide bomber.

Zara, in fact, was hiding a dangerous secret strapped to her back: her baby. The child’s father was a Boko Haram fighter who had raped her, but Zara knew the crowd would still doubt her loyalties. So she quickly spun a tale that the militants had killed her husband, leaving her a young, widowed mother.

“If they knew my baby was from an insurgent, they wouldn’t allow us to stay,” said Zara, whose full name was not used, to protect her safety. “They’ll never forget who her father is, just like a leopard never forgets its spots.”