[¶ 1] The State appeals a judgment entered in the Superior Court (Knox County, Marden, J.) ordering that: (1) the Department of Corrections (DOC) immediately deliver Michael J. James to the custody of the Commissioner of the Department of Health and Human Services (DHHS) for placement in a treatment facility for the mentally ill in accordance with an order resulting from a determination of not criminally responsible in one criminal matter; and (2) James’s pre-existing prison sentence resulting from a previous criminal matter be tolled until James receives an order of release or discharge from DHHS custody. The State argues that the court erred in giving enforcement priority to the commitment order over the valid and outstanding order for incarceration. James cross-appeals the judgment arguing that the court lacked authority to toll his prison sentence and appeals a separate order denying his petition for a writ of habeas corpus and ordering him to proceed under a petition for post-conviction review pursuant to 15 M.R.S. §§ 2121-2132 (2007). We affirm the judgment.
I. BACKGROUND
[¶ 2] On May 21, 2004, while serving a twelve-year sentence at the Maine State *1154Prison, Michael James was convicted of one count of witness tampering and eleven counts of assault on an officer. The court (Brodrick> A.R.J.) sentenced James to three years, to be served consecutively to his twelve-year sentence. Pursuant to 17-A M.R.S.A. § 1256 (Supp.2004),1 James’s twelve-year sentence was interrupted so that he could serve this three-year sentence first.
[¶ 3] While serving this three-year prison sentence, James was charged with ten more counts of assault on an officer. On June 27, 2006, a Knox County jury found James not criminally responsible by reason of mental disease or defect on these counts, and the Superior Court (Marden, J.) ordered him committed to DHHS custody “to be placed in an appropriate institution for the mentally ill ... for care and treatment” pursuant to 15 M.R.S. § 103 (2007). The order did not state whether James was to be committed to DHHS custody before or after serving the remainder of his prison sentence.
[It 4] The Attorney General’s office reviewed the conflicting orders relating to James’s custody and opined that James should remain in DOC custody until his term of imprisonment is complete, after which he would be taken into DHHS custody for placement in a psychiatric institution. The Attorney General’s office shared this opinion with the court, noting that the prison would retain the option of initiating an emergency involuntary admission should James’s illness or behavior warrant treatment during his incarceration.
[¶ 5] James, who was then still housed in the Maine State Prison, filed a petition for a writ of habeas corpus in the Superior Court, dated September 15, 2006, naming the Commissioners of DOC and DHHS as respondents. James argued that deferral of his placement in the custody of DHHS was not warranted pursuant to the court’s order or the applicable statute, that the Maine State Prison was not an appropriate institution to care for the mentally ill, and that DOC and DHHS were failing to implement the court’s June 27, 2006, order. The respondents moved for dismissal of the petition.
[¶ 6] On January 5, 2007, following a hearing, the court denied James’s petition for a writ of habeas corpus, holding that the writ of habeas corpus has been replaced by the statute providing for post-conviction review, 15 M.R.S. §§ 2122, 2124, and that James could challenge the legality of his detention by DOC only by way of a post-conviction proceeding. The court ordered that James’s petition be treated as a petition for post-conviction review and gave James leave to amend the petition in order to cause it to conform to the statutory requirements and M.R.Crim. P. 67.
[¶ 7] James amended his petition, naming the State as the respondent. In preparation for the post-conviction hearing, the parties stipulated that the Maine State Prison is not “an appropriate institution for the mentally ill ... for care and treatment” under 15 M.R.S. § 103.
[¶ 8] The court entered a judgment on July 25, 2007, ordering James committed immediately to DHHS custody for placement in a psychiatric hospital, and holding that his pre-existing prison sentence will be tolled until James receives an order of release or discharge from the custody of DHHS pursuant to 15 M.R.S. § 104-A (2007), at which time he is to be delivered back to DOC custody.2
[¶ 9] The State and James both appeal this order. James also appeals the court’s *1155denial of his petition for a writ of habeas corpus. We waived the requirement that the parties obtain a certificate of probable cause to appeal a post-conviction review decision.
II. DISCUSSION A. Post-Conviction Status
[¶ 10] In his cross-appeal, James argues that, although the statutory remedy of post-conviction review has replaced the remedies available through post-conviction habeas corpus, the court erred in denying his petition for writ of habeas corpus and ordering him to challenge his detention by DOC through a petition for post-conviction review. We disagree.
[¶ 11] We review this issue de novo. See Christian Fellowship & Renewal Ctr. v. Town of Limington, 2006 ME 44, ¶ 9, 896 A.2d 287, 291 (stating that “we review de novo for errors of law when the parties ... do not dispute the factual findings”); State v. Shepley, 2003 ME 70, ¶ 9, 822 A.2d 1147, 1150 (“The interpretation of a statute is a matter of law that we review de novo.” (quotation marks omitted)).
[¶ 12] The statutory remedy of post-conviction review, 15 M.R.S. §§ 2121-2132, was intended to fully replace and implement the constitutional right of post-conviction habeas corpus as it pertains to a post-sentencing proceeding that occurs during the course of an offender’s sentence. See 15 M.R.S. § 2122. Section 2122 provides:
This chapter provides a comprehensive and, except for direct appeals from a criminal judgment, the exclusive method of review of those criminal judgments and of post-sentencing proceedings occurring during the course of sentences. It is a remedy for illegal restraint and other impediments specified in section 2124 that have occurred directly or indirectly as a result of an illegal criminal judgment or post-sentencing proceeding. It replaces the remedies available pursuant to post-conviction habeas corpus, to the extent that review of a criminal conviction or proceedings [is] reviewable, the remedies available pursuant to common law habeas corpus, ... and any other previous common law or statutory method of review.... The substantive extent of the remedy of post-conviction review is defined in this chapter and not defined in the remedies that it replaces; provided that this chapter provides and is construed to provide relief for those persons required to use this chapter as required by the Constitution of Maine, Article 1, Section 10.
(Emphasis added.) “The plain purpose of the post-conviction review statute is to provide a single, unified system of post-conviction relief, replacing the procedural complexities of the past.” Fernald v. Me. State Parole Bd., 447 A.2d 1236, 1239 (Me.1982).
[¶ 13] Title 15 M.R.S. § 2124 of the post-conviction review statute provides:
An action for post-conviction review of a criminal judgment of this State or of a post-sentencing proceeding following the criminal judgment may be brought if the person seeking relief demonstrates that the challenged criminal judgment or post-sentencing proceeding is causing a present restraint or other specified impediment as described in subsections 1 to 3.
Subsection (2) provides that one may seek post-conviction review with respect to “[i]ncarceration ... imposed pursuant to a *1156post-sentencing proceeding following a criminal judgment, although the criminal judgment itself is not challenged.” 15 M.R.S. § 2124(2). A post-sentencing proceeding is defined to include an “administrative action occurring during the course of and pursuant to the operation of a sentence that affects whether there is incarceration or its length_” 15 M.R.S. § 2121(2). A “criminal judgment” includes a judgment of not criminally responsible by reason of mental disease or defect 15 M.R.S. § 2121(1).
[¶ 14] DOC’s action in deciding to retain custody of James, despite the court’s order that James be committed to DHHS custody for treatment, constitutes a post-sentencing proceeding for purposes of the post-conviction review statute. See 15 M.R.S. § 2121(2); see also Parkinson v. State, 558 A.2d 361, 362 (Me.1989) (stating that prison authorities’ refusal to award work-related “good time” to appellant “falls within the definition of a ‘post-sentencing proceeding’ under the post-conviction review statute”).
B. James’s Placement
[¶ 15] In absolute terms, the issue now before us is whether the court erred in determining that the subsequent order committing James to DHHS custody takes priority over a previous order committing him to DOC custody. The statutes providing for the disposition of an individual convicted of a crime, 17-A M.R.S. § 1252(1)(B)(2) (2007), and of an individual found not criminally responsible, 15 M.R.S. § 103, are both nondiscretionary. Section 1252(1)(B)(2) provides that a court “must ... [c]ommit the person to the Department of Corrections if the term of imprisonment is more than 9 months,” while section 103 states that, if a defendant is found not criminally responsible by reason of insanity, the court “shall order the person committed to the custody of [DHHS].... ” Neither statute provides a mechanism for determining which disposition of James, delivery to DOC or to DHHS, would take priority in the event of a conflict. Again, we review this issue de novo. See Christian Fellowship & Renewal Ctr., 2006 ME 44, ¶ 9, 896 A.2d at 291; Shepley, 2003 ME 70, ¶9, 822 A.2d at 1150.
[¶ 16] A review of the plain language of the statutes themselves does not assist us in our determination of priority, as they appear to be inconsistent. When construing statutes, however, we must attempt to determine the legislative intent demonstrated both by the language used in each statute, and by the entire statutory scheme in which the language is found. Jordan v. Sears, Roebuck & Co., 651 A.2d 358, 360 (Me.1994). When statutes appear to clash, we harmonize them if at all possible. Yeadon Fabric Domes, Inc., v. Me. Sports Complex, LLC, 2006 ME 85, ¶20, 901 A.2d 200, 206.
[¶ 17] The State argues that the scenario presented by this case was contemplated by the Legislature when it enacted 15 M.R.S. § 2124(1-A), as that statute provides that a person may file a post-conviction review petition to challenge a future restraint or impediment due to an order of commitment to the custody of DHHS pursuant to 15 M.R.S. § 103 “when a sentence involving imprisonment is or will be served first.” Given the placement of that language within the post-conviction statutory chapter, we cannot accept the State’s assertion that it mandates that James serve his sentence before commitment. Section 2124(1-A) simply states that an order of commitment resulting from a determination that one is not criminally responsible does create a restraint or impediment sufficient to trigger post-conviction jurisdiction.3 The Legislature’s de-*1157cisión to include future commitments within the category of orders that establish possible avenues for post-conviction review does, however, preclude us from accepting James’s assertion that 15 M.R.S. § 108 mandates his immediate commitment to DHHS.
[¶ 18] In State v. Flemming, 409 A.2d 220 (Me.1979), we addressed the reverse, but analogous, situation from that presented here. Flemming was charged with murder and, after being found not guilty by reason of mental disease, was committed pursuant to 15 M.R.S.A. § 103 (Supp.1974) for placement in a treatment facility. Flemming, 409 A.2d at 222. He was subsequently found guilty of escaping from the facility. Id. The sentencing court ordered Flemming to serve five years in prison, but stayed the imposition of the sentence until after he was discharged from the mental health institution. Id. We affirmed the court’s order deferring Flem-ming’s prison sentence noting first that, had Flemming been convicted of murder and then convicted of escaping from prison while serving his sentence for murder, a consecutive sentence would have been mandated. Id. at 224, 226. We stated, “[b]y analogy to consecutive sentencing, therefore, it is not inconsistent to defer the execution of a criminal sentence until a discharge from a mental institution.” Id. at 225. We suggested that doubt might arise if the trial court in that case had ordered that immediate incarceration su-perceded the original order of commitment. Id. at 226. Commitments, unlike sentences, are indeterminate, and are dependent upon the defendant’s status and actions. Removing Flemming from his commitment before a determination was made that the commitment was no longer necessary could have undermined the purpose and efficacy of the commitment.4
[¶ 19] As we consider the purposes to be served by incarceration, and the purposes to be served by commitment for treatment, we find that the statutory schemes supporting these disparate placements do not lend themselves to one resolution of this issue. We are unwilling to impose a one-size-fits-all solution to one of the most complex questions faced by society and courts, and we conclude that the better solution is one that relies on the measured judgment and discretion of the trial courts. By the time a defendant is found to be not criminally responsible, the trial court has had an opportunity to watch, listen to, and evaluate the defendant and the medical and psychiatric witnesses presented by him and by the State. The trial court is, therefore, in a position to decide whether the defendant’s mental status is such that immediate commitment to DHHS is warranted, or whether, because of the lapse of time, the nature of the defendant’s mental defect or disease, or some other factor or factors, immediate commitment is not warranted.
[¶ 20] In Flemming, we noted that, when a defendant is found not criminally responsible, he enters an “exceptional class” such that the reasonable and humane response is to commit him to a hospital for treatment, noting also that “the *1158public acquire[s] a special interest in [the defendant’s] confinement and release” to ensure that he poses no threat to himself or to public safety. Id. at 225 (quotation marks and emphasis omitted). We also noted the potential “beneficial impact” of the trial court’s decision to defer Flem-ming’s prison sentence until his release from the mental hospital, stating that the decision “permits Flemming, or one similarly situated, to continue treatment for his mental disease or defect prior to serving his specific sentence for criminal conduct.” Id.
[¶ 21] Although James was incarcerated at the time he committed new acts that comprised crimes, as soon as it was determined that he was not criminally responsible for those acts, he nonetheless became a member of the exceptional class for whom a reasonable and humane response is commitment to a hospital for treatment. The immediate commitment to DHHS of prisoners determined to be not criminally responsible while incarcerated does not detract from the penal purposes of criminal sentences, and does allow for the care and treatment required by those prisoners. For that reason, the Superior Court’s decision to immediately commit James to DHHS custody does not constitute an abuse of discretion.
[¶22] The holding in Flemming does not, however, preclude a trial court from deferring a prisoner’s commitment to DHHS, based on any number of factors, including the State’s obligation to provide adequate and appropriate medical and psychiatric treatment to its prisoners. The court presiding over the trial that results in a determination that the defendant is not criminally responsible is best able to judge whether hospital confinement is immediately necessary, or whether continued confinement by DOC until the defendant’s sentence is discharged would serve the needs of the defendant and of the public.5
[¶ 23] The State has argued that the public interest in confining James and ensuring both his safety and the public’s safety is served by having him complete the remainder of his prison sentence before being committed to DHHS custody. It has argued that prisoners in DOC custo*1159dy may be hospitalized under civil commitment provisions should they need acute psychiatric care pursuant to 34-A M.R.S. § 3069(1) (2007), referencing 34-B M.R.S. § 3863 (2007). While we hesitate to second-guess DOC’s judgment in determining when those entrusted to its custody require hospitalization, we note that James was in DOC custody at the Maine State Prison, not placed in a mental health facility pursuant to section 3069, when the series of assaults occurred in 2004 and 2005, for which a jury determined he was not criminally responsible.
[¶ 24] Pursuant to the terms of 15 M.R.S. § 104-A, James may be returned to DOC custody when it is determined that he does not present a danger to himself or others because of a mental disease or defect. As soon as a staff psychiatrist believes that James could be “released or discharged without likelihood that [he] will cause injury to [himself] or to others due to mental disease or mental defect,” a report to that effect must be sent to the Commissioner of DHHS, and the Commissioner is required to forward that report to the Superior Court. 15 M.R.S. § 104-A(3). The court must then hold a civil hearing to determine James’s readiness for discharge. Id. § 104-A(1). James himself may also petition the court for release under this section. Id. § 104-A(3). We emphasize that the decision to be made by the psychiatrist and the court pursuant to section 104-A is whether James presents a danger because of his mental illness or defect. Even without the complication of mental illness, James may present a danger to others, but if any such continuing dangerous behavior is not due to mental illness, or if his mental illness is not amenable to treatment, then there may be no reason for James’s continuing commitment.
C. Tolling of Sentence
[¶ 25] A prisoner’s sentence will continue to run if he is placed in a mental health facility pursuant to 34-A M.R.S. § 3069 because he is still within the custody and control of DOC, despite his placement.6 Having been found not criminally responsible, however, and thereafter committed to the custody of DHHS, James was removed from the custody and jurisdiction of DOC, and, therefore, from penal controls. He has not been “placed” with DHHS; he has been — and is — committed to its control and jurisdiction. So long as James is properly committed to DHHS custody pursuant to 15 M.R.S. § 103, his sentence will be tolled because a commitment authorized pursuant to 15 M.R.S. § 103 is not deemed to be a punishment. See Flemming, 409 A.2d at 225.
[¶ 26] As noted above, on July 25, 2007, the Superior Court ordered that James be taken out of the custody of DOC and committed to the custody of DHHS. At oral argument, we learned that he continues in that commitment.
[¶ 27] During this commitment, James should have been subject to the release provisions of 15 M.R.S. § 104-A. On the record before us, we cannot determine whether those requirements have been met. If James’s status has not been reviewed, and if his commitment with DHHS has been extended only because there has been no annual review or because the hospital has failed to report its opinion that James was ready to be released or dis*1160charged, and thus returned to the custody of DOC, then the hospital must comply with its statutory obligation immediately. The entry is:
Judgment affirmed.
. Title 17-A M.R.S.A. § 1256 has since been amended. P.L.2005, ch. 329, § 4 (effective Sept. 17, 2005) (codified at 17-A M.R.S. § 1256 (2007)).
. On June 27, 2006, a jury determined that James was not criminally responsible for acts he committed on June 12, 2004, April 16, 2005, April 18, 2005, May 26, 2005, and June *11557, 2005. The Superior Court ordered James placed in DHHS custody on July 25, 2007, more than a year after the jury’s finding. The State requested that the Superior Court’s order be stayed pending appeal, but the Superi- or Court denied that request. James began his placement with DHHS in July 2007, some twenty-five months after the last incident.
. The restraint or impediment may be "present” if one is committed immediately into *1157DHHS custody or "future” if the commitment is to begin after a sentence involving imprisonment. 15 M.R.S. § 2124(1-A)(2007).
. The Legislature has recently enacted a law that changes the outcome of a Flemming situation. See P.L.2007, ch. 475, § 3 (effective June 30, 2008) (to be codified at 15 M.R.S. § 103-A). It provides that a person who has been committed to DHHS custody pursuant to section 103, who is subsequently either convicted of a crime or found to be in violation of conditional release terms must serve the subsequently-imposed sentence of imprisonment with DOC before being returned to DHHS custody for further commitment. This enactment is inapplicable to the situation faced by James.
. In concluding that a trial court may exercise its discretion in deciding which order would take priority in a case such as this, we distinguish this case from Chase v. Kearns, 278 A.2d 132 (Me.1971) (overruled in part by Taylor v. Comm’r of Mental Health & Mental Retardation, 481 A.2d 139, 145, 148-49 (Mel984)). In Chase, we held that a defendant’s due process rights are not violated when, after being found not criminally responsible for a criminal act due to a mental disease or defect, a defendant is committed to the custody of (what is now known as) DHHS without a determination as to whether he suffers from mental disease at the time of commitment. Id. at 133, 138.
We stated in dicta in Chase that “[t]he Legislature has reasonably concluded that the security of the community and the welfare of the [defendant] can best be served if the defendant is confined to an institution for the mentally ill during this necessary [post-verdict] period of observation (and, if required, of treatment).” Id. at 135. In Chase, however, unlike the present case, the court was not presented with the possibility of addressing the dual goals of community security and individual welfare through the defendant’s continued placement in DOC custody prior to commitment to DHHS. We, therefore, are not obliged under the analysis in Chase to hold here that an order committing a defendant to DHHS custody must always take priority over a pre-existing order to DOC custody. Rather, we foresee situations in which a trial court may determine, based on the particular facts of the situation before it — such as the demeanor of the defendant at trial, the length of time remaining in his pre-existing sentence, the crime for which he was previously sentenced, and the crime for which he is determined not criminally responsible — that returning the defendant to DOC custody to complete a previously-imposed sentence test meets the interests of all concerned.
. Compare 34-A M.R.S. § 3069(1)(D), (E), (2)(C), (D) (2007) with 17-A M.R:S. § 1256(1) (2007), which mandates that a prisoner be sentenced to consecutive, rather than concurrent, terms when convicted of a crime committed while incarcerated and which permits the sentencing court to toll the undischarged portion of the original sentence so that the subsequently-imposed sentence may be served immediately.