OPINION OF THE COURT
Leventhal, J.The primary issue on this appeal is whether the Supreme Court may grant a petition for a writ of habeas corpus brought on behalf of a patient and deny a hospital’s untimely involuntary retention application pursuant to article 9 of the Mental Hygiene Law without first conducting an examination into the patient’s alleged mental disability and detention. Ancillary to our determination, we must also decide whether a petition for a writ of habeas corpus ostensibly filed pursuant to CPLR article 70 on behalf of a person who is involuntarily hospitalized is substantively different from a petition for a writ brought under Mental Hygiene Law § 33.15. We answer these questions in the negative.
On March 24, 2012, the New York State Office of Mental Health (hereinafter the OMH) applied for the involuntary admission of Stephen S. (hereinafter the patient), to Holliswood Hospital (hereinafter the Hospital). The application was supported by a certificate of an examining physician attesting that the patient was “paranoid and unable to care for [him]self.” In an order dated June 13, 2012, the Supreme Court, Queens County (Schulman, J.), after a hearing, granted the OMH’s application to involuntarily hospitalize the patient and directed that the patient was to be retained for a period not to exceed three months.
More than three months later, on October 23, 2012, the Mental Hygiene Legal Service (hereinafter MHLS) filed the instant petition for a writ of habeas corpus on behalf of the patient, alleging that the patient was being illegally detained by the Hospital. The petition sought production of the patient before the court, and asserted that the order permitting the in*87voluntary admission of the patient had expired on September 13, 2012.
In response, on October 25, 2012, the Hospital applied for authorization to involuntarily retain the patient pursuant to article 9 of the Mental Hygiene Law. The Hospital’s application was supported by a medical certification averring that the patient was “paranoid and unable to care for [him]self.” A second certification noted that the patient suffered from “psychosis,” that he was noncompliant with his medication, and as a result, the patient was unable to care for himself. Included in the record is a psychiatric summary from the Hospital which stated that the patient had a history of psychiatric admissions for schizophrenia and paranoia. The psychiatric summary further stated that the patient’s behavior was unremarkable when he was medicated, but when he was inadequately medicated he had a history of becoming “dangerously assaultive.” In addition, the psychiatric summary noted that the patient had made several statements indicating a desire to hurt others, and that he had assaulted hospital staff, fellow patients, and family members.
Notably, on August 5, 2012, just two months before the involuntary retention application was filed, the patient reportedly stabbed a hospital staff member in the neck with a pen. In addition, on October 19, 2012, just a few days before the Hospital sought his retention, the patient attacked the reporting psychiatrist, choking him and punching him in the face while stating, “You gave me permission to kill you!” The reporting psychiatrist indicated in the psychiatric summary that, despite several attempts, the patient’s physicians had not been able to devise a dosage regimen which reliably controlled the patient’s psychosis and assaultive tendencies, but expressed hope that such a scheme could be arrived at if given time for further trials. As noted above, the reporting psychiatrist opined that, at the present time, the patient “would most certainly pose a potential threat to [him]self and others.”
On November 7, 2012, the patient was produced before the Supreme Court. The patient’s counsel contended that the patient had been wrongfully detained beyond the end of the retention period, which expired on September 13, 2012. The patient’s counsel sought the patient’s immediate discharge on the basis that there was no legal mandate for the patient’s continued retention. In response, counsel for the Hospital argued that the controlling precedent provided that the remedy *88for an administrative error such as the one present here was not the immediate release of the patient, but a substantive hearing to determine whether continued retention was warranted. The Supreme Court countered that a hearing was “almost a non-remedy,” given that such a hearing would have been conducted if the Hospital had filed a timely involuntary retention application. MHLS added that it had filed the subject petition for a writ of habeas corpus pursuant to CPLR article 70, which did not require a hearing, as opposed to Mental Hygiene Law § 33.15, which does.
In the judgment appealed from, dated November 7, 2012, the Supreme Court sustained the writ, directed that the Hospital discharge the patient, and stayed the discharge for five days. The Hospital appeals. By decision and order on motion dated November 19, 2012, this Court granted the Hospital’s motion to stay enforcement of the judgment pending the hearing and determination of this appeal.
Following oral argument, MHLS and the Hospital informed this Court that on April 16, 2013, the patient was discharged from the Hospital. Thus, we must initially address whether this appeal is now academic in light of the patient’s release.
Generally, courts are precluded “from considering questions which, although once live, have become moot by passage of time or change in circumstances” (Matter of Hearst Corp. v Clyne, 50 NY2d 707, 714 [1980]). Typically, “an appeal will be considered moot unless the rights of the parties will be directly affected by the determination of the appeal and the interest of the parties is an immediate consequence of the judgment” (id. at 714). However, an exception to the mootness doctrine permits a court to review a case if the controversy or issue involved is likely to recur, typically evades review, and raises a substantial and novel question (see e.g. People ex rel. McManus v Horn, 18 NY3d 660, 663-664 [2012]; City of New York v Maul, 14 NY3d 499, 507 [2010]; Matter of Hearst Corp. v Clyne, 50 NY2d at 714-715).
Here, the release of the patient renders this appeal academic. We nevertheless exercise our discretion to review the issues raised on this appeal pursuant to the exception to the mootness doctrine because the primary issue raised is an important one which implicates both the patient’s fundamental liberty interest and the State’s interest in protecting the mentally ill, and is one which is likely to recur. Further, the primary issue involved here may typically evade review because “[t]he Mental Hygiene Law contemplates that involuntary hospitalization in a *89mental health facility is often brief and temporary . . . [and the law] require[s] frequent periodic review of a patient’s status, and the release of the patient unless OMH is granted successive court orders authorizing retention” (Mental Hygiene Legal Servs. v Ford, 92 NY2d 500, 505-506 [1998]; see Matter of Chenier v Richard W., 82 NY2d 830, 832 [1993]; Matter of Anthony H. [Karpati], 82 AD3d 1240, 1241 [2011]). Therefore, we turn to the merits of this case.
On appeal, the Hospital contends that the Supreme Court erred in sustaining the writ and ordering the patient’s release without holding a hearing to determine whether continued retention was warranted. The Hospital maintains that Mental Hygiene Law § 33.15, not CPLR article 70, applies to involuntary commitments, and, in any case, there is no substantive difference between the two statutes. MHLS responds that the Hospital improperly conflates the common-law writ of habeas corpus, as codified in CPLR article 70, with the procedure set forth in Mental Hygiene Law § 33.15 and that, pursuant to the common-law writ, discharge was the proper remedy for the Hospital’s failure to comply with the time frames imposed by article 9 of the Mental Hygiene Law. MHLS urges that a contrary result would offend due process under both the New York and United States Constitutions.
Civil commitment for any purpose constitutes a significant deprivation of an individual’s liberty that requires due process protection (see Addington v Texas, 441 US 418, 425 [1979]). Mental Hygiene Law § 9.33, which sets forth the procedure for a hospital to follow when seeking judicial authorization to retain an involuntarily hospitalized patient under article 9 of the Mental Hygiene Law, provides as follows:
“If the director of a hospital, in which a patient is retained pursuant to the foregoing subdivisions of this section, shall determine that the condition of such patient requires his further retention in a hospital, he [or she] shall, if such patient does not agree to remain in such hospital as a voluntary patient, apply during the period of retention authorized by the last order of the court to the supreme court or the county court in the county where the hospital is located for an order authorizing further continued retention of such patient” (Mental Hygiene Law § 9.33 [d] [emphasis added]).
Here, there is no dispute that the Hospital did not comply with Mental Hygiene Law § 9.33, as it failed to seek an order *90authorizing an additional period of retention prior to the expiration of the retention period. This, however, does not end our inquiry. In order to determine whether the Supreme Court properly granted the petition and directed the patient’s immediate release, we first need to look to the applicable constitutional and statutory framework.
The right to invoke habeas corpus, “the historic writ of liberty, the greatest of all writs, is so primary and fundamental that it must take precedence over considerations of procedural orderliness and conformity” (People v Schildhaus, 8 NY2d 33, 36 [1960] [internal quotation marks omitted]; see People ex rel. Tweed v Liscomb, 60 NY 559, 565 [1875] [“Relief from illegal imprisonment by means of this remedial writ is not the creature of any statute. The history of the writ is lost in antiquity. It was in use before magna charta, and came to us as a part of our inheritance from the mother country, and exists as a part of the common law of the State”]). Hence, the great writ is not derived from any statute or constitution, but is a fundamental right deeply rooted in our society. Further, the United States and New York Constitutions each provide that the privilege of a writ of habeas corpus shall not be suspended unless, in the case of rebellion or invasion, the public safety requires it (see US Const, art I, § 9 [2]; NY Const, art I, § 4).
“A person illegally imprisoned or otherwise restrained in his liberty within the state . . . may petition without notice for a writ of habeas corpus to inquire into the cause of such detention and for deliverance” (CPLR 7002 [a]). CPLR 7001 provides, in relevant part, “Except as otherwise prescribed by statute, the provisions of this article are applicable to common law or statutory writs of habeas corpus and common law writs of certiorari to inquire into detention.” Although codified in CPLR article 70, the writ of habeas corpus is a “part of the common law of this State” (People ex rel. Lobenthal v Koehler, 129 AD2d 28, 30 [1987]).
We now move from CPLR article 70, the codification of the privilege of the writ of habeas corpus, and consider Mental Hygiene Law § 33.15, entitled “Habeas corpus.” This statute provides, in relevant part, that “[a] person retained by a facility ... is entitled to a writ of habeas corpus to question the cause and legality of detention upon proper application” (Mental Hygiene Law § 33.15 [a]). Section 33.15 (b) further states:
“Upon the return of such a writ of habeas corpus, *91the court shall examine the facts concerning the person’s alleged mental disability and detention. The evidence shall include the clinical record of the patient and medical or other testimony as required by the court. The court may review the admission and retention of the person pursuant to the provisions of this chapter. The court shall discharge the person so retained if it finds that he is not mentally disabled or that he is not in need of further, retention for in-patient care and treatment” (emphasis added).
Further, Mental Hygiene Law section 33.15 (d) requires habeas corpus proceedings to follow “the procedure set forth in article seventy of the civil practice law and rules.” As the following cases demonstrate, when the Supreme Court is presented with an untimely retention application it generally cannot dismiss the retention application and direct the patient’s release absent an inquiry into the patient’s alleged mental disability and detention.
In People ex rel. Noel B. v Jones (230 AD2d 809 [1996]), the psychiatric hospital to which the patient was involuntarily committed failed to timely apply for further retention of the patient pursuant to Mental Hygiene Law § 9.33 (see id. at 810). The patient therefore sought habeas corpus relief pursuant to Mental Hygiene Law § 33.15 (see id.). The Supreme Court dismissed the petition as academic based upon the hospital’s representation that the patient had been discharged and, thereafter, subsequently readmitted to the hospital on an emergency basis.
On appeal, this Court held that the petition should not have been dismissed as academic because the patient’s “discharge” was merely an attempt by the hospital “to avoid the legal consequences of the failure to follow statutory procedures” (id. at 810-811). This Court acknowledged that the patient was illegally detained and that his “civil commitment constitute^] a significant deprivation of liberty” (id. at 811). While the hospital’s failure to comply with Mental Hygiene Law article 9 “[could] not be condoned,” this Court held that, under the circumstances, the patient’s immediate discharge was not the proper remedy (id.). This Court explained:
“The State has an interest in providing care to the mentally ill and in preventing violence to the mentally ill and others. Mental Hygiene Law § 33.15 *92(b) provides that, upon the return of a writ of habeas corpus, the court ‘shall examine the facts concerning the person’s alleged mental disability and detention.’ The court is authorized to consider the patient’s medical records and hear testimony, and the court ‘shall discharge the person so retained if it finds that he is not mentally disabled or that he is not in need of further retention for in-patient care and treatment’ ” (id. [citations omitted]).
Therefore, this Court held that the Supreme Court should have examined the merits of the hospital’s retention application. This Court ordered that the patient was to be discharged unless a hearing to determine the patient’s need for further retention and treatment was commenced within 15 days of our decision and order (see id. at 811-812).
In State of N.Y. ex rel. Karur v Carmichael (41 AD3d 349 [2007]), the patient was involuntarily retained at a psychiatric hospital on January 23, 2007, pursuant to Mental Hygiene Law § 9.27, for a period of 60 days. Three days later, the patient requested a hearing to challenge his commitment, but that request went unanswered. On March 15, 2007, after the 60-day retention period had expired, the patient made a second request for a hearing which also went unanswered (see id. at 350). On March 21, 2007, a petition for a writ of habeas corpus was filed on the patient’s behalf and the hospital responded by applying for the involuntary retention of the patient. In the order appealed from, the Supreme Court sustained the writ and directed the immediate release of the patient.
On appeal, the Appellate Division, First Department, reversed the order and remitted the matter to the Supreme Court for “an expeditious hearing to determine whether the patient [was] in need of further retention” (id. at 350). Although the Court found “troubling” both the hospital’s failure to respond to the petitioner’s two hearing requests and the hospital’s retention of the patient “without legal status,” the Court held that Mental Hygiene Law § 33.15 (b) required the Supreme Court to consider the merits of the hospital’s retention application (id. at 350).
In Matter of Guia G. (173 Misc 2d 111 [Sup Ct, Kings County 1997]), the hospital to which the patient was involuntarily committed failed to timely apply for further retention of the patient pursuant to Mental Hygiene Law § 9.33. The Supreme Court rejected MHLS’s contention that the court was without subject matter jurisdiction simply because the hospital filed an untimely *93retention application. Relying upon People ex rel. Noel B. v Jones (230 AD2d 809 [1996]), the Supreme Court concluded that an illegal detention did not automatically warrant the dismissal of a retention application. Balancing the patient’s liberty interest against the State’s obligation to protect the patient and society, the Supreme Court concluded that the hospital’s retention application would be determined only after a hearing.
The foregoing case law supports the conclusion that after a hospital has filed an untimely application for the continued retention of a patient who was involuntarily hospitalized pursuant to article 9 of the Mental Hygiene Law, the courts must balance the State’s interest in providing care to the mentally ill and preventing violence to the mentally ill and society, against the patient’s liberty interests. The doctrine of stare decisis requires us to adhere to the principle that where a hospital has failed to fully comply with the retention procedures set forth in Mental Hygiene Law § 9.33, the immediate release of a patient is not the automatic remedy (see Mental Hygiene Law § 33.15 [b]; Matter of Rebecca Y. [Brunswick Hall Psychiatric Ctr.], 76 AD3d 1028, 1029 [2010] [minor defect in hospital’s involuntary retention application “did not require that the proceeding be dismissed, in light of the State’s ‘interest in providing care to the mentally ill and in preventing violence to the mentally ill and others’ ” (quoting People ex rel. Noel B. v Jones, 230 AD2d at 811)]; see also Matter of Thomas S., 58 AD3d 1063, 1065 [2009]; State of N.Y. ex rel. Karur v Carmichael, 41 AD3d at 349-350; People ex rel. Noel B. v Jones, 230 AD2d at 809-812; Matter of Guia G., 173 Misc 2d at 111-120; cf. Matter of Nancy H., 177 Misc 2d 30 [Sup Ct, Rockland County 1998]). Rather, in light of the State’s interest in providing care to the mentally ill and preventing violence to the mentally ill and society, the Supreme Court is required to conduct an examination into the patient’s alleged mental disability and detention.
In the instant case, notwithstanding the Hospital’s failure to timely comply with the procedures set forth in Mental Hygiene Law § 9.33 (d) for the patient’s involuntary retention, Mental Hygiene Law § 33.15 (b) required the Supreme Court to conduct an examination into the patient’s alleged mental disability and detention.
Nevertheless, MHLS argues that since the instant petition was filed under the common law, as codified in CPLR article 70, the writ of habeas corpus provisions set forth in Mental Hygiene Law § 33.15, requiring an examination into the *94patient’s alleged mental disability, are inapplicable. We reject this contention and hold that a petition for a writ of habeas corpus, ostensibly filed on behalf of the patient pursuant to CPLR article 70, is still governed by the specific provisions of Mental Hygiene Law § 33.15. Thus, the Supreme Court could not simply sustain the writ on the ground that CPLR article 70 does not explicitly require such an examination. Indeed, because Mental Hygiene Law § 33.15 is the more specific statute, the provisions of Mental Hygiene Law § 33.15, which require, among other things, an examination into a patient’s alleged mental disability and detention upon the return of a writ of habeas corpus, are controlling, not CPLR article 70 (see generally QK Healthcare, Inc. v InSource, Inc., 108 AD3d 56 [2013]; Matter of Dandomar Co., LLC v Town of Pleasant Val. Town Bd., 86 AD3d 83, 92-94 [2011]). Since Mental Hygiene Law § 33.15 “is directed exclusively to those retained in psychiatric facilities, [it] is the more specific habeas provision and thus controlling in . . . mental hygiene cases” (State of N.Y. ex rel. Harkavy v Consilvio, 29 AD3d 221, 227-228 [2006], revd on other grounds 7 NY3d 607 [2006]). A contrary determination would frustrate the legislative intent that an examination be conducted when a psychiatric patient seeks habeas corpus relief, and that the patient be discharged only if the court finds that he or she “is not mentally disabled or that he [or she] is not in need of further retention for in-patient care and treatment” (Mental Hygiene Law § 33.15 [b]).
Here, the patient was initially involuntarily hospitalized pursuant to Mental Hygiene Law article 9 due to his alleged mental illness and, thereafter, the petition for a writ was filed on the patient’s behalf. The purpose of the writ of habeas corpus was to determine whether the patient was being unlawfully detained (see CPLR 7002 [a]; People ex rel. Robertson v New York State Div. of Parole, 67 NY2d 197, 200 [1986]). Therefore, in order to determine the cause and legality of the patient’s detention, the Supreme Court was required to examine the facts of the patient’s alleged mental disability and detention (see Mental Hygiene Law § 33.15 [a], [b]; CPLR 7002). The Supreme Court’s failure to conduct the required examination constitutes reversible error. We note that the Hospital supported its untimely retention application with, inter alia, two certificates from the patient’s treating physicians. In those certificates, the physicians asserted that the patient was paranoid, unable to care for himself, and psychotic.
*95Our determination should not be construed as an approval of the Hospital’s dilatory conduct in filing the retention application. There is no dispute that the Hospital failed to comply with Mental Hygiene Law § 9.33. Under the circumstances presented, however, the remedy for such noncompliance is not the immediate release of a patient. We also caution that our reasoning should not be construed to authorize an unlimited violation of article 9 of the Mental Hygiene Law so as to allow a patient to be involuntarily retained, without a hearing, indefinitely.
MHLS’s remaining contentions are without merit.
Accordingly, the judgment is reversed, on the law.
Rivera, J.E, Dickerson and Hinds-Radix, JJ., concur.Ordered that the judgment is reversed, on the law, without costs or disbursements.