As many as 65,000 people have fled the northeastern Nigeria town of Damasak following a series of militant attacks, the UN refugee agency said on Friday.
Fighters from the so-called Islamic State West Africa Province (ISWAP) stormed the town in Borno state three times in a week to strike a military garrison, burning homes and a UN office and killing at least 12 people.
In the latest violence on Wednesday, militants attacked the garrison before being forced back into the town itself, military sources and residents said.
"Following the latest attack on Wednesday 14 April, the third in seven days, up to 80 percent of the town's population -- which includes the local community and internally displaced people -- were forced to flee," UNHCR spokesman Babar Baloch said.
Some have fled towards the regional capital Maiduguri and other nearby towns while others have crossed the border into Niger's Diffa region, itself vulnerable to militant violence.
"Due to insecurity, however, humanitarian access is increasingly challenging in many parts of Nigeria's Borno State, including for UNHCR staff, who were forced to temporarily relocate out of Damasak in the past seven days," the UNHCR said.
Nigeria's army dismissed reports militants had overrun Damasak and said on Thursday troops were in control of the area.
At least four people, including a soldier, were killed in an attack Monday. The UN said eight others were killed Wednesday, while locals said ten bodies were burried and 20 people were injured.
The attacks have underscored the militants' continued ability to hit the armed forces more than a decade into Nigeria's grinding insurgency.
More than 36,000 have been killed and two million displaced by the fighting in Nigeria that has spread into neighbouring Chad, Cameroon and Niger.
Damasak is host to one of the military's so-called "super camps" -- fortified garrisons the army has set up in an attempt to better defend against attacks.
Critics and local residents say the strategy to close smaller bases and pull back into larger camps has left militants freer to roam unchallenged in rural areas.
Due to worsening security in the region, humanitarian workers are struggling to provide aid, with the number of people requiring urgent assistance expected to rise to 8.7 million this year.
ISWAP, which split from the militant group Boko Haram in 2016, has become a dominant threat in Nigeria, attacking soldiers and bases while killing and kidnapping civilians.
A general view of Yawuri informal camp on the outskirts of Maiduguri, capital of Borno state, on March 29. The makeshift camp hosts nearly 2,000 people internally displaced by a decade-long militant insurgency in northeast Nigeria.AFP