The violence stemmed from objections to the police removing iron railings erected along a road outside a mosque.