The fighting, which began on Friday, sent people fleeing into the arid scrublands surrounding the community on Lake Chad.

Homes, businesses and vehicles were burned throughout the area.

Nigerian President Goodluck Jonathan has ordered a "full-scale investigation into reports of high civilian casualties.'' a statement from his office said.

The assault marks a significant escalation in a long-running insurgency in the predominantly Muslim north, where Boko Haram has been blamed for scores of attacks since 2009.

Boko Haram, which means "Western education is forbidden" in the Hausa language of Nigeria's north, has said it wants its imprisoned members freed and Nigeria to adopt strict Islamic law.

UN condemnation

UN chief Ban Ki-moon was "shocked" by the high toll and the "homes destroyed, as a result of violence between military forces and an extremist group" around Baga, his spokesman Martin Nesirky said.

Ban called on "all extremist groups to cease their attacks".

Brigadier General Austin Edokpaye said the Boko Haram fighters used heavy machine guns and rocket-propelled grenades in the assault, which reportedly began after soldiers surrounded a mosque they believed housed members of the group.

Edokpaye said they used civilians as human shields during the fighting, implying that soldiers opened fire in neighbourhoods where they knew civilians lived.

"When we reinforced and returned to the scene the terrorists came out with heavy firepower, including [rocket-propelled grenades], which usually has a conflagration effect," the general said.

However, local residents said soldiers purposefully lit fires in neighbourhoods where they knew civilians were hiding.

'Picking corpses'

Leading domestic and international rights groups, including Amnesty International and Human Rights Watch, have accused Nigerian soldiers of massive abuses in operations against Boko Haram, including summary executions.

Such allegations have been denied.

On Sunday afternoon, the burned bodies of cattle and goats still filled the streets in Baga. Bullet holes marred burned buildings. Fearful residents of the town had begun packing to leave with their remaining family members before nightfall.

"Everyone has been in the bush since Friday night; we started returning back to town because the governor came to town today," grocer Bashir Isa said.

"To get food to eat in the town now is a problem because even the markets are burnt. We are still picking corpses of women and children in the bush and creeks."

The insurgency in Nigeria grew out of a 2009 riot led by Boko Haram members in Maiduguri, which ended in a military and police crackdown that killed around 700 people. The group's leader died in police custody in an apparent execution.

Shootings, suicide bombings and other attacks carried out by the group have killed at least 1,548 people before Friday's attack, according to an AP tally.

Fighters suspected to belong to Boko Haram also have been seen in northern Mali, where heavily armed rebels took power last year in the weeks following a military coup.

Analysts say Boko Haram may acquire weapons smuggled out of Libya following its recent civil war.

Despite the deployment of more soldiers and police to northern Nigeria, the nation's weak central government has been unable to stop the killings.