OPINION
This case involves the subject matter jurisdiction of the district court to consider Ramsey County’s petition to commit appellant Terrance John Giem as a sexual psychopathic personality (SPP) and/or a sexually dangerous person (SDP). Giem contends that the district court lost subject matter jurisdiction over the petition when it did not hold a hearing on the merits of the petition within the deadlines set forth in Minn.Stat. § 253B.08, subd. 1 (2006). The district court and the court of *424 appeals held that Giem waived the right to have the merits hearing held within the statutory deadlines. Because we hold that the district court did not lose subject matter jurisdiction, but that the court’s determination that Giem waived his right to an immediate hearing was clearly erroneous, we affirm in part and reverse in part.
Giem is a Level 3 sex offender. He was scheduled for release from the Minnesota Correctional Facility at Moose Lake on October 27, 2005. But on October 19, Ramsey County petitioned for his civil commitment as an SPP and/or SDP. The district court conducted an initial hearing on the petition on October 26, 2005. At that hearing, Giem’s attorney stated, “although [Giem] does not agree with the petition, he would like to have insight into where he’s at right now and * * * is willing to go to the security hospital * ⅜ ⅜. [H]e’s not really in agreement with the petition, but has waived his preliminary hearing.” The district court asked Giem, “[D]o you understand what [your attorney] just said” and “is this what you have chosen to do today?” To each question Giem responded, ‘Tes, Your Honor.” The court then scheduled prehearing examinations for November 18, 2005, and asked, “Do we want to try to set a[ ] date [for the merits hearing] at this point?” Giem’s attorney replied, “Your Honor, we’d like to wait with that until after the exam, actually.” 1
The court held a hearing on February 23 for the purpose of scheduling the merits hearing. At that time, Giem moved orally and in writing that the petition be dismissed because 125 days had passed since its filing and the district court had not conducted a merits hearing. Giem’s motion was based on section 253B.08, subdivision 1, which provides that “the hearing on a commitment petition * * * shall be held within 90 days from the date of the filing of the petition.” 2 In the alternative, Giem demanded that his hearing be held within 5 days of his request. This alternative request was based on the other timing provision in the same subdivision:
The proposed patient * ⅜ * may demand in writing at any time that the hearing be held immediately. Unless the hearing is held within five days of the date of the demand * * * the petition shall be automatically discharged if the patient is being held in a treatment facility pursuant to court order.
Minn.Stat. § 253B.08, subd. 1. There is no dispute that Giem was being held in a treatment facility pursuant to a court order. 3
At the hearing, Giem’s attorney argued that Giem wanted to have the merits hear *425 ing as soon as possible because the examinations were complete. His attorney stated that she was ready and available for such a hearing. The district court denied Giem’s motion, stating that “[a]ny delays if they can be characterized as such with regard to bringing this case on for trial has [sic] been the result of the acquiescence of [Giem]” and “I believe that [Giem] does have a right to a trial in a timely manner, but he has waived his right by his acquiescence * * The court further noted that as a practical matter the attorneys and judge could not be made available for the hearing within 5 to 15 days. On March 6, the court issued a written order “[b]y agreement of the Court and counsel” continuing the merits hearing to May 8-12, 2006.
On March 22, Giem filed an appeal with the Minnesota Court of Appeals from the order denying both his motion to dismiss and the demand for a merits hearing within 5 days. The court of appeals dismissed the appeal as taken from a nonappealable order and said, “The February 23 order is not appealable because it does not deny a motion to dismiss on the ground of lack of subject-matter jurisdiction.”
Giem subsequently filed a motion to dismiss the petition for lack of subject matter jurisdiction. The district court heard this motion on May 1, but at that time Giem’s attorney asked the court to continue the motion to dismiss and postpone the hearing in order to implement a less restrictive alternative than commitment and to find Giem a place to live and a treating psychologist. The court questioned Giem to ensure that he understood his attorney’s request and that he agreed to it. Giem confirmed his understanding and agreement. The court then ordered a continuance until June 26.
At the June 26 court appearance, the district court considered Giem’s argument that he was unable to formulate a less restrictive alternative because Ramsey County Human Services refused to appoint a case manager. Giem asked the district court to order Ramsey County to appoint a case manager to his case, continue the case to permit the preparation of the alternative plan, or dismiss for lack of subject matter jurisdiction. The court denied Giem’s motion to dismiss, but ruled that to the extent that Giem’s motion could be construed as a demand for an immediate hearing pursuant to section 253B.08, subdivision 1, it was granted and the court ordered the merits hearing to commence on July 5.
The merits hearing on the petition to civilly commit Giem as an SPP and/or SDP was held July 5-7, 2006. The district court committed Giem as an SDP on August 18, 2006. Giem appealed to the court of appeals, arguing that the district court lacked subject matter jurisdiction over the civil commitment petition because it failed to comply with the deadlines in section 253B.08, subdivision 1. The court of appeals ruled that the deadlines “do not define or limit” the district court’s subject matter jurisdiction.
In re Civil Commitment of Giem,
I.
Giem argues that the district court lost subject matter jurisdiction to hear the petition to commit him as an SPP and/or SDP when it failed to provide him a hearing on the merits of the commitment petition pursuant to the deadlines set forth in section 253B.08, subdivision 1. Subject matter jurisdiction is a question of law that
*426
we review de novo.
Johnson v. Murray,
We turn first to an examination of the statute that Giem contends divested the district court of subject matter jurisdiction. There are two different timing provisions in section 253B.08, subdivision 1, and both appear to apply to the county’s petition. First, the district court “shall” hold a hearing within 90 days from the date of filing — -or up to an additional 30 days for good cause shown — on a commitment petition for an SPP and/or SDP. Minn.Stat. § 253B.08, subd. 1. The statute further provides that “[t]he proceeding shall be dismissed if the proposed patient has not had a hearing on a commitment petition within the allowed time.” Id. Second, the proposed patient “may demand in writing at any time that the hearing be held immediately.” Id. The hearing must be held within 5 days of the date of the demand — or 10 additional days for good cause shown^ — otherwise “the petition shall be automatically discharged if the patient is being held in a treatment facility pursuant to court order.” Id. Neither deadline was satisfied in this case.
We turn next to an examination of the consequence of the district court’s failure to meet the statutory deadlines. The parties do not dispute that the court had subject matter jurisdiction over the petition when the county filed it on October 19, 2005. But because the statutory deadlines were not met, Giem argues the court lost the authority to conduct any further proceedings on the petition.
4
See Robinette v. Price,
Giem argues that the timing provisions in section 253B.08, subdivision 1 are mandatory and not merely directory. He contends, in essence, that the legislative requirements that the petition “shall be dismissed” in the first part of the statute and the phrase “shall be automatically discharged” in the second part of the statute mean that the timing provisions are mandatory. In other words, because the legislature has provided for consequences if the deadlines are not met, the deadlines are mandatory and therefore necessarily jurisdictional. 5
*427
But there is a fundamental difference between finding that a deadline is mandatory and concluding that it operates to take away the district court’s authority to act. We recently discussed the difference between deadlines as procedural tools and deadlines operating as jurisdictional limits.
Rubey v. Vannett,
Because of our lack of clarity in distinguishing procedural tools from jurisdictional limits, Giem’s argument finds some support in our case law. For example, Giem analogizes the consequential “automatically discharged” language in section 253B.08, subdivision 1, to a similar phrase in Minn.Stat. § 278.03 (2006), which this court characterized as .“jurisdictional” in
Land O’ Lakes Dairy Co. v. Douglas County, Hintzen,
But we clarified the reach of
Land O’ Lakes
in
In re Thunderbird Motel Corp. v. County of Hennepin,
*428
We distinguished
Land O’ Lakes
because in that case the taxpayer neither paid the taxes nor intended to do so.
Thunderbird,
289 Minn, at 241,
We agree with Giem that the provisions of section 253B.08, subdivision 1 are “mandatory” as we have defined that term in the context of statutory interpretation.
7
See Hans Hagen Homes, Inc. v. City of Minnetrista,
*429
Those cases do not answer the question here, because Giem’s construction of the statute — as one divesting the district court of subject matter jurisdiction it originally-had — implicates constitutional separation of powers principles. Our state constitution provides a broad grant of subject matter jurisdiction to the district court, providing that “[t]he district court has original jurisdiction in all civil and criminal cases.” Minn. Const, art. VI, § 3;
see State ex rel. Koalska v. Swenson,
In addition, such a construction would permit the legislature to interfere with the power the constitution vests in the district court.
Cf. State v. Harris,
We have held that if we can construe a statute to avoid a constitutional confrontation, we are to do so.
Kline v. Berg Drywall, Inc.,
*430
Such a construction is consistent with our mandate to construe statutes, if possible, to avoid constitutional infirmities. Such a construction is also warranted here because the legislature gave no clear indication in section 253B.08, subdivision 1 that it intended to divest the district court of subject matter jurisdiction if the hearing was not held in compliance with the statute’s deadlines. The legislature did not even mention jurisdiction in section 253B.08.
See Thunderbird,
289 Minn, at 241-42,
II.
We next consider whether the district court and the court of appeals correctly held that Giem waived his right to have the merits hearing held within the deadlines set by section 253B.08, subdivision 1. The county contends that Giem impliedly waived his right to demand a hearing through acquiescence and conduct that delayed the petition proceedings. Giem argues that his February 23 demand entitled him by law to an immediate hearing, regardless of conduct prior to that demand.
A.
In addressing the waiver question, we must first determine whether waiver principles are applicable in the context of section 253B.08, subdivision 1. The district court did not clearly articulate its basis for concluding that the deadlines in the statute could be waived. The court of appeals has held that the deadlines can be waived by conduct of the patient.
See In re May,
The county argues that the deadlines prescribed in section 253B.08, subdivision 1 are waivable. Those deadlines are similar to the right to a speedy trial, which can be waived. In a criminal case, the “right to a speedy trial is intended to avoid oppression and prevent delay by imposing upon the courts an obligation to proceed with reasonable dispatch.”
State v. Dehler,
Our jurisprudence reflects that we examine the nature of the right at issue in determining application of waiver principles. For example in
State v. Humes,
B.
Having concluded that waiver principles apply, we turn next to a review of the district court’s conclusion that Giem waived, by his conduct, both the right to have a merits hearing within 90/120 days
*432
of the October 19, 2005, petition filing and the right to have a hearing within 5/15 days of his February 23, 2006, demand. We review the district court’s decision that Giem waived his rights for clear error.
See In re Welfare of G.L.H.,
We have defined waiver as the “intentional relinquishment of a known right,”
Carlson v. Doran,
Giem argues that the statutory deadlines cannot be waived constructively, and that any waiver must be written or expressed on the record. But outside the context of waivers of the right to counsel and to a trial by jury, which our rules require be made in writing, we have found waivers to be inferred from conduct and acquiescence.
See State v. Martin,
The lower courts found that Giem waived both of the deadlines in the statute. The record reflects that at the October 26, 2005, appearance Giem expressly waived his right to a preliminary hearing and agreed that a date for the merits hearing should not be set until after completion of the examinations. 11 These facts support a finding that Giem constructively waived his right to a hearing within the 90/120-day deadline. The district court, county attorney, and examiners detrimentally relied on Giem’s October 26 waiver by not scheduling a date for the merits hearing. Giem had knowledge and intent to postpone the merits hearing until after his psychological evaluation in order to obtain “insight into where he’s at right now.” The February 23 finding that the delay in scheduling the merits hearing arose from Giem’s acquiescence was therefore not clearly erroneous. That finding is further supported by Giem’s requests for continuance on May 1 and June 26 in order to pursue the less restrictive alternative — requests which were inconsistent with his motion to dismiss.
That Giem waived his right to have the hearing held within the 90/120-day deadline, however, does not answer the question of whether he also waived his right to demand an immediate merits hearing under the other provision in the statute. Section 253B.08, subdivision 1, as set forth above, contains two different rights of which Giem could avail himself. See Minn. Stat. § 645.17(2) (2006) (delineating the *433 presumption that “the legislature intends the entire statute to be effective and certain”). 12 With respect to the second right in the statute, the record does not support a finding that Giem waived his right to demand an immediate hearing within the 5/15-day period. To the contrary, when Giem made his demand on February 23, his attorney represented to the district court that they were ready and available for an immediate hearing. The record also does not support a finding that Giem had knowledge of or intent to waive the right to demand an immediate hearing. We hold therefore that the district court’s finding that Giem waived his right to demand an immediate hearing was clearly erroneous.
III.
Our conclusion that the district court’s finding that Giem waived his right to demand an immediate hearing was clearly erroneous requires that we discuss the appropriate remedy. Giem had the right to “demand in writing at any time that the hearing be held immediately.” Minn.Stat. § 253B.08, subd. 1 (emphasis added). Regardless of the scheduling impracticalities for the court, county attorney, and examiners, the district court was required to hold the hearing within 5 days (or within an additional 10 days if good cause were shown) of Giem’s February 23 demand. Because the district court failed to conduct the hearing within 5 days of the demand and because the record does not support a finding that Giem waived this right, the petition should have been “discharged.” Minn.Stat. § 253B.08, subd. 1. Therefore, we hold that the order for commitment issued in August 2006 must be vacated, and that Giem must be released from confinement.
Giem argues that the discharge means that the county is precluded from filing a petition involving any actions that were at issue in the petition the county filed on October 19, 2005. We reject this argument and hold that the discharge is without prejudice and does not operate to bar the county from filing the petition anew. We agree with the court of appeals that “the time constraints provided in subdivision 1 relate to the ‘core of the liberty protected by the Due Process Clause.’”
Giem,
The government’s interest, however, must also be considered. We have previously recognized that the government has a compelling interest in the “protection of members of the public from persons who have an uncontrollable impulse to sexually assault.”
In re Blodgett,
Affirmed in part and reversed in part.
Notes
. Three examiners were appointed to evaluate Giem: Dr. Meyers (selected by Giem), Dr. Zeller (selected by the district court), and Dr. Farnsworth (selected by the county). Dr. Meyers conducted his initial examination on November 18, 2005, continued his examination on December 1, and filed his report on April 27, 2006. Dr. Zeller conducted his examination on December 30 and filed his report on April 4, 2006. Dr. Farnsworth examined Giem on December 2 and completed his report on December 6, 2005.
. The statute provides:
The hearing on the commitment petition ⅜ ⅜ ⅜ shall be held within 90 days from the date of the filing of the petition. For good cause shown, the court may extend the time of hearing up to an additional 30 days. The proceeding shall be dismissed if the proposed patient has not had a hearing on a commitment petition within the allowed time.
Minn.Stat. § 253B.08, subd. 1.
.The legislature also provided that “the court may extend the time of hearing on the demand for an additional ten days” if “good cause” is shown. Minn.Stat. § 253B.08, subd. 1.
. As noted by the court of appeals, Giem's appeal from the district court's commitment order challenges only the denial of his February 23 demand for immediate trial or dismissal.
Giem,
. This case does not involve a situation where “the legislature, in creating a substantive right by statute, may, as an element of that substantive right, circumscribe the adjudication of that right more strictly than in other cases.”
In re O'Rourke,
. Our analysis in
Rubey
was consistent with the United States Supreme Court’s warning against misuse of the term “jurisdictional.” The Court has noted that " '[classifying time prescriptions, even rigid ones, under the heading “subject matter jurisdiction” can be confounding. ⅜ * * [Tjhe label “jurisdictional” [should be used] * * * only for prescriptions delineating the classes of cases (subject-matter jurisdiction) and the persons (personal jurisdiction) falling within a court's adjudicatory authority.’ "
Scarborough v. Principi,
. A patient's remedy for the district court's failure to follow the time procedures is a writ of mandamus.
See Hans Hagen Homes, Inc. v. City of Minnetrista,
. While not cited by the parties,
Heller v. Wolner,
. Other states have recognized that once the district court obtains subject matter jurisdiction, “a later failure to follow statutory requirements does not divest the court of subject matter jurisdiction. Such a failure to follow the statute would amount to an erroneous decision not affecting jurisdiction.”
People in Interest of Clinton,
. Moreover, construing the statute to preclude application of waiver principles would implicate the same separation of powers principles discussed earlier.
See State v. Lemmer,
. Because the court initially did not set a date for the merits hearing, the court-appointed examiners were not alerted about an immediate deadline to tender their reports. See Minn.Stat. § 253B.07, subd. 5 (2006) (explaining that examination reports are due 48 hours before a commitment hearing). Indeed, only the county's examiner had submitted his report when Giem brought his motion to dismiss in February 2006.
. The district court suggested that the legislature did not intend the second provision'— the right to demand an immediate hearing— to apply to patients whom the government seeks to commit as an SPP and/or SDP. The legislature expressed no such exception in the language of the statute, and we are without authority to create one.
