Islamic State-allied jihadists have attacked a camp housing surrendered rivals from Boko Haram in the country's northeast, the military said on Sunday.
Saturday's attack on Damboa in Borno State came after several thousand Boko Haram militants and their families surrendered in recent months following the death of their leader in May.
Islamic State West Africa Province (ISWAP) has emerged as the dominant force in Nigeria's 12-year conflict, but factions of Boko Haram are still fighting against their control.
The army said troops drove back ISWAP fighters who tried to attack the camp where surrendered Boko Haram jihadists were being held, but the statement did not give any casualty figures.
"This antic of terror within terror is being employed by ISWAP to discourage intending surrendering terrorists in their ranks," it said.
ISWAP has been consolidating in areas it controls in northeast Nigeria since May when Boko Haram chief Abubakar Shekau killed himself to avoid capture by jihadist rivals.
But infighting between ISWAP and a pro-Shekau faction the Lake Chad region left scores of fighters dead last week, according to security and civilian sources in the area.
ISWAP split from Boko Haram in 2016 and rose to become the dominant jihadist group, focusing on attacking military bases and ambushing troops.
The two factions turned staunch enemies and have regularly fought for dominance.
Since Shekau's death following infighting with ISWAP in his Sambisa forest enclave, ISWAP has been fighting Boko Haram remnants who have refused to pay allegiance.
More than 40,000 people have been killed and two million have been displaced by Nigeria's conflict since it began in 2009, and the violence has spread over the borders to Niger, Chad and Cameroon.