(Reuters)

The Nigerian air force on Tuesday bombed a crowded town full of people who had fled Islamist militants, killing more than 50 in what was described as a mistake by pilots targeting Boko Haram fighters.

The bombardment occurred in the town of Rann, near the Cameroon border, one of the places where more than 2 million victims of Boko Haram have sought shelter in recent years as part of one of the world’s largest humanitarian crises.

More than 100 people were injured, and humanitarian workers who had been helping the roughly 25,000 displaced people in Rann were among the dead, aid officials said.

Boko Haram, a radical Islamist group previously linked to al-Qaeda, has killed an estimated 20,000 people since 2009, making it one of the world’s bloodiest terrorist groups. It pledged allegiance to the Islamic State nearly two years ago.

Nigerian Maj. Gen. Lucky Irabor confirmed the strike, telling reporters that it was accidental and that the death toll was still being assessed.

Doctors Without Borders, a humanitarian group, said at least 52 people were killed and 120 wounded. Officials from the group said they expected that more of the victims could die of their wounds because of the limited health-care capacity in Rann, a town of ramshackle buildings and makeshift tents.

Only eight medical personnel are treating victims there, said Hugues Robert, an emergency program manager for Doctors Without Borders in Nigeria.

“We have nothing for dealing with this number,” he said.

Robert said his staff reported two strikes at around noon Tuesday, in a location with many civilians but tightly controlled by the Nigerian army.

“This is not a battlefield, not a disputed area,” he said. “It is a place controlled by government forces. It’s not a place where insurgents hide. It doesn’t make sense.”

Six staff members or volunteers working with the Nigerian Red Cross were killed and 13 were wounded, said Jason Straziuso, a spokesman for the International Committee of the Red Cross.

According to Irabor, the bombardment occurred during an operation to target Boko Haram militants, who have been fighting for years in parts of northern Nigeria and surrounding countries to impose strict Islamic codes.

“Unfortunately, the strike was conducted, but it turned out that other civilians were somewhere around the area and they were affected,” he told reporters in Maiduguri.

Nigerian President Muhammadu Buhari called the strike “a regrettable operational mistake.”

Last month, Buhari said the militants had effectively been defeated. But insurgents have been able to wage frequent attacks on both military and civilian targets across the region.

Much of the Nigerian military’s campaign against Boko Haram has been conducted using attack helicopters and fighter jets that fly over large swaths of the northeast.

That effort has long posed a human rights dilemma, as militants are frequently difficult to isolate from civilians held against their will in insurgent encampments. Some victims of Boko Haram have reported that the Nigerian military shot indiscriminately at those encampments during offensive operations, killing both militants and kidnapped civilians.

This is the first time during Nigeria’s campaign against Boko Haram that the military has acknowledged a large number of civilians killed in a mistaken bombardment. It remains unclear how the military could have mistaken a town with at least 25,000 inhabitants, surrounded by the military, for a terrorist enclave.

In Rann in recent months, the Nigerian military has battled Boko Haram fighters, who had attacked troops with improvised explosive devices, suicide bombers and ambushes.

As the war has continued, the United States has been considering the sale to Nigeria of 12 Super Tucano planes, which are used for aerial attacks and surveillance. The prospect has reinvigorated a debate in Washington about whether the Nigerian military should be trusted with the new aircraft in light of allegations that the forces commit human rights abuses.

“Alongside widespread and serious human rights abuses by the military over the last several years, this incident validates skeptical views of the pending sale,” said Carl LeVan, a professor at American University and expert on Nigeria. In recent years, more than 2 million people were displaced as Boko Haram militants invaded village after village, killing large numbers of men, kidnapping women and girls and frequently turning boys into child soldiers Without access to food, many of the displaced faced starvation. A military response, which included the militaries of nearby countries where Boko Haram had sought refuge, has been successful at forcing militants from their urban or semi-urban strongholds. But it left the insurgents dispersed across a vast landscape from which they could periodically stage attacks in urban areas.

Last year, Amnesty International reported that nearly 150 people, including children and babies, had died at the Nigerian military’s Giwa barracks in the northeastern city of Maiduguri, many of them of disease and hunger in overcrowded cells.

In Giwa and elsewhere in northeastern Nigeria, the military has often detained civilians who were once held by Boko Haram, accusing them of being sympathizers or “sleeper agents” for their former abductors.