Nigeria's military says a fighter jet has mistakenly bombed a refugee camp in the country's northeast, killing dozens of people and wounding scores more, according to aid workers.

The incident occurred on Tuesday at about 9am local time (08:00 GMT) in Rann, in the far north of Borno state, the epicentre of Boko Haram's armed campaign, as humanitarian workers distributed food to civilians.

Nigeria's air force said a fighter jet was on a mission against Boko Haram fighters when it accidentally struck the camp and killed an unknown number of refugees and aid workers.

But in a statement, aid group Doctors Without Borders (MSF) said the strike had killed at least 50 people and wounded 120.

MSF and the International Committee of the Red Cross (ICRC) were operating at the camp when it was hit.

The ICRC said via Twitter that six of the dead and 12 of the wounded were working for the Nigeria Red Cross.

A senior military source in the Borno state capital, Maiduguri, told AFP news agency the casualties were "huge", adding: "A fighter jet hit the wrong target."

Probe launched

Nigerian military commander, Lucky Irabor said the accidental bombardment killed "some" civilians and wounded aid workers, including some Nigerians working for MSF and ICRC.

He said two soldiers were wounded, but he did not have a final toll.

Irabor said he ordered the mission going on geographic coordinates for an alleged gathering of Boko Haram fighters. It was too early to say if a tactical error was made, he said.

INSIDE STORY: Has Boko Haram been defeated? (24:59)

The general, who is the theatre commander for anti-Boko Haram operations in northeast Nigeria, said the air force would not deliberately target civilians, but there will be an investigation.

"Senior military officials say an investigation will be launched to find out exactly what happened, if there was any mistake on the part of the pilot or those conducting the operation," Al Jazeera's Ahmed Idris, reporting from Nigeria's capital, Abuja, said.

France-based MSF said its workers were trying to provide emergency first aid at its facility in the camp and were stabilising patients to evacuate the wounded from the scene.

"Our medical and surgical teams in Cameroon and Chad are ready to treat wounded patients. We are in close contact with our teams, who are in shock following the event," it added.

INTERACTIVE MAP: Boko Haram attacks

Manji Cheto, a security analyst, told Al Jazeera that despite recent improvements in the fight against Boko Haram, the latest incident "reaffirms the fact that Nigeria still has so much way to go in terms of boosting the intelligence capacity of its security forces in dealing with this.

"The timing is rather unfortunate as well because this is coming on the back of the government actually facing a lot of criticism for doing too little for the internally displaced camps."

The war between Boko Haram and the Nigerian government has killed more than 20,000 people in the past six years. Some two million have also been forced to flee their homes, many of whom have moved to camps because it has been too dangerous to return home.

The air strike came amid an offensive against the armed group by Nigeria's military over the last few weeks.

President Muhammadu Buhari said last month a key camp in the group's Sambisa Forest base in Borno state had fallen.