At least 39 people have died in clashes between security forces and a radical Islamist group in the north-eastern Nigerian city of Bauchi, officials say.
The clashes occurred after dozens of men armed with guns and explosives attacked a police station.
They were repelled and security forces responded by attacking a settlement on the edge of the city, reports said.
Authorities said the militants belonged to Boko Haram, a group that wants Sharia law imposed across Nigeria.
Islamic law has been in effect in the state of Bauchi since 2001.
The city of Bauchi has been placed under curfew following Sunday's clashes and the Nigerian military are controlling roads leading into the area, the BBC Caroline Duffield reports from Nigeria.
After the attack on the police station early on Sunday locals counted five dead bodies at the scene.
When police retaliated with an attack on the settlement many more were killed in an exchange of gunfire, with dozens reported to have been injured.
Reuters, citing hospital sources and witnesses, put the death toll as high as 50.
The police spokesman, Mohammed Barau, said the situation had been brought under control and that more than 150 people had been arrested.
One gang member, who gave his name as Abdullah, told Reuters the group had retaliated because authorities had been arresting its leaders.
The man was also quoted as saying that the group wanted to "clean the [Nigerian] system which is polluted by Western education and uphold Sharia all over the country".
In the local Hausa language Boko Haram means "Western education prohibited".
People in Bauchi say it is a Muslim sect that has been operating for months and recruiting young men, our correspondent says.
They describe the followers as conservative and strict, refusing to mix with local people, and opposed to Western education, Western culture, and science.
Police say they had arrested members of the group because they were investigating reports that the group was arming itself, our correspondent adds.
Authorities have displayed weapons they say were seized from the group, including locally made hunting guns, crossbows, machetes and army uniforms.
In February, Bauchi was the scene of clashes between Muslim and Christian communities, which left four people dead.
Nigeria's 140 million people are split almost equally between Muslims and Christians and the two groups generally live peacefully side by side.