Nigerian troops regained control of a military base in the northeast on Sunday, a day after it was seized by jihadists.
Jihadists aligned with the Islamic State militant group captured the base in Borno state on Saturday, after launching raids earlier in the week.
Officials blamed the violence on Islamic State West Africa Province (ISWAP), a group that split from Boko Haram in 2016.
According to a security source who spoke to AFP news agency on condition of anonymity, seven soldiers were killed during the fighting and eight others captured.
The source said the barracks were completely burnt and the jihadists made off with weaponry and vehicles.
For more on this story, my colleague Adolphus Mawolo spoke to journalist Hamza Suleiman from Bama, Bono State, northeast Nigeria.