The Nigerian army said it was in full control of a north-eastern town on Thursday where hundreds of people had been taken hostage by militants linked to the Islamic State armed group. Many of the victims had just returned to the town after fleeing a bloody attack there two years ago.
"The situation in Kukawa is now calm with troops in full control," defence spokesman John Enenche said in a statement.
Hours beforehand, fighters from the Islamic State West Africa Province (ISWAP) had stormed the town in the Lake Chad region, taking hundreds of people hostage.
The hostages' whereabouts remain unknown despite the Nigerian army's reassurances that everything is under control.
Many of the victims seized late on Tuesday had just gone back to their homes after spending nearly two years in displacement camps, according to local militia leader Babakura Kolo.
Enenche said: "The attack by the terrorists was a deliberate attempt to reverse the milestone achievements regarding internally displaced persons in the areas of peace building and resettlement."
Three soldiers died and two were wounded during the gun battle in which eight jihadist fighters were killed, Enenche added.
A splinter group of Boko Haram, the ISWAP has grown in power and influence in recent years, waging a guerrilla war across north-eastern Nigeria and elsewhere on the lake's periphery.
The decade-long jihadi conflict in the country's north-east has forced some two million people to flee their homes, with many of them moving to displacement camps in the regional capital of Maiduguri.
Authorities have been trying for the last two years to get them to return to their home towns even though international charities have insisted it is not safe to do so.