At least 10 other soldiers were also wounded in the attack on the Blabrine military base near the Diffa town in Niger.
Armed fighters have taken hundreds of hostages in a northeast Nigerian town where residents had only just returned after fleeing their homes, residents and militia sources said on Wednesday.
The Islamic State West Africa Province (ISWAP) group, a splinter group of Boko Haram, overran the town of Kukawa in Borno state late on Tuesday, the sources told the AFP news agency.
They seized residents who had returned to the town in a government operation on August 2, after spending nearly two years in displacement camps, said Babakura Kolo, head of a local militia.
“The terrorists attacked the town in 22 trucks around 4:00 pm (16:00 GMT) yesterday and engaged soldiers guarding the town in a fierce battle,” he said.
Kukawa’s residents had returned to their homes just 16 days earlier under military escort, on the orders of the Borno state authorities.
They had been living in camps in the regional capital Maiduguri, 180km (120 miles) away, where they fled following a bloody attack in November 2018.
A town chief who accompanied the residents to the town said the people had returned with the hope of cultivating their farmlands “only to end up in the hands of the insurgents”.
“We don’t know what they would do to them but I hope they don’t harm them,” said the chief, who asked not to be identified for safety reasons.
A security source who confirmed the incident to AFP said fighter jets were deployed from Maiduguri on Wednesday to “tackle the situation”, but did not give further details.
The decade-long conflict in northeastern Nigeria has forced more than two million people out of their homes, most of them from the northern part of Borno.
Many have moved into squalid displacement camps in Maiduguri, where they rely on handouts from international charities.
In the last two years, local authorities have been encouraging the displaced to return home, despite concern by international charities that this is not safe.
Residents have been returned to five major towns since 2018, where they are confined under military protection, with trenches dug around to try to fend off attacks.
Despite the fortifications, the armed fighters have continued to launch attacks.
Since 2009, Boko Haram has been carrying out attacks in Nigeria and neighbouring countries in the Lake Chad region, with no signs of slowing down despite counterattacks by a joint multinational force across borders.
Boko Haram has been responsible for the deaths of tens of thousands of people and the abduction of thousands of others, including hundreds of schoolgirls from Chibok in 2014.
In 2015, Boko Haram split, giving way to the formation of ISWAP, which has pledged allegiance to the ISIL (ISIS) group.
Since then, ISWAP has also gone on a spree of violence, attacking government forces and carrying out abductions and extortions.
The key strongholds of the armed groups are located in southern and southwestern regions of Lake Chad, the confluence of the borders of four African states – Nigeria, Cameroon, Chad and Niger.