At least 25 people were killed in two separate extremist attacks in northeastern Nigeria's Adamawa state, local sources told AFP on Thursday.
The attacks in the towns of Madagali and Hong in the border region with Cameroon, were attributed to Boko Haram extremists, whose fighters have been active in the area since the group began its violent insurgency in 2009.
"Gunmen we believed to be Boko Haram on many motorcycles... attacked the market. They opened fire on people and killed 21," a Madagali local government official told AFP about the Tuesday evening attack, on the condition of anonymity.
"We are still searching for more bodies as some might have died in the bush from gunshot wounds while trying to find safety."
The attackers also looted a market and stole food items and motorcycles, the source said.
Four others, including three troops, were killed in neighboring Hong, resident Ezekiel Musa told AFP.
"Boko Haram attacked us after they left the town. We saw the corpses of three soldiers and one woman was killed," Musa said.
"Now the town has security personnel but some of us have already started leaving the town because of fear of what happened."
State governor Adamu Umaru Fintiri condemned the attack without providing an official toll in a statement.
"We will not let terrorists undermine our efforts to restore peace and stability," the statement said. "I warn perpetrators: desist from these senseless attacks or face the full weight of our collective resolve."
Since 2009, the extremist insurgency in Nigeria, led primarily by Boko Haram and its rival faction, the ISIS West Africa Province (ISWAP), has left more than 40,000 dead and two million displaced in the northeast of the country, according to the UN.
The conflict has spread to neighboring Niger, Chad, and Cameroon, prompting the formation of a regional military coalition to fight these groups.