The extremists approached the shepherd and made their intentions clear: They were seizing only the cattle owned by the deputy mayor of Burkina Faso's rural commune of Deou and leaving the others alone.

And they had a message, deputy mayor Moustapha Sawadogo said: "All officials should leave the Sahel or face death."

Islamic extremism has penetrated this West African nation, with its arid north becoming a sanctuary for fighters from Mali and Niger. Local young men who are frustrated by poverty and alleged abuses by soldiers during counterterror efforts are becoming radicalized.

"They live with us and know our movements," said Sawadogo, who has lived in Burkina Faso's Sahel region for more than two decades. "For the moment, the area belongs to them. They have seized it."

The once-peaceful Burkina Faso, in the heart of West Africa, is finding itself uncomfortably at the center of a battle between extremists and regional counterterror effort for which it is relatively unprepared. Larger neighbors Mali and Niger for years have fought extremist groups pledging allegiance to al-Qaida and the Islamic State organization.

Now with the extremist threat spilling across the borders to Burkina Faso, the country has signed up with a new regional counterterror force, the G5 Sahel. Military spending jumped 24 percent from 2016 to 2017, according to the Stockholm International Peace Research Institute. The fight has strained security forces and frightened tens of thousands of students out of schools.

When the first extremist attacks hit Burkina Faso's west in 2015 they bore the signature of the Al-Mourabitoun movement, a branch of Mali-based extremists that Burkina Faso authorities said had received support from Burkinabes. Then a homegrown jihadist group began to form and attacks became more brazen.

The capital, Ouagadougou, was hit for the first time in January 2016, with extremists targeting a cafe popular with foreigners, killing at least 30 people. Then in August 2017, 18 people were killed in an attack on a Turkish restaurant in the capital. And an attack in March targeted the military's headquarters and the French Embassy, killing eight soldiers.

A well-known local preacher emerged as a key threat in 2015 when his men killed 12 soldiers in their barracks in the rural commune of Baraboule. Ibrahim Malam Dicko "became so radical that he and his men started condemning the way we practice weddings, baby baptisms or namings," said the Emir of Djibo, Aboubacar Dicko, the highest religious and community leader in Soum province in the Sahel region.

Dicko's followers went from village to village banning such ceremonies, calling them "anti-Islam." They would kill those who refused to follow them or who were suspected of providing information to the security forces, deputy mayor Sawadogo said.

The followers also reached out to young unemployed men who felt abandoned by the central government.

"They are not jihadis, religiously speaking, but frustration leads them to seek weapons and now they hope to find their lost self-esteem," Sawadogo said. "They found in jihadism the way to easily get weapons, a motorbike and to resemble what they used to be" when they had cattle, he said. Droughts in recent years have caused many in northern Burkina Faso to lose cattle and crops.

"We urgently need jobs but the government just comes with some cosmetic projects ... It is not enough," the Emir of Djibo said. The millions of dollars put into the government's Sahel Emergency Program, launched a year ago to address poverty in the drought-hit region, have yet to deliver results.

In July, Burkina Faso's security minister for the first time released the names of 146 citizens wanted for aiding and participating in extremist activities, including some well-known local councilmen and traders. So far, only three have been arrested.

Rights groups worry that a heavy-handed approach in counterterror operations has pushed some young men into joining the extremists. In May, Human Rights Watch said security forces were implicated in at least 14 alleged summary executions and four other men died of alleged severe mistreatment in custody.

As extremists find a stronger local following they have increased attacks on security forces and officials. In recent months, the prefect of Oursi and the mayor of Koutougou, both rural communes in Soum province, have been killed.

On Saturday, five gendarmes and one civilian were killed when their vehicle hit an explosive device between the rural communes of Boungou and Ougarou in the far east.

Attacks on schools and abductions of teachers have forced the closure of more than 200 schools, mainly in Soum province, while more than 20,000 students could not take final exams this year.

The governor of the eastern region has warned that some young men who had left for Mali are now back and seeking to launch a katiba, or brigade.

"Many studies have shown that poverty is a factor of radicalization, often even more important than the religious aspect," said Abdoul Karim Saidou, political science lecturer at the Burkina Faso Joseph Ki Zerbo University. "Since the security forces are randomly arresting and detaining or maltreating (the youth), some of them flee toward the Mali border ... and will get radicalized there."

___

Follow Africa news at https://twitter.com/AP_Africa