The Supreme Court on Thursday granted interim bail to 13 prisoners lodged in Agra jail for a period ranging from 14 years to 22 years despite being juveniles at the time of offence, reported Live Law.

A bench of Justices Indira Banerjee and V Ramasubramanian passed the order on a plea by the convicts seeking immediate release.

Advocate Garima Prashad, appearing for the Uttar Pradesh government, did not oppose the bail plea but said that individual facts about the convicts need to be verified before their release. She cited an Allahabad High Court order which asked to identify those who might not have been juvenile. Prashad sought two weeks’ time to file a counter-affidavit.

Advocate Rishi Malhotra, representing the petitioners, told the court that the case was of “illegal detention”. He submitted that while statutory criminal appeals in most of the 13 cases were pending before the Allahabad High Court, the convicts should be released as they had declared to be juveniles and had also served the maximum period of detention under the Juvenile Justice Act, which is three years, Live Law reported.

In their plea, the petitioners cited a May 2012 Allahabad High Court order, directing the Juvenile Justice Board to hold an inquiry to determine the age of the prisoners. The board had found that the prisoners were juveniles at the time of offence. The petitioners said that despite the board’s ruling, the Uttar Pradesh government did not take any steps for their release.

While filing the plea in June, Malhotra had said that the petitioners had spent years in “hardcore jails” among “hardcore criminals”, reported The Hindu. “This completely negates the purpose and objects of Juvenile Justice Act,” the petition said. It also argued that a delay in raising the ground of juvenility could not be a reason to let the prisoners be lodged in jail for years.

An accused can claim to be a juvenile during the trial or any time after conviction and sentence, according to The Hindu. If the claim is found to be true, the court should maintain the conviction but remove the sentence and send the case to the Juvenile Justice Board.