More than 5,000 people have reached safety outside the northern Mozambican town of Palma a week after it was besieged by jihadists, the UN said Wednesday, as thousands remained stranded.

Armed militants raided the coastal town on March 24, ransacking buildings and beheading residents as thousands fled into surrounding forest.

Dozens have been killed and many more are still missing in a coordinated attack seen as the biggest escalation of an Islamist insurgency that has battered Cabo Delgado province since 2017.

"As of yesterday afternoon there were 5,360 displaced people... who had arrived in Nangade, Mueda, Montepuez and Pemba districts," International Organization for Migration (IOM) spokeswoman Sandra Black told AFP on Wednesday.

"That displacement is rapidly increasing."

The fighting had already displaced around 670,000 people in the gas-rich province, more than 43,000 of which were staying in Palma before the attack.

Two boats carrying over 1,100 escapees had docked in the provincial capital Pemba earlier on Wednesday but had "yet to disembark" due to "security screening procedures", Black said.

Palma is around 10 kilometres (six miles) away from a multi-billion-dollar liquified natural gas project (LNG) led by France's Total and involving other international companies.

But President Filipe Nyusi on Wednesday downplayed the latest attack as "not the biggest", despite its unprecedented proximity to Africa's single biggest investment project.

"Let us not lose focus, let us not be disturbed," Nyusi told reporters at a public event in the capital Maputo.

"Lack of concentration is what our internal and external enemies want," he added. "We have to... move forward."

Total had already suspended operations and evacuated some staff in late December after jihadists launched a series of raids near its compound.

Mozambique's government attempted to resolve the situation by stepping up security and declaring a 25 kilometre (15.5-mile) security perimeter around the LNG site.

Total had just announced plans to progressively resume construction work hours before the militants attacked Palma.

Thousands of displaced residents have made their way to the LNG site on the Afungi peninsula, seeking refuge and evacuation.

Most arrived hungry, dehydrated and "in shock" after hiding in the bush for days, according to Doctors Without Borders (MSF).

"We hear repeatedly that all they want to do is leave," MSF emergency coordinator Sylvie Kaczmarczyk said in a statement.

People at the port of Pemba have been waiting for the arrival of loved-ones evacuated from Palma
People at the port of Pemba have been waiting for the arrival of loved-ones evacuated from Palma AFP / Alfredo Zuniga

Some bore life-threatening injuries.

"We have cared for one baby with a bullet wound," said Kaczmarczyk.

Pregnant women were arriving in "terrible condition", she added, while others clutched newly-born babies delivered in the bush.

Around 1,400 people, including both gas and government workers, were ferried from Afungi to Pemba on Sunday.

The most vulnerable escapees, including unaccompanied and injured children, have been flow into the city by the UN.

Hundreds of others used their own means, streaming into surrounding districts on fishing boats, buses and on foot.

But thousands of people remain stranded, raising concern among aid organisations providing humanitarian assistance.

"The number of people displaced... will continue to increase over the coming days," said the head of the UN Refugee Agency's Pemba office Margarida Loureiro.

"There are also reports of people attempting to cross the border into Tanzania," she added.

Several aid groups are providing mental health support to help survivors overcome trauma.

"The flow of arrivals is constant but not massive... mostly men who have been able to walk all the way," said an unnamed aid worker coordinating humanitarian assistance in Nandage and Mueda, respectively over 50 and 150 kilometres (31-93 miles) from Palma.

"Camps are still able to deal with these new arrivals," he noted. "But all will depend on the number of people arriving over the next few days."

Outside the port of Pemba, residents with family in Palma anxiously scoured incoming survivors for familiar faces.

They milled around the port's barbed-wire walls and sat against nearby buildings.

"We don't know if our relatives are on the boats that are coming or not, but we are here, we are not losing hope," Muza Momadi told AFP as she waited for her mother and brother.

Helicopters carrying humanitarian personnel landed at Pemba airport, alongside a small plane flying troops back from Palma, said an AFP photographer at the scene.

One soldier leaned on a stick as he limped barefoot across the tarmac, trouser leg rolled up above the knee.

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

The government has not yet disclosed military casualties.

Cabo Delgado's jihadists have wreaked havoc across the province in a bid to establish a caliphate.

The insurgents are affiliated to the Islamic State group, which claimed the attack on Palma this week.

Their bloody campaign had claimed at least 2,600 lives, half of them civilians -- a figure expected to rise significantly following the latest assault.

An unnamed army official told AFP soldiers had been sent to "mop up" the town, which fell to the militants on Saturday.

bur-str-sch/ri/pma