Boko Haram retook the town of Bosso in southeastern Niger overnight after clashes with soldiers from Niger and Nigeria, the mayor of Bosso and a military source said on Monday.
The Islamist group first took the town near the Nigerian border on Friday in an attack in which 30 soldiers from Niger and two from Nigeria were killed.
It was the deadliest assault in Niger by the Islamist group since April 2015, when at least 74 people, including 28 civilians, were killed at the Lake Chad island of Karamga.
Nigerien troops retook Bosso by Saturday morning, the defense ministry said. But Bosso mayor Mamadou Bako said they lost control again on Sunday night. A military source in Diffa, about 100 km (62 miles) west of Bosso, confirmed the takeover.
Bosso is part of the Diffa region near Lake Chad, where Cameroon, Chad, Nigeria and Niger meet and where many refugees have sought shelter from Boko Haram violence over the years.
More than 30 attacks have been attributed to the militants in the region this year, the United Nations says. The U.N. humanitarian agency said in a statement on Saturday that civilians were reported to be fleeing the area.
Boko Haram has been trying to establish an Islamic state adhering to strict Sharia law in northeast Nigeria since 2009. About 2.1 million people have been displaced and thousands have been killed during the seven-year insurgency.
Along with Chad, Cameroon, Nigeria and Benin, Niger has contributed troops to a 9,000-strong regional task force dedicated to fighting the group.
(Reporting By Boureima Balima, writing by Edward McAllister, editing by Tim Cocks)