The Supreme Court on Tuesday gave the Centre and the Assam government two weeks to discuss steps to prevent prolonged incarceration of illegal immigrants at detention centres, The Indian Express reported.

A bench of Chief Justice Ranjan Gogoi and Justices L Nageswara Rao and Sanjiv Khanna was hearing a petition filed by former bureaucrat Harsh Mander about the condition of detention centres. The court raised questions on the prolonged detention of illegal immigrants and said they should not lose their human rights.

Solicitor General Tushar Mehta, appearing for the state, told the bench that a system would be put in place to prevent this.

“Forty lakh persons were excluded from the Assam NRC [National Register of Citizens], but only 52,000 have been declared foreigners by the Foreigner Tribunals?” Gogoi asked Mehta, according to Live Law. “How can you expect people to have faith in your governance amidst this chaos?”

The bench said its attention would be required to focus on two matters – living conditions in detention centres and the justification behind the long detention of persons identified as foreigners or convicted under the Foreigners Act, 1946, pending deportation.

Last month, the Supreme Court had asked the Centre to submit details of the number of functioning detention centres in Assam, the number of foreigners detained there in the last 10 years and the length of their detention. Mehta on Tuesday told the court there were six detention centres in Assam, where 939 people are detained, including 823 foreign nationals.

Gogoi suggested that the government consider giving foreigners “refugee status” until steps are taken to deport them. Mehta, however, objected to it. “Those who are illegal migrants have to go,” he said, according to The Telegraph.

The chief justice said the government must take steps to deport illegal foreigners and ensure that if they are put in detention centres, it should be for only “a minimal point of time” and not for several years as was being done now.