Forty people were arrested after a mob threw stones at the old Hubli police station in Karnataka’s Dhaward district, NDTV reported on Sunday. Twelve police officers were injured in stone-pelting.

The violence took place after a man shared an objectionable post on social media about Muslims, according to Hubli-Dharwad Police Commissioner Labhu Ram. The man was subsequently arrested based on the complaints lodged by several Muslim persons.

However, the people were not satisfied with the action against the man and went on a rampage outside the police station, the police said.

The police baton-charged the persons in the crowd and also used tear gas to disperse it.

“Six cases have been registered against those involved in the violence,” Ram said. “The situation is under control now.”

Section 144 was imposed in the Hubli city following the incident, PTI reported. It prohibits the gathering of four or more people in the concerned or affected area.

“Twelve of our officers on duty were injured and some police vehicles were damaged,” Ram told PTI. “We have taken all precautionary measures so that such incidents do not occur again. We will not spare those who have taken the law into their hands.”

Meanwhile, Karnataka Chief Minister Basavaraj Bommai called it an “organised attack”, PTI reported.

“I want to tell very clearly that whoever takes the law into their hands, our police will not hesitate from taking stringent action against them [rioters],” Bommai was quoted as saying, PTI reported. “Whoever is behind it and instigated the mob will be punished. I want to tell the organisations behind such incidents, not to break the law. Karnataka state will not tolerate it.”

State Home Minister Araga Jnanendra said that one of the police officers was severely injured. “It was a pre-planned attack,” Jnanendra told PTI.

“Karnataka is a peace-loving state,” Union minister Shobha Karandlaje said, India Today reported. “We won’t allow Karnataka to become Kerala, West Bengal or Kashmir.”