Around 15 Boko Haram fighters were killed when the jihadists attacked a town in northeastern Nigeria, two days after the air force accidentally killed dozens of people there, local and military officials said.
On Tuesday, the air force said it had bombed Rann in Borno state, epicentre of Boko Haram''s seven-year-long attempt to create an Islamic caliphate in the northeast.
Boko Haram fighters then attacked Rann - home to thousands of people displaced by the jihadists' insurgency - using two jeeps on Thursday night, residents said.
"We battled them for almost 30 minutes," Lieutenant Colonel Igwe Omoke, commander of the 3rd battalion based in Rann, told Reuters on Friday during a visit organized by the army.
"We suddenly saw residents running towards the battalion headquarters and we quickly mobilised troops," he said.
A Reuters reporter saw six dead Boko Haram fighters lying in front of the army base in Rann where many ramshackle huts had been destroyed by the air strike. The attackers had come from nearby Cameroon, less than ten kilometres away, officers said.
The air strike killed more than 200 people, more than the up to 170 reported dead by aid group Medecins Sans Frontieres (MSF) on Friday, a local official said.
"People have suffered enough. We buried more than 200 people," said Babagana Malarima, head of the local government in Rann. "The military should compensate our people."
Other residents asked by Reuters put the death toll at around 180 or fewer. The army has refused to say how many were killed.
The Boko Haram insurgency has killed more than 15,000 people since 2009 and forced some two million to flee their homes.
The Nigerian army, backed up by neighbours, have retaken most areas held by the group. But the jihadists still operate in the area of Rann, slipping over the porous Cameroon border after attacks.
The militant group has stepped up attacks and suicide bombings in the past few weeks as the end of the rainy season facilitates movement in the bush.
The group split in two last year, with one faction led by Abubakar Shekau from the Sambisa forest and the other, allied to Islamic State and led by Abu Musab al-Barnawi, based in the Lake Chad region.