See more of the story

– Four hundred nights. Fatima counted each one as she lay on the ground with her toddler, crammed between strangers, swatting away mosquitoes in a room that stank of feces. She remembers thinking: Why did I escape the terrorists for this?

"Boko Haram treated us better," she said, tears sliding down her cheeks. Fatima, now 18, is among thousands of children detained in recent years by Nigerian armed forces — including many who had fled extremist captors — amid a decadelong conflict that often turns victims into suspects.

Defense officials deny claims of abusive confinement and say they must vet everyone who emerges from the restive countryside: Boko Haram and other Islamist groups in Nigeria's northeast are known for sending children to carry out attacks. But human rights advocates say conditions in the holding centers are so appalling that they thwart the military's goal of protecting — and deradicalizing — young people by breeding resentment of the government.

In interviews with the Post, seven children who spent time in the Giwa barracks near the city of Maiduguri, as well as other military facilities, said they were allowed no outside contact. None of the seven, now ages 10 to 18, met with lawyers. The Post is using only their nicknames because they fear reprisals.

One young man said soldiers beat him. One girl said a guard tried to rape her. All described an environment where they slept beside strangers on mats, were separated from family members by gender and saw sick people die.

A new report from Human Rights Watch corroborates their accounts. Researchers said they met in June with 32 children and young adults who reported being packed into hot rooms without bedding or mosquito nets in a region where malaria is a top cause of death. They described an overwhelming stench from an open toilet, the authors wrote, and sometimes fainted in the heat.

The military called the report false.

"Apprehended children are kept in secured places, where they are adequately fed, profiled and de-radicalized before their release," said Col. Onyema Nwachukwu, acting director of defense information. "The children are provided with regular feeding, clothing, requisite medical attention, in-house spiritual and educational tutoring and other welfare needs."

Nigerian forces have released at least 2,200 children — nearly all without charges — since 2013 and treated them "as victims of war and not as suspects," Nwachukwu said.

The U.N. says more than 3,600 children have been held in military facilities during that period.

Over the past 10 years, Boko Haram, one of several extremist groups seeking to build an Islamist state in West Africa, has killed approximately 27,000 people. The Nigerian military and international partners have shrunk the terrorists' footprint in recent years, but the group continues to launch devastating attacks from remote outposts in the state of Borno. The terrorists often strap children with explosives and force them into crowds. Eight suicide bombers have struck Maiduguri, the state capital, since January.

Some in Nigeria fear the military's vetting strategy could keep those who have run from violence in hiding. The conflict has displaced more than 2 million people, and at least 22,000 remain missing, according to the Red Cross. About half were younger than 18 when they disappeared.