Short answer. It depends on the nature of the underlying case. Rule 102, Section 19 taxes costs against the Republic, paid from its Treasury, when discharge follows detention in a criminal case, but against the discharged person or whoever signed the petition, or both, when discharge follows detention in a civil case.

What the law says

When a person confined under color of proceedings in a criminal case is discharged, the costs shall be taxed against the Republic of the Philippines, and paid out of its Treasury; when a person in custody by virtue or under color of proceedings in a civil case is discharged, the costs shall be taxed against him, or against the person who signed the application for the writ, or both, as the court shall direct.

Rule 102, Section 19 — Record of writ, fees and costs. Read the full provision →

Recording and general cost order

The proceedings on a writ of habeas corpus are recorded by the clerk of the court, and upon final disposition, the court or judge makes such order as to costs as the case requires; fees of officers and witnesses are included in those costs, though no one may demand advance payment of fees before the proceedings. This general cost-order authority sets the stage for the two more specific rules that follow, tailored to whether the underlying detention arose from a criminal or a civil case.

Criminal-case discharge, costs go to the government

Where a person confined under color of proceedings in a criminal case is discharged, the costs shall be taxed against the Republic of the Philippines, and paid out of its Treasury. This makes practical sense because it is the State, through its prosecutorial and detaining authorities, that instituted or maintained the criminal confinement in the first place, so the government bears the cost of a proceeding that established the confinement was not justified.

Civil-case discharge, costs go to the private parties

Where a person in custody under color of proceedings in a civil case is discharged instead, the costs shall be taxed against him, or against the person who signed the application for the writ, or both, as the court shall direct. This leaves the court real discretion to allocate costs between the formerly detained person and the petitioner who sought the writ, rather than fixing that allocation automatically in every civil-case discharge.

Why the split makes sense

A criminal-case detention typically involves the State as the moving party behind the restraint, while a civil-case detention arises between private litigants, which is reflected in who ultimately bears the cost of the habeas corpus proceeding that follows. The rule essentially places the cost on whichever side actually caused the confinement to happen in the first place, rather than always defaulting to a single, uniform rule regardless of who was actually responsible.

Related provisions

Note. Statute text quoted on this page is reproduced from the official enactment and is linked to the full provision. The explanation around it is general legal information from Vivas & Nobles Law Office, not legal advice. Whether it applies to your situation depends on facts only a lawyer reviewing them can assess.