At least 85 civilians were killed in Kaduna state, north-west Nigeria, in an air strike during a Muslim religious celebration on Sunday, the local emergency management authority said.
The civilians were killed in a "bombing mishap", President Bola Tinubu said without giving a death toll.
State Governor Uba Sani said they were "mistakenly killed" by a military drone "targeting terrorists and bandits".
More than 60 people were admitted to hospital for treatment, officials said.
The defence ministry termed the operation a "needless tragedy" adding that a routine mission against militants "inadvertently affected members of the community".
Nigeria's military has for years been battling armed criminals and militants who have been operating in parts of northern Nigeria, raiding villages and kidnapping residents for ransom.
Defence spokesman Maj Gen Edward Buba said Sunday's airstrike was based on credible intelligence about the presence of "terrorists" in the area.
President Tinubu has asked for a "thorough and full-fledged investigation into the incident and calls for calm while the authorities look diligently into the mishap" a statement from his office said. The governor has also called for an investigation.
The airstrike happened when villagers from Tundun Biri gathered for a religious festival on Sunday evening.
"The Northwest Zonal Office has received details from the local authorities that 85 dead bodies have so far been buried while a search is still ongoing," a statement from the National Emergency Management Agency in the federal capital, Abuja, said.
"It is worthy of note that the casualties ranged from children, women and the elderly." The death toll has not been confirmed and estimates vary from 30 to more than 85.
One man, who witnessed what happened, told the BBC's Hausa service, that there were two attacks.
"The aircraft dropped a bomb at the venue, it destroyed and killed our people including women and children," he said.
"The second bomb was dropped on some of us who went to bring dead bodies of the victims of the first blast. We lost about 34 people in my family and we have 66 injured people in the hospital."
A woman who saw the aftermath of the bombing told the BBC that bodies were strewn all over the place.
"Some women died holding their babies, some of the babies survived while others died along with their mothers," she said.
The Nigerian military has in the past been accused of causing civilian casualties while battling militia gangs, known locally as bandits, in the north-west of the country. The government has labelled the gangs "terrorists".
In 2021, at least 20 fishermen were killed accidentally in a Nigerian fighter jet strike on a jihadist camp in northeast Nigeria.
Over 300 people have been killed since 2017 in accidental strikes by the Nigerian forces, a report by SB Morgen, a research firm, said.