The road south towards Kaya is no longer safe, but thousands take it every day. They come on foot, piled on to scooters or next to donkeys straining at their carts. They testify to atrocities by masked men that are never claimed and whose motives remain unexplained. Women and children are everywhere. The men are looking for work, in hiding, or dead.

A landlocked nation of 19 million people in the heart of west Africa, Burkina Faso was celebrated only a few years ago as a stable, vibrant young democracy. Now it is being eaten away at its eastern and northern fringes.

Armed groups, including some aligned with al-Qaida and Islamic State, are waging a campaign of indiscriminate killing that has driven soldiers, teachers, health workers and other symbols of the state from vast swathes of the country’s borders.

“We are at a point now where the very existence of the country is at stake,” says Zéphirin Diabré, the leader of the opposition party Union for Progress and Reform.

“Officially, there is no location that has fallen to the terrorists,” says Jacob Yarabatioula, a sociologist at the University of Ouagadougou researching the violence. “But in reality, there are places at the extreme borders with Mali where you have no signs of the administration. No police, no gendarmerie, no defence forces, no schools. Those places are in a sense controlled by the terrorists.”

In the past year, attacks on civilians have surged, triggering a tenfold increase in displaced people, whose numbers rival those of Syrians from Idlib and Myanmar’s Rohingya. According to official records, nearly 800,000 Burkinabè people had fled their homes as of 29 February. But not all are being registered, and aid groups say the real number is far greater.

“If you look at the speed of arrivals and the lack of access for aid agencies and authorities to vast areas, there is no way the official figures are consistent,” says Tom Peyre-Costa from the Norwegian Refugee Council. “It’s highly probable that the figures are much, much higher.”

Facebook Twitter Pinterest Burkina Faso is experiencing a fast-evolving displacement crisis. Photograph: Norwegian Refugee Council

Kaya, about a two-hour drive from the capital, Ouagadougou, is overwhelmed by the new arrivals. Outside one government office, more than 100 women gather in the red dirt jostling for bags of maize. “My family are sleeping on the ground over there,” says Aissetta Diaten, 56, pointing to a patch beneath a tree.

The deadliest attacks – 35 people killed in a village in December, a church attack in February that left 24 dead, 43 villagers murdered last weekend – are usually publicised. But with more than 100 incidents recorded in February alone, according to one estimate, most of the violence experienced by the women lining up for food has gone unrecorded.

“They kidnapped my son three months ago,” says one, who asks to be identified as Mamdata. “The men in the village ran before us, and we left later. I don’t even know where my husband is.”

The fog extends to the perpetrators: the gunmen rarely identify themselves or claim their attacks later. Most are thought to be jihadists, including some affiliated with al-Qaida in the Islamic Maghreb and the Islamic State in the Greater Sahara (ISGS), who have spilled over or returned from neighbouring Mali, where they have been among the myriad actors involved in an eight-year insurgency.

Several victims of attacks in different areas say the gunmen who arrived in their villages – always masked, sometimes wearing ammunition belts across their bodies – herded people into a local mosque to deliver coarse sermons about veiling women or cuffing pants above the ankle.

“They said they were fighting for Islam and that everyone should follow Islam,” Shamim Suleyman, in his 80s, recalls of the men who arrived in his village near the northern town of Tongomayel. “And we said, ‘Look, we’re here in the mosque. We pray, we’re Muslims’. But if someone is carrying a gun and telling you these things, you can’t argue.”

After gunmen shot Aruna, 27, during an attack on the village of Rofènéga in January, one of them asked if he could recite the shahadah, the Islamic profession of faith. “I could, I did,” he says, unbuttoning his shirt to reveal the scar tissue below his shoulder. “They took my phone and said I could leave.”

Just how connected these groups are to Isis or al-Qaida’s leadership is unclear. Some might brand themselves as affiliates, receiving bomb-making help or funds, “but on the ground, west African groups do what they want and take advice as it makes sense”, says Judd Devermont, the director of the Africa Program at the Centre for Strategic and International Studies.

Both the US military and local analysts have noted that groups aligned to Isis and al-Qaida appear to have launched joint attacks in Burkina Faso and elsewhere in the Sahel – even though the two terrorist organisations are bitter rivals in the Middle East.

What is playing out in Burkina Faso and other pockets of the Sahel is more complex than a jihadist insurgency, analysts in the capital say. “At first it looked like terrorism,” Yarabatioula says. “But when we scratched the surface we noticed there were criminals involved too.”

Facebook Twitter Pinterest Aruna shows the wound he sustained when he was shot by terrorists. Photograph: Michael Safi/The Guardian

As the state presence has diminished, especially in remote areas, local militias, highway robbers and smuggling gangs have proliferated. Some work with the jihadis and others fight them. When attacks occur, it is not always clear if they are motivated by an extremist interpretation of Islam, a local dispute or to win turf.

“This is really a fight for a corridor,” says Yarabatioula. “These groups want to free a corridor to be able to smuggle drugs, cigarettes, and so on, going from Togo to Niger to Mali. And they are trying to create another corridor from western Burkina to the Ivory Coast.”

The west ignores the growth of Islamist insurgents in Africa at its peril Read more

“All these different groups are interested in the state going away,” says Mahamadou Sawadogo, a security researcher. “If there is no state, it’s good for all of them. That’s the link between them.”

The success of the armed groups is not just down to an under-resourced Burkinabè army – now being supported by French troops. They are also expertly playing on discontent in rural areas, especially among the ethnic minority Fulani group, who often complain of discrimination and neglect by the central government.

Many remote communities seethe at their lack of access to state resources, or when mines are granted to multinational companies and traditional hunting ranges are sold off as private estates, says Sawadogo.

“The terrorist groups come and say, we will give you all that the state takes from you. They take control of the hunting ranges and tell people: take it, it’s for you. They take control of the local mines and tell them: use it, it’s yours. So why wouldn’t they succeed?”

In contrast, the army’s efforts to beat back the militants have been marred by accusations of widespread human right abuses. “We’ve documented that 60 people were executed without trial last year,” says Aly Sanou, the secretary general of the Burkinabè Movement for Human and People’s Rights, a watchdog group based in Ouagadougou.

“The population are not collaborating with the security forces, because in order to collaborate you need to trust them. Those from the Fulani ethnic group feel stigmatised, and this has allowed the terrorist groups to widen their recruitment base by recruiting more Fulanis.”

The number of people registered as displaced is expected to exceed 900,000 by next month, with no end in sight. Aid agencies say at least $300m (£244m) in funding will be required to feed and shelter the fleeing population. Reaching those left behind in areas where government control has faltered is currently impossible, says Peyre-Costa. Nobody knows who to ask for safe passage.

“In most humanitarian crises, we can negotiate access to be able to reach everyone in need,” he says. “But in the case of Burkina Faso, we don’t know who’s actually in control.”

Additional reporting by Oumar Zombre