Police in India say a mysterious cult at the centre of deadly clashes was running its own pseudo-government, army, court and a prison where torture was the norm.

Around 3,000 followers of the sect clashed with police in the northern state of Uttar Pradesh during an eviction operation, leaving 24 people dead, including two senior officers.

The secretive sect had occupied a 109-hectare stretch of parkland since late 2014, with the site almost entirely closed off to the outside world, the top police inspector general of the region said.

"They set up a township of sorts with all kinds of people. Gradually, they started running a self-government," DC Mishra said, after officers seized documents and other evidence from the camp.

"They set up a court which pronounced punishments and jail barracks where inmates were tortured.

"Children as young as eight years old were being given training in arms."

Police in the city of Mathura came under fire on Thursday night from members of the sect, who were armed with automatic weapons and hurled crude explosive devices during the violence.

Inspector Mishra said the cult was being run by self-styled Hindu "godmen" whose aim was to drive followers towards a kind of "religious terrorism".

"They were also planning to come out with their own currency soon and they did not believe in the Indian constitution," he said.

In postings on social media, the sect's followers describe themselves as political and social revolutionaries. Their demands include the abolition of elections and cheaper fuel for everyone.

India is home to hundreds of semi-religious sects which are often led by charismatic self-styled "godmen".

In 2014, hundreds of armed supporters from another sect clashed with police in the northern state of Haryana during a raid to arrest their leader who faced murder allegations. At least six people died in the violence.

AFP