
    STATE of Minnesota, Respondent/Cross-Appellant, v. Brian Keith SCHNAGL, a/k/a Brian Keith Schnagel, Appellant/Cross-Respondent.
    No. A13-1332.
    Supreme Court of Minnesota.
    Feb. 11, 2015.
    
      Lori Swanson, Attorney General, Saint Paul, Minnesota; and James C. Back-strom, Dakota County Attorney, Tricia A. Loehr, Assistant Dakota County Attorney, Hastings, MN, for respondent/cross-appellant.
    Cathryn Middlebrook, Chief Appellate Public Defender, Chelsie M. Willett, Assistant State Public Defender, Saint Paul, MN, for appellant/cross-respondent.
    Angela Behrens, Kelly S. Kemp, Assistant Attorneys General, Saint Paul, MN, for amicus curiae Commissioner of Minnesota Department of Corrections.
   OPINION

DIETZEN, Justice.

Appellant Brian Schnagl was convicted of first-degree criminal sexual conduct and received a stayed 98-month sentence together with a conditional-release term of 5 years. Following the violation of his probation, Schnagl served two-thirds of the executed sentence and was then placed on supervised release. Schnagl subsequently violated the terms of his supervised release, and the Minnesota Department of Corrections (DOC) revoked his release and ordered him to serve the remaining portion of his executed sentence in custody. The DOC recalculated the expiration date of Schnagl’s conditional-release term to reflect the time he had spent in custody for his supervised-release violations. Schnagl filed a motion to correct his sentence under Minn. R.Crim. P. 27.03, subd. 9, alleging that the DOC had illegally extended his conditional-release term. In response to Schnagl’s motion, the State asserted the district court lacked jurisdiction under Minn. R.Crim. P. 27.03, subd. 9, to review the Commissioner of Correction’s administrative decision implementing the sentence imposed by the district court because the court could not grant the relief requested. The district court concluded that it had jurisdiction over the matter because Minn. R.Crim. P. 27.03, subd. 9, authorizes review of the DOC’s administrative decisions implementing a sentence, and then denied the motion to correct Schnagl’s sentence on the merits. The court of appeals affirmed.

We conclude that the district court has subject matter jurisdiction over a motion to correct a sentence under Rule 27.03, subdivision 9. But, contrary to the district court’s and court of appeals’ analyses, such a motion is not the proper procédure to obtain judicial review of the Commissioner’s administrative decision implementing the sentence imposed by the district court. Consequently, we affirm the decision of the court of appeals affirming the district court’s denial of Schnagl’s motion to correct his sentence, but we do so without reaching the merits of Schnagl’s motion. Specifically, we reject the court of appeals’ conclusion that Rule 27.03, subdivision 9, is a proper procedure to obtain judicial review of the Commissioner’s administrative decision. Because Schnagl used the wrong procedure, a denial of his motion to correct his sentence was warranted.

In August 2000, Schnagl was adjudicated delinquent by the district court of first-degree criminal sexual conduct, Minn.Stat. § 609.342 (2014), and was sentenced to a term of 98 months. The sentence was stayed and Schnagl was placed on probation. In 2004, Schnagl violated the conditions of his probation and the district court executed his 98-month sentence and imposed a 5-year conditional-release term in accordance with MinmStat. § 609.109, subd. 7(a) (2000). Pursuant to Minn.Stat. § 244.101, subd. 1 (2014), the Commissioner released Schnagl from prison in July 2007, to serve the remaining one-third of his sentence on supervised release in the community.

Schnagl was returned to custody for violating the conditions of his supervised release on two separate occasions. First, Schnagl was arrested for failing to comply with chemical dependency programing and testing in September 2007. A hearing officer found that Schnagl violated the conditions of his supervised release, and therefore revoked his release status, and ordered him to serve an additional 90 days of incarceration. See Minn.Stat. § 244.05, subd. 3 (2014). Schnagl was released back into the community in December 2007. Second, in February 2008, a warrant was issued for Schnagl’s arrest because he left his treatment program and failed to notify his probation agent of his location. Schnagl was subsequently apprehended, his supervised release was revoked, and he was ordered to serve the remainder of his supervised-release term in custody. When Schnagl was later released from custody to begin his conditional-release term, the Commissioner notified Schnagl that he was not entitled to credit for the time spent in custody for his supervised-release violations, and therefore his conditional-release expiration date was extended to January 26, 2015.

In February 2013, Schnagl filed a motion to correct his sentence pursuant to Minn. R.Crim. P. 27.03, subd. 9, in Dakota County District Court. Schnagl relied on the conditional-release statute, MinmStat. § 609.109, subd. 7(a), to argue that his supervised-release term, whether served in custody or not, must be deducted from his 5-year conditional-release term, and therefore the expiration date of his conditional-release term had been illegally extended. He sought an order directing the DOC to subtract 32 months and 20 days of supervised-release time from his 5-year conditional-release term. In response, the State asserted that judicial review of the Commissioner’s administrative decision implementing the sentence imposed by the district court may not be obtained by filing a motion to correct a sentence under Minn. R.Crim. P. 27.03, subd. 9, because the rule does not authorize the requested relief. The State argued the district court lacked jurisdiction over the matter. Alternatively, the State argued Schnagl’s motion lacked merit.

The district court concluded that the first sentence of Minn. R.Crim. P. 27.03, subd. 9, which reads, “[t]he court may at any time correct a sentence not authorized by law,” provided the authority to review the DOC’s administration of Schnagl’s original sentence, and therefore the court had jurisdiction over the matter. Nevertheless, the court denied the motion to correct Schnagl’s sentence on its merits, concluding Schnagl was not entitled to credit against his conditional-release term for time spent incarcerated for violations of his supervised-release conditions.

Schnagl appealed the denial of his motion to correct his sentence to the court of appeals. On appeal, the State renewed its jurisdictional argument. Concluding that Minn. R.Crim. P. 27.03, subd. 9, authorized review of the DOC’s administrative decisions implementing the sentence imposed by the district court, the court of appeals rejected the State’s jurisdictional argument. State v. Schnagl, No. A13-1332, 2013 WL 6152348, at *2 (Minn.App. Nov. 25, 2013). Nevertheless, the court of appeals affirmed the district court’s denial of Schnagl’s motion to correct his sentence, explaining that Schnagl was not entitled to credit against his conditional-release term for time spent in custody for supervised-release violations. Id. at *5-6. Subsequently, we granted Schnagl’s petition to review the denial of his motion to correct his sentence, and the State’s conditional petition to review whether the district court had subject matter jurisdiction over this matter.

I.

The State argues that Schnagl’s motion to correct his sentence under Minn. R.Crim. P. 27.03 was the wrong procedure to obtain judicial review of the Commissioner’s administrative decision, and therefore the district court lacked subject matter jurisdiction. According to the State, the proper procedure is a petition for a writ of habeas corpus pursuant to Minn. Stat. § 589.01 (2014). We begin by examining the subject matter jurisdiction of the district court and the two procedures in question, and then we determine whether judicial review of the Commissioner’s administrative decision may be obtained by filing a motion to correct a sentence under Minn. R.Crim. P. 27.03.

A.

Subject matter jurisdiction is a court’s “statutory or constitutional power to adjudicate the case.” Steel Co. v. Citizens for a Better Env’t, 523 U.S. 83, 89, 118 S.Ct. 1003, 140 L.Ed.2d 210 (1998). Put differently, subject matter jurisdiction refers to a court’s authority “ ‘to hear and determine a particular class of actions and the particular questions’ presented to the court for its decision.” Giersdorf v. A & M Constr., Inc., 820 N.W.2d 16, 20 (Minn. 2012) (quoting Robinette v. Pnce, 214 Minn. 521, 526, 8 N.W.2d 800, 804 (1943)); see also Seehus v. Bor-Son Constr., Inc., 783 N.W.2d 144, 147 (Minn.2010). Without subject matter jurisdiction, the court must dismiss the claim. See Tischer v. Hous. & Redev. Auth. of Cambridge, 693 N.W.2d 426, 427 (Minn.2005) (holding that district court erred in failing to dismiss claim for lack of subject matter jurisdiction).

Minnesota’s district courts are courts of general jurisdiction that, with limited exceptions not applicable in this case, have the power to hear all types of civil and criminal cases. Minn. Const, art. VI, § 3; see In re Civil Commitment of Giem, 742 N.W.2d 422, 429 (Minn.2007) (“Our state constitution provides a broad grant of subject matter jurisdiction to the district court....”). Article VI, Section 3 of the Minnesota Constitution expressly states that “[t]he district court has original jurisdiction in all civil and criminal cases.” District courts have original jurisdiction over the sentence imposed in a criminal case. See State v. Shattuck, 704 N.W.2d 131, 148 (Minn.2005) (“[T]he imposition of a sentence in a particular case ... is a judicial function.”).

Applying these principles here, we conclude the district court had subject matter jurisdiction over Schnagl’s motion to correct his sentence. Having resolved the question of subject matter jurisdiction, we consider the two procedures referenced in the State’s argument: a motion to correct a sentence under Minn. R.Crim. P. 27.03 and a petition for a writ of habeas corpus under Minn.Stat. § 589.01.

B.

Minnesota Rule of Criminal Procedure 27.03, subdivision 9, in relevant part, provides that the district court may “at any time correct a sentence not authorized by law.” It provides the district court with the authority to correct a sentence that was unauthorized by law at the time it was imposed. See State v. Garcia, 582 N.W.2d 879, 881 (Minn.1998); State v. Humes, 581 N.W.2d 317, 320 (Minn.1998). For a sentence to be unauthorized, it must be contrary to law or applicable statutes. See Humes, 581 N.W.2d at 319-20. Rule 27 authorizes the district court to correct an illegal sentence “at any time.” Minn. R.Crim. P. 27.03, subd. 9 (emphasis added).

We have approved of the use of Rule 27.03, subdivision 9, to correct the conditional-release term of a previously imposed sentence. See Garcia, 582 N.W.2d at 881; Humes, 581 N.W.2d at 321. But in these cases, we concluded that the sentence as originally imposed was incorrect, and the district court therefore had the power to correct the sentence pursuant to Minn. R.Crim. P. 27.03, subd. 9. Garcia, 582 N.W.2d at 881 (“As [the statute] requires that Garcia’s sentence include a conditional release term, his original sentence without the term was unauthorized and the court had jurisdiction under Minn. R.Crim. P. 27.03, subd. 9 to amend it.” (emphasis added)); Htimes, 581 N.W.2d at 320 (“[T]he district court simply made an error of law in failing to include the mandatory conditional release term” in the original sentence.).

C.

The writ of habeas corpus is a remedy available to a confined person to obtain relief regarding the custody imposed, or the length of confinement in a given case. See Minn.Stat. § 589.01 (“A person ... restrained of liberty ... may apply for a writ of habeas corpus to obtain relief from imprisonment or restraint.”). Although we have not expressly endorsed the use of habeas corpus to challenge the Commissioner’s administrative decisions regarding the length of an offender’s release term, we have implicitly approved it. See, e.g., State ex rel. Fox v. Young, 298 Minn. 527, 528, 199 N.W.2d 156, 156-57 (1972) (affirming the district court’s denial of habeas relief in a challenge to the revocation of parole). In State ex rel. Bassett v. Tahash, 268 Minn. 447, 116 N.W.2d 564 (1962), we said “the function of the writ of habeas corpus is to relieve one from unlawful restraint.” Id. at 448, 116 N.W.2d at 565. We have also recognized that a petition for a writ of habeas corpus “allows the district court to review the petition, hold a hearing if appropriate, and order relief’ when the Commissioner’s “release revocation process” is challenged. State v. Schwartz, 628 N.W.2d 134, 141 n. 3 (Minn. 2001); see also State v. Clark, 270 Minn. 181, 183, 132 N.W.2d 811, 812 (1965) (recognizing that “habeas corpus may be used as a postconviction procedure to inquire into alleged violations of freedoms considered to be basic and fundamental”).

D.

With these principles in mind, we return to the question. of whether Schnagl’s motion to correct his sentence is the proper procedure to obtain judicial review of the Commissioner’s decision. Notably, a motion to correct a sentence under Minn. R.Crim. P. 27.03, subd. 9, provides for review of the legality of the district court’s sentence at the time it was imposed. In other words, the rule provides a procedure to challenge the decisions of the district court. In contrast, an offender on supervised or conditional release remains “in the legal custody and under the control of’ the Commissioner of Corrections, Minn.Stat. § 243.05, subd. 1(b) (2014), and therefore, a request for the correction of a release term challenges the decision of the Commissioner of Corrections. We note that the authority of a court to review a sentence is separate and distinct from judicial authority to review the decisions of the Commissioner in administering the sentence imposed. Compare Minn.Stat. § 244.11, subd. 2(b) (2014) (“[T]he court may review the sentence imposed _”), with Schwartz, 628 N.W.2d at

140 (stating that supervised and conditional release' “ ‘arise[ ] after the end of the criminal prosecution, including imposition of sentence’ and [are] supervised by an administrative agency and not by the court” (quoting Morrissey v. Brewer, 408 U.S. 471, 480, 92 S.Ct. 2593, 33 L.Ed.2d 484 (1972))).

Moreover, Rule 27.03, subdivision 9, does not provide the district court with a procedural vehicle to address the administrative decisions of the Commissioner of Corrections, such as calculating the number of days for which an offender is entitled to credit and the expiration date of a conditional-release term. Significantly, the Commissioner’s administrative decision-making involving the calculation of the number of days, credits against a release date, or expiration date of a supervised- or conditional-release term, does not involve the legality of the sentence imposed by the district court. Instead, the Commissioner’s decision involves the gathering of facts, and application of those facts to the sentence, to determine whether the offender has satisfied the terms of the sentence imposed by the district court.

Importantly, Rule 27.03 motions are' filed in the criminal proceeding between the State and the defendant in which the Commissioner is not a party and has no means to intervene. Cf. State v. Stith, 292 N.W.2d 269, 275 (Minn.1980) (declining to address a challenge in a direct appeal to the calculation of an offender’s eligibility date for parole “because the [DOC] is not a party to this action”). In the absence of the Commissioner as a party, a district court’s order directing the Commissioner to correct the expiration date of a conditional-release term could very well be a non-binding advisory opinion. See Izaak Walton League of Am. Endowment, Inc. v. State, Dep’t of Natural Res., 312 Minn. 587, 589, 252 N.W.2d 852, 854 (1977) (explaining that as a general rule “[t]he judicial function does not comprehend the giving of advisory opinions”); see also State v. Martinez-Mendoza, 804 N.W.2d 1, 9 (Minn.2011) (stating that we do not issue advisory opinions); State v. Arens, 586 N.W.2d 131,132 (Minn.1998) (same).

Unlike a Rule 27.03 motion, a petition for a writ of habeas corpus provides the district court with authority to review the Commissioner’s administrative decisions regarding the calculation of the number of days for which an offender is entitled to credit, and the expiration date of the conditional-release term. A habeas petition is a civil action in which the Commissioner must be named as a party. See Minn.Stat. § 589.04(b) (2014); State v. Clark, 270 Minn. 181, 185, 132 N.W.2d 811, 814 (1965) (explaining that in a habeas proceeding “the county attorney is not a proper respondent with custody”). Moreover, the district court may conduct an evidentiary hearing with the petitioner and Commissioner present to offer evidence and testimony that will provide a record for the district court’s decision. See Schwartz, 628 N.W.2d at 141 n. 3; Willoughby v. Utecht, 223 Minn. 572, 575, 27 N.W.2d 779, 781 (1947) (“Controverted questions of fact in habeas corpus proceedings must be proved the same as in other legal proceedings.”).

Consequently, we conclude that a motion to correct a sentence under Minn. R.Crim. P. 27.03, subd. 9, is not the proper procedure to obtain judicial review of the Commissioner’s administrative decision implementing the sentence imposed by the district court. Instead, judicial review of the Commissioner’s administrative decision implementing the sentence imposed may be obtained by a petition for a writ of habeas corpus in which the Commissioner is a named party.

II.

In sum, we conclude that a motion to correct a sentence under Minn. R.Crim. P. 27.03, subd. 9, is not the proper procedure to obtain judicial review of the Commissioner’s administrative decision implementing the sentence imposed by the district court. Instead, judicial review of the Commissioner’s administrative decision implementing the sentence imposed may be obtained by filing a petition for a writ of habeas corpus in which the Commissioner is a named party. Consequently, we affirm the decision of the court of appeals affirming the district court’s denial of Schnagl’s motion to correct his sentence, but we do so without reaching the merits of Schnagl’s motion. Specifically, we reject the court of appeals’ conclusion that Rule 27.03, subdivision 9, is a proper procedure to obtain judicial review of the Commissioner’s administrative decision. Because Schnagl used the wrong procedure, a denial of his motion to correct his sentence was warranted.

Affirmed as modified. 
      
      . Minnesota Statutes § 609.109, subd. 7, was repealed in 2005 and recodified at Minn.Stat. § 609.3455, subd. 6 (2014). Act of May 31, 2005, ch. 136, art. 2, § 21, 2005 Minn. Laws 901, 929. The language is generally the same, although the conditional release term is now 10 years, rather than 5. Unless otherwise indicated, we refer in this opinion to the statute in effect when Schnagl was sentenced, Minn.Stat. § 609.109, rather than the current version of the statute.
     
      
      .A series of court of appeals decisions have similarly held that an offender’s conditional-release term should not be reduced by time spent in custody for supervised-release violations. See, e.g., State v. Ward, 847 N.W.2d 29, 34 (Minn.App.2014), rev. granted (Minn. June 17, 2014); Williamson v. State, No. A13-1783, 2014 WL 3396504, at *1-2 (Minn.App. July 14, 2014); State v. Brown, No. A14-0036, 2014 WL 1875912, at *2 (Minn.App. May 12, 2014), rev. granted (Minn. Aug. 5, 2014); State v. McCoy, No. A13-2260, 2014 WL 1758388, at *2 (Minn.App. May 5, 2014), rev. granted (Minn. July 15, 2014).
     
      
      . Originally, Schnagl argued to the district court that he was entitled to credit for the 202 days he spent on warrant status. At oral argument before the court of appeals, Schnagl conceded that he was not entitled to credit for that time period. Schnagl, 2013 WL 6152348, at *4 n. 4.
     
      
      . The Commissioner of the Minnesota Department of Corrections brought a motion to appear and participate in this case as an amicus curiae, and that motion was granted. The Commissioner joins the State in arguing that the district court lacked subject matter jurisdiction in this case.
     
      
      . Special proceedings exclusively cognizable by some other court or tribunal are excepted from the original jurisdiction of Minnesota district courts. Minn.Stat. § 484.01, subd. 1(3) (2014).
     
      
      . The language of Minn.Stat. § 589.02 (2014) allows the petitioner to petition for a writ of habeas corpus in "the Supreme Court, Court of Appeals, or ... the district court.” However, we have long recognized the "intent of the legislature that wherever possible petitioner should seek his writ of habeas corpus in the county where he is being detained,” especially because appellate courts, as compared to the district courts, are "not equipped to take testimony and to examine witnesses in the proceedings that would be required by entertaining original writs of habeas corpus.” State ex rel. Alexander v. Rigg, 247 Minn. 110, 113, 76 N.W.2d 478, 480 (1956).
     
      
      . As an alternative argument, the State argues, and the Commissioner agrees, that a writ of certiorari is an acceptable procedure to challenge the Commissioner’s administrative decisions regarding the implementation of sentences. See Minn.Stat. ch. 606 (2014); Honn v. City of Coon Rapids, 313 N.W.2d 409, 414 (Minn.1981) (The writ of certiorari is issued "to review the proceedings of a tribunal exercising judicial or quasi-judicial functions.”). Because we conclude that a petition for a writ of habeas corpus is an appropriate procedure to challenge the Commissioner’s administrative decisions regarding the implementation of sentences, it is not necessary to reach this alternative argument and therefore we decline to do so.
     
      
      . Schnagl moves this court to strike portions of the DOC’s amicus brief on the ground that it contains facts that are outside the record, and a paragraph of an affidavit filed by the DOC on the ground that it contains facts that are not public and not in the record. The DOC and the State oppose the motion to strike. Because we conclude that Schnagl's Rule 27.03, subdivision 9, motion is not the proper procedure to obtain judicial review, it is not necessary to reach Schnagl's motion to strike, and we decline to do so.
     
      
      . Because we conclude that a Rule 27.03, subdivision 9 motion is not the proper procedure to review the Commissioner's administrative decision, we need not reach the merits of Schnagl’s statutory interpretation argument. Nothing in this opinion should be read as precluding Schnagl from filing a petition for habeas corpus if he continues to seek relief from the Commissioner’s decision and remains in custody.
     