At least 52 aid workers and civilians were killed on Tuesday when an air force jet accidentally bombed a camp in northeast Nigeria instead of Boko Haram militants, medical charity MSF said.
There was no official death toll from the military, which blamed "the fog of war" for the mistake, but one senior commander described the casualties from the air strike as "huge".
One local resident, Abba Abiso, told AFP: "At least 25 were killed and many more injured."
The medical charity Doctors Without Borders (MSF) said "at least 120 people were wounded and 52 killed following today's bombing", calling the attack "shocking and unacceptable."
The International Committee of the Red Cross (ICRC) said six Nigerian Red Cross members were among those killed while 13 others were injured.
Nigeria's President Muhammadu Buhari said in a statement he "received with regret" news of the bombing and said he sympathised with the families of the dead and injured.
The bombing comes as Nigeria's military claims further gains against the Islamic State group affiliate, pushing them out of captured territory and their remote bases in Borno.
Last month, the army said the conflict was in its final stages after nearly eight years of violence that has killed at least 20,000 and left more than 2.6 million others homeless.
'Fog of war'
Nigerian Army Major General Lucky Irabor, who heads operations against the militants, said the air force had been given coordinates of "Boko Haram terrorists" in the Kala-Balge area.
"Unfortunately the strike was conducted but it turned out that the locals somewhere in Rann were affected," he told reporters at a briefing in the Borno state capital, Maiduguri.
Irabor did not give casualty figures but said local staff from MSF and the ICRC were among those wounded.
"These are the result of fog of war," he added. "It is unfortunate. That is the reason why this war must come to an end."
Defence spokesman Rabe Abubakar in Abuja described the incident as "a mistake", adding: "We are actually in grief. It's unfortunate and it's really not intended."
Rann resident Abba Abiso suggested the error occurred as the military was targeting rebel fighters who had been flushed out of Boko Haram camps in the Sambisa Forest area of Borno.
"In recent weeks Boko Haram has moved base to Kala from Sambisa Forest and obviously a military jet mistook Rann for Kala and bombarded, killing many civilians," he added.
MSF and the ICRC said its teams were trying to provide emergency first aid at its facility in the camp and were stabilising patients to evacuate the wounded from the scene.
But Jean-Clement Cabrol, MSF's director of operations, condemned the error.
"This large-scale attack on vulnerable people who have already fled from extreme violence is shocking and unacceptable. The safety of civilians must be respected," he said.
Northeast Nigeria and particularly Borno state has faced severe food shortages as a result of the conflict and food distribution is vital, particularly in hard-to-reach rural areas.
In November last year, the United Nations warned that 75,000 children risked starving to death within months in the region if nothing was done.
Accidental bombings have occurred in the past: in March 2014 an air force jet killed five and wounded several others when it mistakenly hit Kayamla village in the Konduga area of Borno.
The fighter jet mistook the village for a Boko Haram camp during a night raid.
In January that year, the convoy of a Nigerian senator was fired on by an air force jet which mistook the six-vehicle convoy under police and military escort for Boko Haram fighters.
No one was hurt and the military described the incident as an "operational blunder".