Mozambique: Is Cabo Delgado the latest Islamic State outpost?
Video caption The Islamic State has been behind the growing wave of violence in northern Mozambique.
A simmering Islamist rebellion in a remote corner of Mozambique has erupted into open warfare in recent weeks, with reports of massacres, beheadings and the brief seizure of two towns in the northern province of Cabo Delgado, writes BBC Africa correspondent Andrew Harding.
The armed men walked calmly through the long grass, skirting past a large white building, seemingly untroubled by the sound of gunfire.
Most carried automatic rifles and wore variations of what appeared to be Mozambican army uniforms. A few more shots rang out in the distance and someone shouted "Allahu Akbar" - God is the greatest - as if in reply.
The video footage, shot last month on a mobile phone in Muidumbe was powerful new evidence that a murky conflict in the northern-most region of Mozambique has now moved out into the open, in spectacular and alarming fashion.
A second video, shot a few weeks earlier, showed a dead man - apparently a policeman - lying in a pool of blood. The camera then moved over to reveal another corpse, then a third lying under a black police vehicle, then a fourth body out in the open, and finally a large pile of automatic weapons in some sort of police or military store.
How close are the links to Islamic State?
That footage was filmed in the strategic port of Mocimboa da Praia, which was briefly - and dramatically - seized by the militants on 24 March. Two days later, they seized another important town, Quissanga.
"Now they have guns and vehicles, so they move easily and can attack widely. And they are using soldiers' uniforms. So, people are very confused, and very afraid," said the Catholic Bishop of Pemba, Luiz Fernando Lisboa.
Those two large-scale, sophisticated military assaults are proof of a radical change in strategy for the group known locally as al-Shabab, although it has no known links to the Somali jihadi group of the same name, which is affiliated to al-Qaeda.
It has spent the past two years operating in the shadows, attacking remote villages across the province, ambushing army patrols on isolated roads, instilling terror in many rural communities, forcing perhaps 200,000 people to flee from their homes, but rarely giving any indication about its motives, its leadership, or its demands.
IS has claimed responsibility for a string of recent attacks in Mozambique and appears to be promoting its involvement there as part of a "franchise" operation that has seen it expanding its footprint in several parts of Africa.
The idea that the rebellion in Cabo Delgado is, at its core, part of a global jihadist movement, has been given credibility by the militants themselves, who publicly swore allegiance to IS last year.
The relationship offers advantages to both sides.
But in a separate video, filmed this year and circulated widely on WhatsApp in Mozambique, a militant leader offered a much more nuanced explanation for the group's actions.
Locals complain about discrimination
"We occupy [the towns] to show that the government of the day is unfair. It humiliates the poor and gives the profit to the bosses," said the tall, unmasked man, in khaki uniform, surrounded by other fighters.
The man spoke frequently about Islam, and his desire for an "Islamic government, not a government of unbelievers", but he also cited alleged abuses by Mozambique's military, and repeatedly complained that the government was "unfair".
Observers say the evolution of the insurgency in Mozambique is remarkably similar to Boko Haram's emergence in northern Nigeria, with a marginalised group exploiting local grievances, terrorising many communities, but also offering an alternative path for unemployed youths frustrated by a corrupt, neglectful and heavy-handed state.