“They would tell you to lie down, then shoot you in the head,” said Babakar Karami Issa, 25, who hid in the town of Gamboru Ngala for two weeks after it was overrun last year. This week, Chad’s military said it had retaken the town from the militants.

“If they saw a locked door, they would say, ‘Where are your men?’ ” recalled Alhaji Ali, 28, who escaped from the town of Damboa.

Some of the refugees stayed behind for weeks or months, often hiding as best they could or looking for opportunities to escape. The militants, many of them with wild beards and unkempt hair, some wearing full-face turbans showing only their eyes, were by turns arbitrary, brutal and cajoling, the refugees recalled.

Many of the fugitives are still traumatized by the violence they survived. A young girl whose parents were killed in front of her stood silently, unable to speak, at a camp in a girls’ school that has been closed because of the fighting.

Refugees described Boko Haram’s rudimentary attempts to win hearts and minds in the territory it captured. But even as it tried to administer the towns, the killing continued, with the group’s punitive impulses overriding all.

“After two weeks, they came back and killed him,” said Fatima Abdullahi, 26, whose husband was shot in front of her in the town of Bama. “They had told him to stay. Then, they just shot him,” she said, weeping. “They didn’t say anything.”

In another case, Boko Haram fighters returned from combat and grew furious at the sight of elderly men talking peacefully under the shade of a neem tree, so they simply opened fire on them, said Hauwa Abubakar, 24, who lived for six weeks under Boko Haram rule in Bama.