Nigerian police in the northern state of Jigawa have arrested 25 youths after violence erupted between Muslims and Christians in the state capital, Dutse.
At least six churches and dozens of shops were set on fire.
The state authorities believe the trouble began when a Christian market trader insulted the Prophet Muhammad in the presence of a Muslim customer.
Protesters gathered outside the palace of the chief official in the district, demanding the woman be punished.
Police said many Christian residents had taken shelter in the police barracks.
A curfew has been imposed on Dutse, Jigawa's state capital, and the town is reported to be calm after Wednesday's riots.
After rumours spread that the female trader had blasphemed against the Prophet Mohammed, police used teargas to disperse the demonstrators, which prompted groups of youths to go through the town attacking and looting shops and burning some church buildings.
A number of people were injured - all but one of them have now been discharged from hospital.
The BBC's Alex Last in Lagos says that despite the religious veneer, such disturbances tend to be less about religion and more about poor or unemployed youths seeing an opportunity to loot.
Nigeria, which is split between Muslims and Christians, has a history of sectarian and ethnic clashes but often the violence is rooted in economic deprivation and stirred up by local politicians for their own political ends.
Nevertheless, our correspondent says, with elections approaching, any disturbance is a worrying reminder of just how easy it can be for violence to erupt.