UPSCYatra
Daily Current AffairsPlaces in NewsPricing
UPSCYatra5.0 on Google
Prayagraj, Uttar PradeshChat on WhatsApp[email protected]

Explore

Prelims PYQMains PYQDaily current affairsGovernment reportsPlaces in NewsTopper answer copiesOptional Subject Topper Copies

Resources

UPSC SyllabusPrelims cut-offMains cut-offOverall cut-offNCERT BooksIUCN species in newsIndices & reportsUNESCO heritage sitesGovernment reports

Company

BlogPricingAbout usOur storyContact us

© UPSCYatra 2026

Privacy Policy and DisclaimerRefund Policy
Home/Blog/Difference between habeas corpus and mandamus

Difference between habeas corpus and mandamus

Habeas corpus challenges unlawful detention, and mandamus orders a public authority to perform a legal duty it has refused.

By UPSCYatra Editorial Team - Jun 5, 2026

Difference between habeas corpus and mandamus
Table of contents
  • Difference between habeas corpus and mandamus
  • At a glance
  • Example
  • Habeas corpus
  • Mandamus
  • Difference between habeas corpus and mandamus FAQs
  • What is habeas corpus?
  • What is mandamus?
  • What is the main difference between habeas corpus and mandamus?
  • Can mandamus be issued against the President to compel assent to a bill?
  • Can habeas corpus be issued only against the State?
  • Which writ is used to seek release from unlawful jail?
  • Key takeaway
  • PYQ linkage
  • Read about more comparisons

Habeas corpus orders that a person under illegal detention be produced, and it secures release if the custody is unlawful. Mandamus orders a public authority to perform a legal duty it has refused. Articles 32 and 226 empower the courts to issue both, among the five writs taken from English practice. Habeas corpus is the quickest remedy where liberty is at stake. Mandamus does not lie against the President or a Governor for personal acts, because of Article 361. Article 21 is the liberty guarantee behind the first writ.

Difference between habeas corpus and mandamus

FeatureHabeas CorpusMandamus
MeaningProduce the detained person and justify the custodyCommand performance of a public duty
LawArticles 32 and 226, with Article 21; Article 359 is the emergency debate, including ADM JabalpurArticles 32 and 226; Article 361 bars process against the President and a Governor in a personal capacity
WhoThe detaining authority, including a private person who is in fact confining someoneA public authority; a private person only if that person is performing a public duty
NeedDetention must be shown, and the burden then shifts to the StateA legal duty must exist, with no discretion to refuse it
LimitOften still available because liberty is involvedMay be refused if an equally effective remedy exists; it cannot rewrite a discretionary policy
UseUnder-trial prisoners and missing persons in custody; Puttaswamy, 2017, reinforces scrutiny of detentionPollution boards, municipalities, and universities

At a glance

Meaning

Habeas Corpus

Produce the body

Mandamus

We command

Target

Habeas Corpus

Illegal detention or custody

Mandamus

A public authority that is failing a public duty

Relief

Habeas Corpus

Release from unlawful confinement

Mandamus

An order to act, or sometimes to refrain

Speed

Habeas Corpus

The fastest writ, because liberty is at stake

Mandamus

Important, and not built as an emergency speed

Example

Midnight arrest vs withheld degree certificate

Police pick Ravi up and there is no record of the arrest. His family files habeas corpus, and the court orders that he be produced within 24 hours. Separately, a university refuses to issue a degree after the exams have been cleared. The graduate may seek mandamus directing the public university to perform that public duty. Habeas corpus does not fit, because nobody is illegally detained.

What this means for the exam

Illegal detention is met with habeas corpus. Refusal to perform a public legal duty is met with mandamus.

Habeas corpus

The writ demands the body. The detaining authority must produce the person and justify the custody. If the custody is illegal, the court orders release. Article 21 says that life and personal liberty can be taken only by procedure established by law. After Puttaswamy in 2017, privacy and dignity add to the scrutiny of detention. The writ is the fastest of the five because the stake is liberty. The family in the arrest example asks for production within 24 hours.

It is not limited to the State. If a private person confines someone unlawfully, the writ can lie against that detention. During an emergency, Article 359 and the ADM Jabalpur debate are the exam theme on whether access to court for liberty claims can be shut. Articles 20 and 21 sit in that same cluster. Release from jail is this writ. Framing the same facts as a duty to act is the wrong writ.

Mandamus

Mandamus commands a public authority to do what the law already requires: issue a licence that the rules make due, hold an election, or publish a result. It does not compel an authority to do something the law does not require, and it does not control a pure policy discretion. An equally effective alternative remedy can be a reason to refuse it. A university withholding a degree after the student has qualified is the classroom case.

Article 361 protects the President and the Governors from court process for personal acts. Mandamus cannot be used to compel the President to assent to a bill, which is a discretionary constitutional function. Public interest cases use the writ against pollution boards, municipal bodies, and universities. The command is to perform a duty. It is not an order to produce a prisoner.

Key takeaway

Habeas corpus requires an unlawfully detained person to be produced and, if the custody is illegal, released. Mandamus commands a public authority to perform a legal duty it has refused.

Difference between habeas corpus and mandamus FAQs

What is habeas corpus?

Habeas corpus is a writ that requires a person under detention to be produced in court. If the custody is unlawful, the person is released. It is the writ used when personal liberty is at stake.

What is mandamus?

Mandamus is a writ that commands a public authority to perform a public duty it has refused. The duty must already exist in law. It is not a remedy for a private dispute.

What is the main difference between habeas corpus and mandamus?

Habeas corpus answers unlawful confinement. Mandamus answers a refusal to perform a legal public duty. Release from illegal custody is the first. An order to act is the second.

Can mandamus be issued against the President to compel assent to a bill?

No. Article 361 gives the President immunity from court process for personal acts. Mandamus does not compel discretionary constitutional functions.

Can habeas corpus be issued only against the State?

No. If a private person illegally confines someone, habeas corpus can lie against that detention.

Which writ is used to seek release from unlawful jail?

Habeas corpus. Mandamus would treat the problem as a failure to perform a duty, which is the wrong frame for unlawful confinement.

PYQ linkage

1997 · Prelims

Contempt of court and judicial activism — Assertion/Reason on punitive powers (related writ enforcement context)

Read about more comparisons

  • PIL vs Writ Petition
  • Supreme Court vs High Court

Upgrade for access and purchase our mains 27 pass.

PYQs & Trends
9,000+
Mains Topper Copies
500+
Validity
Mains 2027
₹999

Valid till Mains 2027

More by UPSCYatra

Topper Answer Copies

Prelims GS PYQ

UPSC Mains PYQ

Today's Current Affairs