MAIDUGURI, Nigeria—The arid town of Gwoza looked like it was finally going to see rainfall after months of drought, but a devastating attack by Boko Haram turned hope to despair. Armed with machetes and guns, the militants roared into the northeast Nigerian town in January 2015. As they jumped from their vehicles, the group began to burn homes and gather the women and children.

Among the young militants was a 15-year-old boy whom we’ll call Ahmed. Months before, Ahmed was abducted from his home in Baga, not long after completing primary school. I met the teenager in an Internally Displaced Persons (IDP) camp at Madinatu, not far away from Maiduguri, the capital of Nigeria’s northeastern Borno state, where I had spent three days meeting with IDPs and listening.

Ahmed told me he was kidnapped along with two of his neighbors from their compound, and taken to the militants stronghold in Sambisa where he was forced to become a soldier. After just two months training with the jihadists, his recruiters brought him on the mission to Gwoza.

Well before they set off for the attack, Ahmed’s superiors told the fighters to capture as many women and children as they could, and that they would be allowed to “have fun” when they returned to their base.

“At first I didn’t understand what they meant by ‘you are going to have fun’ and nobody thought to explain,” said Ahmed. “Days before we left for Gwoza, they began to show us what they wanted us to do.”

For the next two days, the young boys, most of whom were about Ahmed’s age, watched as their commanders raped women and young girls abducted in earlier raids. The lesson for the boys was clear: They were learning to subdue a struggling victim during sexual assault.

“The girls will scream and cry for help, but [the militants] didn’t care,” Ahmed said. “Sometimes they’ll be slapped and threatened with guns if they didn’t cooperate.”

While in the act, the jihadists provided specific instructions to the young militants.

“They tell us to remember to hold the girl tight on both hands, pinned to the floor,” Ahmed said. “They said we shouldn’t let a woman overpower us.”

The leaders were making a sharp departure from previous rules. Previously, even though dozens of women and girls were held hostage in their camps, young militants were prohibited from emulating their elders.

“From the day we came, they [Boko Haram commanders] kept warning us against having sex,” Ahmed said. “They said women belonged to men and not boys.”

Now, all that changed. A large number of senior fighters had been killed in one assault by the military, forcing the militants to take the boys along as part of the mission to Gwoza. But they knew they had to incite these young teens as well, and they wanted to replenish their supply of female hostages. Some abducted girls had been married off, and some had escaped or been rescued by Nigerian forces, leaving the jihadists with just a handful of female captives to prey upon.

“They wanted us to do a good job and that was why they said we will have fun when we returned,” Ahmed said. “I could see that so many young boys were excited.”

But Ahmed wasn’t interested. All he wanted was a way out of his misery. While others thought of how they would make the Gwoza mission a success, the boy focused on his own escape.

As the militants abducted the women and children and began their journey into the vast Sambisa forest, some of the captives jumped from one of the pick-up trucks and escaped into the surrounding bush. Ahmed, who was also in the vehicle, jumped down as well, pretending to chase the escapees and recapture them. But the boy, like many of those he ran after, never made his way back to the militants.

“I met up with the girls, but I encouraged them to keep running,” he said. “They were surprised I did that.”

Ahmed and the girls ran as far as they could. They kept trekking from one village to the other as they looked to reach Maiduguri, the biggest city in the northeast. After spending days on the road they eventually made it to Madinatu, where they found shelter in an IDP camp.

“I feel better now having regained my freedom,” Ahmed said. “I can move around at will, and do the things I like without bothering about being killed.”

But as Ahmed was trying to settle into life as a refugee in a makeshift camp nearly 200 kilometers away from his hometown, his contemporaries fighting for Boko Haram had begun to act in the same manner as those who recruited them—molesting and raping female captives.

At least two girls who escaped from a Boko Haram camp told me they had been raped by “little boys” on separate occasions just before they made their way out of captivity.

One of them said the militant who raped her was so little she could “push him away” from her “very easily.”

“He looked like a 13-year-old having sex for the first time,” said 16-year-old Rukiyat, who was abducted by the militants in Bama and taken to the jihadists stronghold in the Sambissa forest. “The only reason he succeeded was because he had a gun.”

Since Boko Haram began its uprising in 2009, the jihadists have focused much of their attention on abducting women and girls, the most notable of which was the kidnapping of more than 200 schoolgirls from their dormitory in Chibok, an incident that gained global attention. A number of victims became sex slaves of the militants.

“I was raped almost on a daily basis by different men,” said Rukiyat, who managed to escape one night when militants who were supposed to be watching the camp had fallen asleep. “When they became fed-up with me, they asked the little boy, who has often watched them do it, to take over.”

In the last 18 months, images of the women and girls emerging from Boko Haram captivity, where some were forced to marry members of the group, have been very constant. But despite their freedom from terror and brutality, many victims still face assault and rape in IDP camps—even from young boys.

A report by Human Rights Watch (HRW) released in October detailed how women and girls who survived Boko Haram violence were raped by officials at camps in northern Nigeria where they sought refuge.

A number of victims who stayed at IDP camps in Maiduguri told HRW they were sexually abused or coerced into sex by camp leaders, vigilante group members, policemen and soldiers. Many of these victims said they were abandoned after becoming pregnant.

But those who have been victims say the abuse in IDP camps is nowhere as devastating as the torture and humiliation they suffered from young boys while in captivity.

“It pains me when I recall that I was raped by a small, dirty boy,” said Rukiyat, who after fleeing Boko Haram was also raped by a vigilante group member involved in aid distribution in an IDP camp, after he drugged her wine.