India's Supreme Court has said no person should be described as a terrorist and arrested simply "because he belongs to a minority community".
The court made the remarks while freeing 11 people who were charged with planning religious violence during a Hindu festival in Gujarat state.
The men were held under India's tough anti-terrorist laws.
Police in India have been often criticised for using the laws to indiscriminately arrest people.
Many of them are eventually acquitted because of a lack of evidence against them.
The court was ruling on a 1994 case involving the arrest of a Muslim man and 10 others by the Gujarat police for allegedly planning religious riots targeting the Hindu community during a festival.
Referring to the now repealed Terrorist and Disruptive Activities Prevention Act, also known as Tada, the court said the police must not do "anything which allows its misuse and abuse, and [must] ensure that no innocent person has the feeling of sufferance..."
The court said it appreciated "the anxiety of the police officers entrusted with preventing terrorism and the difficulty faced by them... This task becomes more difficult when it is done by organised groups with outside support".
But, it said, the "means are more important than the end... [and] invoking the Tada without following the safeguards, resulting in acquittal, gives an opportunity to many and also to the enemies of the country to propagate that it has been misused and abused".