He lay on top of his young sons, trying to shield them with his body, he said.

The military had forced them and dozens of other villagers under a baobab tree. Then, he said, the soldiers opened fire.

“They shot at us all,” said Daouda, a farmer who had survived for years in jihadist-controlled territory only to be shot at by the military that was supposed to protect him.

The mass killings in Daouda’s village and a nearby hamlet in February were among the deadliest in a decade of upheaval in Burkina Faso, a country torn apart by the Islamist insurgencies that have swept across parts of western Africa.

Burkina Faso has faced such relentless assaults from extremist groups affiliated with Al Qaeda and the Islamic State that it topped the Global Terrorism Index last year, becoming the nation hardest hit by terrorism in the world.

The resulting conflict has killed tens of thousands of people and displaced more than two million in all — 10 percent of the country’s population.

But in the decade-long fight against the insurgents, Burkina Faso’s military has waged a brutal war of its own. It has been accused of repeatedly targeting civilians who are suspected of cooperating with — or simply living in the vicinity of — jihadists, according to survivors and human rights groups. Soldiers often kill civilians on the spot, they say.