Hundreds of people have fled the fishing town of Baga after the militants overran it on Wednesday night, the residents said.
The militants seized weapons from a military base, and torched a naval base on the shores of Lake Chad, they said.
The military denied Baga had fallen, saying the attack had been repelled.
But PRNigeria, an agency well-connected with the military, quoted an intelligence officer as saying that troops had made a “tactical withdrawal” from their base after coming under attack.
“The Nigerian Air Force in response to distress call quickly mobilised military aircraft and flew over 20 sorties [on] Wednesday night and throughout Thursday,” it quoted the unnamed officer as saying.
Midwife murders reveal brutal IS tactics in Nigeria
A resident, who spoke to the BBC after he fled Baga, said a militant led the morning prayer on Thursday at his mosque in the town.
Other armed militants were present at the mosque, and prayed there too, the resident said.
The militants told the congregation that civilians would not be targeted and were free to leave the town, he added.
The fighters identified themselves as being members of the Islamic State’s West Africa Province (Iswap), an IS affiliate which has distanced itself from Boko Haram, the main insurgent group in north-eastern Nigeria.
The militants had captured heavy armoured tanks, boats and a large cache of weapons during the raid on the military and naval bases, other residents said.
The military base was the local headquarters of the multinational task force, which includes troops from neighbouring states fighting the militants, the residents added.
Some troops fled with civilians, as the militants stormed the town, in north-eastern Borno state, on Wednesday night, the residents said.
More on the Boko Haram insurgency:
Freed Nigerian girls kidnap ordeal
The Nigerian town that lost its girls
‘How I almost became a suicide bomber’
In a statement on Thursday, Nigerian army spokesman Sani Usman confirmed the attack on the military base but said the militants had been pushed back after troops put up a “determined fight”.
“Similarly, a search and rescue team has been constituted. The Nigerian Air Force component has also been mobilised and are engaging the fleeing terrorists. Unfortunately, a naval personnel was killed in action,” he added.
In January 2015, Boko Haram took control of the town after killing hundreds of residents and forcing thousands to flee.
Baga – and most other territory seized by the militants – was later retaken by the army.
Some analysts fear there will be an escalation of attacks by the militants in the run-up to elections next year.
President Muhammdu Buhari, who is seeking a second term, took office in 2015 with a promise to defeat the militants.
At the launch of his re-election campaign on Friday in the southern city of Uyo, he said the militants had lost much territory since he took office.
“We are going to eventually clear them out of the country,” he said, without referring to the ongoing fighting in Baga.
- A daily graphic journalist arrested for filming in Badu Kobi’s Church.
- I regret nothing and repeat the same I said last season – Messi on his Champions league promise.
- We will request Stonebwoy songs to be played in our stadium even if the player’s don’t do – FC Nordsjælland
- Badu kobi sings Shatta Wale’s “I know my level” and threaten his enemies.+video.
- “Oh yeah baby I love it” – Iyanya narrates Yvonne Nelsons’ reaction on their first time in bed.