Sporadic clashes broke out in Palma on Tuesday as thousands of residents hid around the besieged northern Mozambique town, scrambling to escape the area overrun by jihadist militants, aid agencies said.

Insurgents affiliated with the Islamic State group launched a raid to overrun the coastal town last Wednesday, ransacking buildings and beheading civilians.

Dozens have been killed in what witnesses describe as a coordinated attack, just 10 kilometres (six miles) from a multi-billion dollar gas project on the Afungi peninsula led by France's Total.

"There are still sporadic clashes reported from Palma this morning," the UN humanitarian affairs agency OCHA said Tuesday, adding that "thousands" fled to the bush and sought refuge near the gas exploration site.

The raid on Palma was a major escalation in the insurgency by jihadists who have wreaked havoc across northern Mozambique since 2017, raiding villages and towns with the aim of establishing an Islamic caliphate.

Hundreds of shaken survivors from Palma have streamed into the neighbouring town of Mueda and provincial capital Pemba, where they arrived via boat, foot and plane.

Over 3,360 displaced people had safely reached surrounding districts, said the International Organization for Migration.

But aid agencies believe thousands more are still wandering around the area, desperately seeking refuge.

Some have been trudging through forest for days, walking west towards the Tanzanian border, with little access to food and water.

Global medical charity Doctors Without Borders said its teams "are working to ascertain where significant groups of people Palma are" and their intended destinations.

Maps locating the town of Palma, north Mozambique, under jihadist attack, and the Mozambique LNG gas site, owned by Total, located some 10 kilometres away
Maps locating the town of Palma, north Mozambique, under jihadist attack, and the Mozambique LNG gas site, owned by Total, located some 10 kilometres away AFP / Kenan AUGEARD

Hundreds have meanwhile gathered outside Total's fortified complex in the hope of being evacuated.

The oil giant ferried around 1,400 people, including both gas and government workers, to Pemba on Sunday, but has since been accused of turning its back on displaced residents.

Total said it has organised "emergency support", including food and water, for people arriving at its site.

Only a few dozen other survivors have since reached the provincial capital, mainly on small fishing boats, raising concern among humanitarians on the ground.

Around 40 escapees flew to Pemba on UN planes Monday evening. Most were "traumatized and exhausted" women and children, said the UN's refugee agency.

"That's very little compared to the thousands that are reported stranded in Palma," an unnamed aid worker in Pemba told AFP.

"We are worried that so far very few are coming."

Mozambican civil society activist Adriano Nuvunga on Monday warned that insurgents were likely "still around" and "hiding" from the army, which had regained control of "certain areas".

In Pemba, aid workers and missionaries waited outside the port for arrivals while others assisted those who had managed to complete the journey.

"Many of them had been hiding for more than four days," Father Kwiriwi Fonseca told AFP.

"Some of them were injured, most of them were suffering from hunger."

A few dozen people have managed to reach Pemba on their own in addition to around 1,400 ferried to the port by Total
A few dozen people have managed to reach Pemba on their own in addition to around 1,400 ferried to the port by Total AFP / Alfredo Zuniga

Survivors asked locals if they had seen their missing relatives.

"They are extremely desperate and worried because Palma's mobile network is down," said resident Anda Assane in the beach-facing neighbourhood of Paquitequete.

"They have not had news from their loved ones for several days."

A 12-year-old barefoot boy separated from his family made it to Pemba after catching a ride on a small boat.

He told Save the Children he had fled to a nearby beach when the militants arrived and swum to a small boat that took him to Pemba.

The boy's sister lives in Pemba "but he only knows her first name," said Save the Children country director Chance Briggs. "Finding her is like looking for a needle in a haystack."

UNICEF received at least seven unaccompanied, some wounded children were flown from Afungi on Monday. Many had spent days hiding in the bush.

"There were some terrible scenes," said UNICEF spokeswoman Marixie Mercado. "One injured girl, around five years old, was carried off the plane and moaning in pain."

Meantime at the provincial hospital, a 13-month-old baby was waiting for surgery to remove a bullet lodged in his leg.

Pemba is already packed with hundreds of thousands of other people displaced by the Islamist insurgency, which has uprooted nearly 700,000 from their homes across the vast Cabo Delgado province.

Palma district itself was home to more than 110,000 people, around 40 percent of which had already fled militant violence in other areas, according to OCHA.

The bloody Islamist militant campaign has claimed at least 2,600 lives, half of them civilians.

The US State Department this month said the group reportedly pledged allegiance to IS in April 2018. It named its leader as Abu Yasir Hassan, and declared him a global terrorist.

Mozambique's former coloniser Portugal on Tuesday announced plans to send around 60 troops to help local soldiers fight the militants.

bur-sch/sn/pma