At least 24 people were killed in clashes when police attempted to evict thousands of people illegally squatting in a makeshift protest camp in a northern Indian city Friday. The police retaliated after being shot at from treetops.

In April, the High Court in Allahabad in the north Indian state of Uttar Pradesh ordered the occupiers to clear Jawahar Bagh in the city of Mathura, 85 miles southeast of the national capital New Delhi. When they refused, police obtained a court order for eviction and sent a group of officers Thursday to drive out the squatters.

The Associated Press reported more than 370 people have been arrested for their alleged part in the violence. Gas cylinders being used by the protesters for cooking exploded and ignited a fire that killed 11 people, according to the state’s Additional Director General of Police (law and order) Daljit Chaudhary.

Mukul Dwivedi, superintendent of police, who was leading the eviction drive, was hit on the head with a stone. He died in hospital after three heart attacks, local news networks reported. His colleague, Santosh Kumar Yadav, was shot in the head. More than 100 people have been reported injured, including 23 police officers.

The occupiers were reportedly members of a sect known as Swadhin Bharat Vidhik Satyagrah and had been occupying the area since late 2014. Over time, however, thousands of men, women and children started to use the park as a makeshift home.

“We knew they had firearms, but we didn't expect them to fire at us the way they did,” Javed Ahmed, director general of the state police, reportedly said. “They appeared to be well-trained in handling arms.”

After the initial attack on the policemen, 500 reinforcements were sent in. More than 170 rifles and 40 homemade revolvers were seized. The police Friday continued the search for more weapons and suspects.

The chief minister of Uttar Pradesh, where Mathura is located, has ordered an inquiry and assured that the strictest action will be taken. “The culprits will not be spared at any cost. The police had gone there to vacate land following court orders,” Akhilesh Yadav reportedly said.