A top rights group said the government forces had killed bystanders and other civilians. A military spokesman denied the charge and said it was impossible for rights workers to tell who was a civilian and who was a member of the Boko Haram sect, which the government blames for instigating days of violence in the mostly Muslim region.
The government warned people to evacuate the area, then shelled and stormed the group's mosque and headquarters Wednesday night, setting off a raging firefight with retreating militants armed with homemade hunting rifles, firebombs, bows and arrows, machetes and scimitars.
An AP reporter saw soldiers shoot their way into the mosque under fire and then rake those inside with gunshots. The reporter later counted about 50 bodies inside the building and another 50 in the courtyard outside.
The bodies of barefoot young men littered the streets of Maiduguri, the capital of Borno state, on Thursday morning as the army pursued the manhunt on the outskirts of the city. Police said most of the dead were fighters with Boko Haram, which means "Western education is sin" in the local Hausa language. Army Col. Ben Anahotu said three police officers were killed.
Seeking to impose Islamic Shariah law throughout this multi-religious country, the militants attacked police stations, churches, prisons and government buildings in a wave of violence that began Sunday in Borno and quickly spread to three other northern states.
As of Wednesday, officials said at least 4,000 people have been forced from their homes but it was not known how many people have been killed, wounded and arrested.
President Umaru Yar'Adua said that security agents had been ordered to attack when the movement started gathering fighters from nearby states at its sprawling Maiduguri compound in preparation for "the holy war."
The militants are also known as Al-Sunna wal Jamma, or "Followers of Mohammed's Teachings," and some Nigerian officials have referred to them as Taliban. Analyst Nnamdi K. Obasi of the International Crisis Group said a few have fought with that radical movement in Afghanistan.
Sect leader Mohammed Yusuf escaped Wednesday's government attack along with about 300 followers, according to Army commander Maj. Gen. Saleh Maina. His deputy, Bukar Shekau, was killed, Maina said, pointing to the body of a plump, bearded man lying with four other corpses in a large house near the mosque.
"The mission has been accomplished," he said.
Military officials in the capital, Abuja, said that the military was in control of Maiduguri. Maina said his troops would fire mortar shells later Thursday to destroy what was left of the Boko Haram compound, which stretches over 2.5 miles (4 kilometers).
League for Human Rights director Shamaki Gad Peter said that after the siege rights workers saw the bodies of up to 20 people who were unarmed and appeared to have been shot from behind, possibly trying to escape the mayhem, he said.
Military spokesman Col. Mohammed Yerima initially denied allegations that the military intentionally killed civilians but said that the militants were indistinguishable from civilians.
"All the civilians that were living in that place were evacuated, to our knowledge," he said. "And those that remained in that enclave are loyalists and members of the group. So the issue of whether we have killed innocent civilians is not true."
He added, "The issue of identifying who is the Taliban or not, the human rights groups are not fair to security agencies because they don't have any marks on their faces. There is no way to know if this is Taliban or this is not."
Maiduguri resident Linda Dukwa said she had seen police execute two men Monday, frightening her and her family so badly that they did not venture out of their house, even for food, for days afterward.
The men "were dressed in white robes," she said, indicating they were sect members. "They were held by policemen. Then they shot their feet. After they fell on the ground, they (police) shot their heads."
National police spokesman Emmanuel Ojukwu denied such allegations of executions.
"We respect the rules of combat," he said.
Nigeria's 140 million people are roughly divided between Christians in the south and northern-based Muslims. Shariah was implemented in 12 northern states after Nigeria returned to civilian rule in 1999 following years of oppressive military regimes. More than 10,000 Nigerians have died in sectarian violence since then.
Dire poverty is at the heart of the violence, which analysts say reflects decades-old grievances of Nigerians whose governments are so corrupt and ineffective they do not deliver even basic services like running water and electricity.
Many government leaders are Christians.
Boko Haram members are particularly angry that full Shariah has not been implemented, especially the law's demand for a social welfare system helping poor people.
In recent months, police have been raiding militant hideouts and finding explosives and arms. The house at the compound in Maiduguri included a laboratory the military said was used to make bombs.
Men in Bauchi state and in Maiduguri, meanwhile, started trimming and even shaving off their beards, fearful that security forces could mistake them for religious fanatics.
In violence elsewhere, Nigeria's Vanguard newspaper reported that militants attacked security forces in Yobe state on Wednesday, and quoted police as saying that 43 sect members were killed in a shootout near the city of Potiskum.
Police in Bauchi state have reported 42 people killed, including two soldiers and a police officer, 67 hospitalized with serious injuries and 157 men arrested.
In the city of Kano, the local government bulldozed a mosque and the house of a sect leader on Wednesday, saying it was an illegal structure, just days after sect militants attacked a Kano police station. Kano police spokesman Baba Mohammed said more than 50 militants have been arrested, with five shot and killed during the arrests.
U.N. Secretary-General Ban Ki-moon expressed concern at the reports of sectarian violence and called for those responsible to be brought to justice.
"I call upon the leadership of the government of Nigeria, law enforcement and security agencies, as well as the religious and community leaders to work together to address the underlying causes of the frequent religious clashes in Nigeria, so that a resolution could be found through dialogue, tolerance and also understanding," he told a news conference at U.N. headquarters in New York.