The crowd was angry that the police not only refused to register a case, but also refused to send the victim for a medical examination.
Sensing that the situation might get out of control, the DM ordered a medical examination of the woman.
The state government also intervened midnight and suspended six policemen, including circle officer (CO) of Shahpur.
The situation was brought under control Saturday, though additional police force has been deployed, an official told IANS.
Muzaffarnagar in western Uttar Pradesh was the scene of communal riots in September 2013, leaving 63 dead and thousands homeless.
The riots had started after the police let off some youths accused of molesting a girl. When the brothers of the girl protested, they were shot dead.