In an urgent hearing held on Wednesday over the arrests of several activists across India, the Supreme Court said that as an interim measure, they should be kept under house arrest till 6 September.
However, the judges hearing the case criticised the action taken against the activists, who are known to be critical of the government.
NDTV reported Justice DY Chandrachud as saying, "Dissent is the safety valve of democracy. If you don't allow the safety valve, pressure cooker will burst."
The houses of several lawyers, academics and activists were raided on Tuesday in a country-wide crackdown and they were later arrested.
NDTV also reported that Varavara Rao, Sudha Bharadwaj, Arun Ferreira, Gautam Navlakha and Vernon Gonsalves would be put under house arrest after the police claimed that they have Maoist links.
The petition, filed by historian Romila Thapar and four others, asked for the immediate release of the activists.
The police have claimed that the arrests and the raids were made in relation to the violence in Bhima-Koregaon in January.
A five-judge Constitution bench headed by Chief Justice Dipak Misra heard the petitions on Wednesday afternoon.
Vrinda Grover, who is representing Bharadwaj, had accused the police of deliberately disregarding court orders.
She told Huffpost India, "The actions of the Pune police are absolutely shocking, particularly the brazenness with which they sought to ignore an order by the Punjab and Haryana High Court."