If a relative has been arrested and a magistrate has already sent them to custody, a habeas corpus petition will usually not help. Once a competent court passes a remand order, the detention becomes judicial custody backed by a court order, and the right remedy is to apply for bail, not to file a writ of habeas corpus. This single distinction decides whether your petition is even heard.
Below is a plain-English guide to what habeas corpus is, why it stops being available once there is a valid remand order, and what to do instead.
What habeas corpus actually means
"Habeas corpus" is Latin for "you shall have the body". It is a constitutional remedy that asks a court to direct whoever is holding a person to produce that person and justify the detention. If the detention has no legal basis, the court orders release.
In India you can seek it under:
- Article 32 of the Constitution (before the Supreme Court), and
- Article 226 (before a High Court).
It is one of the strongest protections of personal liberty under Article 21. But it is designed for one specific problem: detention that is illegal from the start or has no lawful authority behind it. It is not a general-purpose tool to undo every arrest.
Four constitutional provisions frame the remedy and mark out its limits.
Article 32
The remedy before the Supreme Court, asking a court to direct whoever is holding a person to produce them and justify the detention.
Article 226
The same remedy before a High Court. If the detention has no legal basis at all, the court orders the person released.
Article 21
Habeas corpus is one of the strongest protections of personal liberty, but it is designed for detention that is illegal from the start.
Article 22(2)
Requires production before the nearest magistrate within twenty-four hours of arrest, mirrored by Section 58 of the Bharatiya Nagarik Suraksha Sanhita, 2023.
Why a remand order changes everything
The moment a person is produced before a magistrate and the magistrate passes a remand order authorising police or judicial custody, there is a judicial order standing behind the detention. The custody is no longer the police acting on their own; it is custody sanctioned by a court.
The Supreme Court stated the principle squarely in Manubhai Ratilal Patel v. State of Gujarat, decided on 28 September 2012. A writ of habeas corpus is not to be entertained where a person has been committed to judicial or police custody by a competent court, by an order that does not prima facie appear to be without jurisdiction, passed in an absolutely mechanical manner, or wholly illegal. The reasoning runs on three tracks:
- The detention is supported by a valid judicial order, so it is not "illegal detention".
- Allowing habeas corpus would let the writ court sit in appeal over the magistrate's remand decision, which is not its role.
- The statute already provides a remedy, bail, and you must use it.
Put simply: a writ court will not be used to bypass the ordinary criminal process when that process is functioning.
Key takeaway. Ask one question before choosing a remedy: is there a court order authorising this custody? If yes, the fight is about bail, before the Magistrate, the Sessions Court and then the High Court. If no, or if the order is a rubber stamp passed without any application of mind, habeas corpus is live. Families lose weeks by choosing the dramatic-sounding writ when the boring bail application is the one that gets someone out.
Cognizance, and what it means here
"Taking cognizance" is the formal point at which a court applies its mind to an offence and decides to proceed against the accused. Once that happens, and certainly once remand follows, the case is firmly within the criminal court's hands. Liberty is then governed by the bail provisions, not by writ jurisdiction.
When habeas corpus IS still maintainable
Habeas corpus does not vanish entirely. It remains a live remedy where the detention itself is without legal authority. Common situations:
- No remand, or detention beyond 24 hours without production before a magistrate. Article 22(2) of the Constitution requires production before the nearest magistrate within twenty-four hours of arrest, and Section 58 of the Bharatiya Nagarik Suraksha Sanhita, 2023 says in terms that a person arrested shall not be detained more than twenty-four hours.
- The remand order is wholly without jurisdiction, non-existent, or, in the language of Manubhai Ratilal Patel, passed in an absolutely mechanical manner. A remand recorded without the accused being produced, or without any material, is vulnerable on exactly this ground.
- Preventive detention challenges, for example under the National Security Act or state goonda and similar laws, where habeas corpus is the standard route.
- A missing person or unlawful confinement by private individuals, or by the State without any legal process.
- Continued detention after bail has been granted or after a release order.
The thread running through all of these is the same: no valid order justifies the custody.
Habeas corpus vs regular bail, a comparison
| Feature | Habeas corpus (Art. 32 / 226) | Regular bail (BNSS) |
|---|---|---|
| Core question | Is the detention legal at all? | Should the accused be released pending trial? |
| When it fits | Illegal or unauthorised detention, no valid order | Custody under a valid remand or court order |
| After remand and cognizance | Usually not maintainable | The correct remedy |
| Court | Supreme Court or High Court | Magistrate, Sessions Court or High Court |
| Looks at merits of bail? | No | Yes: gravity, evidence, flight risk and so on |
| Typical outcome if wrong remedy chosen | Petition dismissed as not maintainable | Heard on merits |
The remedies you should actually use
If your family member is in custody under a remand order, these are the standard routes. Discuss the right sequence with a criminal lawyer.
Regular bail
Filed once a person is in custody. In a non-bailable offence the power sits in Section 480 BNSS before the Magistrate, and in Section 483 BNSS, the special powers of the High Court or Court of Session. In a bailable offence, Section 478 BNSS makes bail a matter of right, and the accused should not be left in custody at all.
Anticipatory bail
Filed before arrest if you fear arrest in a non-bailable offence, under Section 482 BNSS, which is the successor to Section 438 of the CrPC. It is bail in anticipation of arrest and is granted on conditions. Our guide to anticipatory bail in India covers how it is argued.
Statutory or default bail
Under the proviso to Section 187(3) BNSS, a magistrate cannot authorise detention beyond ninety days where the investigation relates to an offence punishable with death, life imprisonment or imprisonment for ten years or more, and beyond sixty days for any other offence. On the expiry of that period the accused shall be released on bail if he is prepared to and does furnish bail. This is a powerful, often-missed right. See our note on default bail when the charge-sheet is not filed.
Release of a long-detained undertrial
Section 479 BNSS is new and badly under-used. Where a person has undergone detention up to one-half of the maximum sentence for the offence (one-third for a first-time offender, who is released on bond), the court shall release them on bail, except for offences carrying death or life imprisonment. The Superintendent of the jail is under a statutory duty to apply to the court once that one-half or one-third mark is crossed. If the family does not know the provision, nobody may push it.
Challenging an illegal remand
Where the remand order itself is defective, or the arrest violated mandatory safeguards such as the right under Section 47 BNSS to be informed of the grounds of arrest and of the right to bail, or the duty under Section 48 BNSS to inform a relative or friend, the route is usually to challenge it before the appropriate court. Only in genuinely lawless detention does habeas corpus apply.
Deadline warning. Default bail is not a right you can claim whenever you get around to it. It accrues the moment the sixty or ninety day period expires without a charge-sheet, and it survives only until the charge-sheet is filed. The Supreme Court has consistently held that once the charge-sheet is on record the right does not survive. In practice the police often file on day fifty-nine or day eighty-nine. Diarise the arrest date, count the days, and have the application and the surety ready before the window closes.
Where a valid remand order already exists, these are the provisions that actually move a person out of custody.
Section 478 BNSS
In a bailable offence bail is a matter of right, and the accused should not be left in custody at all.
Sections 480 and 483 BNSS
In a non-bailable offence the power sits with the Magistrate, and with the High Court or Court of Session under the special powers.
Section 187(3) BNSS
Default bail. Detention cannot be authorised beyond ninety days where the offence carries death, life imprisonment or ten years, and sixty days otherwise.
Section 479 BNSS
An undertrial who has served one-half of the maximum sentence, or one-third as a first-time offender, shall be released, except on death or life offences.
The law: CrPC to BNSS renumbering
India's criminal procedure has been overhauled. The old Code of Criminal Procedure, 1973 (CrPC) has been replaced by the Bharatiya Nagarik Suraksha Sanhita, 2023 (BNSS), and the Indian Penal Code, 1860 by the Bharatiya Nyaya Sanhita, 2023 (BNS). Section numbers have changed:
| Concept | Old (CrPC, 1973) | New (BNSS, 2023) |
|---|---|---|
| No detention beyond twenty-four hours | s. 57 | s. 58 |
| Production before magistrate, remand, default bail | s. 167 | s. 187 |
| Bail in a bailable offence | s. 436 | s. 478 |
| Release of long-detained undertrial | s. 436A | s. 479 (one-half, or one-third for a first-time offender) |
| Bail in a non-bailable offence | s. 437 | s. 480 |
| Anticipatory bail | s. 438 | s. 482 |
| Special bail powers of High Court or Sessions | s. 439 | s. 483 |
| Inherent powers of the High Court | s. 482 | s. 528 |
Note the trap in the last two rows: Section 482 meant inherent powers under the CrPC and means anticipatory bail under the BNSS. Note also that pending cases may still run under the old CrPC depending on when the proceedings began, so confirm which code governs your matter.
What this means for you in practice
- Do not reach for a writ if there is a remand order. It will likely be dismissed as not maintainable, costing you time while the person stays in custody.
- Move fast on bail. The right court, the right provision, and a well-prepared application matter more than the dramatic-sounding writ.
- Watch the investigation clock. Default bail under Section 187(3) can be the quickest route out if the charge-sheet is delayed.
- Track the case yourself. Case status, the next hearing date and the progress of a bail application can be checked by any family member on the national eCourts Services portal.
- Keep habeas corpus for genuinely lawless detention: no production, preventive detention, a mechanical remand, or custody continuing after a release order.
If you are unsure which door to knock on, that is exactly the judgment a criminal lawyer brings. Our criminal defence and prosecution practice explains how we approach these matters.
Common mistake. Filing a habeas corpus petition because the family is told it is faster. It is not faster if it is not maintainable. A petition dismissed on maintainability after three weeks has bought nothing except three weeks in custody, and the bail application you should have filed on day one is still unfiled. Use the writ where the custody has no lawful order behind it, and use bail everywhere else.
Frequently Asked Questions
My brother was arrested and the court sent him to jail custody. Can I file habeas corpus?
Usually no. Once a magistrate passes a remand order, the custody is backed by a court order, so habeas corpus is generally not maintainable. The proper remedy is to apply for regular bail under Section 480 or Section 483 of the BNSS.
What is the difference between illegal detention and judicial custody?
Illegal detention has no lawful order behind it. Judicial custody is detention authorised by a court through a remand order. Habeas corpus targets the first; bail addresses the second.
When can habeas corpus still be filed in a criminal matter?
Where there is no valid order: no production before a magistrate within twenty-four hours, a remand order without jurisdiction or passed in an absolutely mechanical manner, detention continuing after bail or a release order, or preventive detention cases.
What is default bail and when do I get it?
Under the proviso to Section 187(3) BNSS, if the investigating agency does not file the charge-sheet within ninety days (offences punishable with death, life imprisonment or ten years or more) or sixty days (any other offence), the accused shall be released on bail if he is prepared to and does furnish bail, regardless of the merits.
Can I still claim default bail after the charge-sheet is filed?
Generally no. The right accrues on the default and continues until the charge-sheet is filed, but does not survive its filing. Apply the moment the period expires.
My relative has already spent a long time in jail without the trial finishing. Is there a remedy?
Yes. Section 479 BNSS requires release on bail once an undertrial has served one-half of the maximum sentence for the offence, or one-third if it is a first offence, other than for offences punishable with death or life imprisonment. The jail Superintendent is required to move the court, but it is worth pressing through your advocate.
Should I file bail before the Magistrate or directly in the High Court?
Ordinarily you start at the Magistrate or Sessions Court and approach the High Court under Section 483 BNSS if bail is refused. A lawyer will advise the correct forum for your specific offence.
Do the new BNSS section numbers apply to my case?
It depends on when the proceedings began. Pending matters may continue under the old CrPC. Always confirm the applicable code and provisions for your matter.
Is anticipatory bail the same as habeas corpus?
No. Anticipatory bail under Section 482 BNSS is sought before arrest when you fear arrest. Habeas corpus challenges an existing unlawful detention.
What should the family do in the first twenty-four hours after an arrest?
Find out the police station and the FIR number, insist on the grounds of arrest being furnished under Section 47 BNSS, confirm that a relative or friend has been informed as Section 48 BNSS requires, attend the production before the magistrate, note the remand date, and instruct an advocate the same day.
This article is for general informational purposes only and does not constitute legal advice. Laws change and every situation is different; please consult a qualified advocate about your specific matter. For the bare text of the Constitution and the Bharatiya Nagarik Suraksha Sanhita, 2023, see the official India Code portal.






