
656 N.W.2d 314 (2003)
2003 SD 1
Randy CLOSS, Plaintiff and Appellant,
v.
SOUTH DAKOTA BOARD OF PARDONS AND PAROLES, Defendant and Appellee.
No. 22235.
Supreme Court of South Dakota.
Considered on Briefs August 26, 2002.
Decided January 8, 2003.
*315 Darren Magee, Office of the Minnehaha County, Public Defender, Sioux Falls, South Dakota, Attorney for plaintiff and appellant.
Lawrence E. Long, Attorney General, Craig M. Eichstadt, Deputy Attorney General, Pierre, South Dakota, Attorneys for defendant and appellee.
ZINTER, Justice.
[¶ 1.] Randy Closs was released from a criminal sentence he was serving in the state penitentiary. He was released pursuant to a writ of habeas corpus issued by a federal district court. Upon his release, the Minnehaha County Board of Mental Illness determined that Closs was mentally ill, and that Board committed Closs to the Human Services Center (HSC). Fourteen months later, the federal district court's writ was reversed by the Eighth Circuit Court of Appeals. After the reversal, Closs was discharged from the HSC, and he returned to the state penitentiary to complete his original criminal sentence. In calculating the remaining time to serve on that sentence, the Board of Pardons and Paroles (Board) denied Closs credit for the fourteen months he was committed at the HSC. Closs appeals the denial of that credit. We affirm.

FACTS
[¶ 2.] In 1984 Closs was convicted of second-degree burglary, third-degree burglary and grand theft. We affirmed the convictions in State v. Closs, 366 N.W.2d 138 (S.D.1985).
[¶ 3.] In 1997 Closs was paroled. Because of a long history of mental illness, his parole was contingent on "beginning and maintaining psychological and psychiatric treatment at a facility or with a psychologist approved by the board." Closs initially complied with this condition by voluntarily entering a Board approved mental health facility for psychiatric treatment. However, once at the facility, he refused to take his prescribed medication.
[¶ 4.] Consequently, Closs's parole agent filed a parole violation report, and the Board held a hearing on the alleged parole violation. At the hearing, Closs admitted that he did not take his medication while in treatment, but he asserted that the conditions of his parole did not require him to do so. The Board rejected Closs's argument and revoked his parole. As a result of the parole revocation, the Board also reduced Closs's "good-time" credit by two years. See SDCL §§ 24-15-24 *316 and 24-5-1.[1]
[¶ 5.] Closs did not appeal this Board decision. Instead, Closs filed a writ of habeas corpus in state court. In the state habeas proceeding, Closs attacked the validity of his parole revocation. The state habeas court denied the writ, and this Court summarily affirmed. Closs v. Weber, 596 N.W.2d 734 (S.D.1999).
[¶ 6.] Closs then attacked the validity of his parole violation in federal district court. That court concluded that the parole revocation was invalid, and it issued a writ of habeas corpus. Closs v. Weber, 87 F.Supp.2d 921 (D.S.D.1999). This action also reinstated Closs's two years of good-time credit. When the two years of good-time credit were reinstated by the federal court, Closs had completed his prison sentence and he was free to leave the penitentiary.
[¶ 7.] However, before Closs left the penitentiary, the State initiated two proceedings to stop Closs's impending release. In the first proceeding, the state appealed the federal district court's decision to the Eighth Circuit Court of Appeals. As a part of that appeal, the State moved the federal district court to hold Closs in prison pending a decision by the Court of Appeals. The federal district court denied that motion, and it ordered that Closs be released from the penitentiary.
[¶ 8.] The second proceeding, which generated this appeal, involved a civil mental illness commitment under SDCL ch 27A-10. That proceeding was initiated by Dale Lint, the Director of Mental Health Services for the penitentiary. Lint filed a petition with the Minnehaha County Board of Mental Illness alleging that Closs was mentally ill and was a danger to those around him. Lint requested an emergency commitment to the HSC under SDCL 27A 10-1.
[¶ 9.] Lint's petition was based on Closs's long history of mental illness, including an early diagnosis of schizophrenia, and later, dangerous conduct in the penitentiary. The latter conduct included physical and verbal assaults, as well as throwing bodily substances on staff and fellow inmates. Based on Lint's working relationship with Closs, Lint believed that Closs was a substantial danger to the community because Closs would again refuse to take his medication.[2]
*317 [¶ 10.] The petition for emergency mental commitment was considered by the Minnehaha County Board of Mental Illness. That body found that Closs was a danger to himself and others, and it issued an emergency warrant for Closs's commitment. Consequently, upon his release from prison on January 10, 2000, Closs was committed to the HSC. After arriving at the HSC, the Yankton County Board of Mental Illness conducted a regular mental illness hearing. That body involuntarily committed Closs for treatment. See SDCL ch 27A-10.
[¶ 11.] Closs spent approximately fourteen months at the HSC pursuant to this mental illness commitment. At the same time, the state's appeal on the federal writ proceeded in the Eighth Circuit Court of Appeals. On January 30, 2001, the Eighth Circuit reversed the federal district court in all respects. Closs v. Weber, 238 F.3d 1018 (8th Cir.2001). Closs was subsequently discharged from the HSC, and he returned to the penitentiary on March 9, 2001 to complete his criminal sentence.
[¶ 12.] After Closs's return to the penitentiary, the Board held a hearing to consider reinstatement of the 1997 parole violation. As a part of that proceeding, the Board also considered whether Closs was entitled to receive credit on his criminal sentence for the fourteen months he spent at the HSC during his mental commitment. The Board ultimately reinstated the parole violation but denied Closs's request for credit for the fourteen months he spent at the HSC. The Board denied credit for Closs's time at HSC because the Board concluded that the time was not "in furtherance of Closs's criminal sentence." The circuit court affirmed, and Closs now appeals the denial of credit.

STANDARD OF REVIEW
[¶ 13.] Closs's entitlement to credit for his mental commitment is a question of law. We review questions of law under the de novo standard. Burke v. Butte County, 2002 SD 17, ¶ 8, 640 N.W.2d 473, 477.

ISSUE
[¶ 14.] Whether Closs was entitled to credit on his criminal sentence for the time he spent at the HSC pursuant to a mental illness commitment that followed his release from the penitentiary.

DECISION
[¶ 15.] Closs argues that the Board's failure to credit his prison sentence for the time spent at the HSC "was in violation of state constitutional provisions and affected by other error of law." However, Closs has cited no authority to support his argument. The State has also not directed us to any authority addressing this rather unusual situation involving credit on a criminal sentence for postrelease commitment due to mental illness.
[¶ 16.] We believe the applicable law is, however, set forth in our closely related decisions on the right to credit for presentence confinement while undergoing psychiatric evaluations. In State v. Sorenson, 2000 SD 127, 617 N.W.2d 146, we considered whether a defendant was entitled to credit for presentence confinement at the HSC for the purpose of determining his mental competency. Id. 2000 SD 127, ¶ 12, 617 N.W.2d at 149. We reviewed the cases considering credit for presentence confinement and observed that generally "[t]here is no statutory right in this state to credit for time served while awaiting trial or sentencing and, in the absence of a statute to the contrary, the traditional rule *318 is to deny such credit."[3]Sorenson, 2000 SD 127 ¶ 14, 617 N.W.2d at 149 (citations omitted). Significant to this appeal, we noted that the reason credit was not required was because "the confinement simply [did] not relate in any way to the subsequent punishment imposed." Id.[4]
[¶ 17.] That relationship test is applicable here. Under the test, the question is whether Closs's commitment at the HSC was related to his punishment on his criminal sentence.
[¶ 18.] A number of considerations reveal that Closs's mental commitment was unrelated to his punishment on his criminal sentence. First, the Legislature has established that mental health commitments are separate civil proceedings governed by a different section of the code than criminal proceedings. Compare, SDCL ch 27A-10 with SDCL Title 23A. Second, the proceedings themselves are fundamentally different. Mental health commitments require clear and convincing evidence of mental illness while criminal convictions require criminal conduct proven beyond a reasonable doubt. Compare SDCL §§ 27A-10-9.1 and 23A-22-3. Third, the tribunals hearing these cases are different: civil boards of mental illness determine mental commitments while juries decide criminal cases. Finally, the purpose and effect of the proceedings are different. Mental health commitments are intended to treat mental illnesses. On the other hand, criminal proceedings are intended to punish and deter others. Kansas v. Hendricks, 521 U.S. 346, 361-362, 117 S.Ct. 2072, 2082, 138 L.Ed.2d 501, 515 (1997).
[¶ 19.] This lack of relationship between civil commitments and criminal punishment has been confirmed by the Untied States Supreme Court. In Hendricks, the defendant had finished a criminal sentence for "taking indecent liberties with [children];" however, upon his release he was civilly committed for a "mental abnormality" or "personality disorder" that made it likely that he would again engage in "predatory acts of sexual violence." Hendricks, 521 U.S. at 352, 355-356, 117 S.Ct. at 2077, 2078, 2079, 138 L.Ed.2d at 509, 510, 511. In considering double jeopardy and ex post facto claims, the Supreme Court rejected the argument that the mental commitment was criminal punishment. The Supreme Court rejected that argument because it found that there was no relationship between this type of mental illness commitment and a criminal punishment. Hendricks, 521 U.S. at 361-363, 117 S.Ct. at 2081-2083, 138 L.Ed.2d at 514-516.
[¶ 20.] In justifying that conclusion, the United States Supreme Court noted that the legislature intended that mental committals were unrelated to criminal punishments. Id. 521 U.S. at 361, 117 S.Ct. at 2081-2082, 138 L.Ed.2d at 514-515. The Supreme Court also held that this legislative intent could be rejected only where the challenging party provides the clearest proof that the statutory scheme for commitment is so "punitive either in purpose or effect" as to negate the State's intention to deem it civil. Id. (citing United States v. Ward, 448 U.S. 242, 248-249, 100 S.Ct. 2636, 2641, 65 L.Ed.2d 742, 749 (1980)).
*319 [¶ 21.] The Supreme Court then identified two specific purposes and effects that distinguish mental commitments from criminal punishments. The Court noted that the primary objectives of criminal punishment are deterrence and retribution. Id. 521 U.S. at 361-362, 117 S.Ct. at 2082, 138 L.Ed.2d at 515. The Court found neither present in that mental commitment.
[¶ 22.] The Court found no deterrence because mental commitments do not require a criminal conviction as a prerequisite for commitment. A mental commitment can apply to those who are absolved of criminal liability as well as those who are convicted. Id. The Supreme Court also noted that mental commitments, by definition, only apply to those who cannot control their actions due to a mental illness. Under those circumstances, a mental commitment would not deter a person who was mentally ill. Id.
[¶ 23.] The Supreme Court also found no retribution in mental commitments. The Court noted that individuals involuntarily committed for mental illness are not subjected to greater restrictions than any other patients hospitalized for mental illness. Id. 521 U.S. at 363, 117 S.Ct. at 2082, 138 L.Ed.2d at 515-516. Consequently, the Supreme Court concluded that Hendrick's post-release mental commitment was not a criminal punishment.
[¶ 24.] This Hendricks "purpose and effect" analysis demonstrates that Closs's mental commitment was not related to his criminal punishment. First, the purpose of Closs's commitment was not for punishment for his burglary and theft. Instead, the purpose of Closs's commitment was to provide mental treatment and to prevent Closs from harming others. Second, like the defendant in Hendricks, Closs's detention was not imposed for deterrence or retribution. Instead, he was hospitalized for mental illness at a mental health facility under the same restrictions upon his freedom as similar patients involuntarily committed for mental health treatment.
[¶ 25.] Closs, however, suggests that his commitment was effectively related to his criminal punishment. Closs first argues that the Department of Corrections "supervised" his hospitalization because Lint, an employee of the Department of Corrections, filled out the petition. Closs also argues that the purpose of his hospitalization was not for treatment. He argues that he was simply "warehoused" at the HSC pending the State's appeal. Closs finally claims that the statutory procedures for a prisoner's transfer between the Department of Corrections and the HSC were not followed.
[¶ 26.] None of these arguments demonstrate that Closs's mental commitment was effectively criminal punishment. First, even though a Department of Corrections employee signed the petition for commitment, the Minnehaha and Yankton County Boards of Mental Illness actually committed Closs to the HSC for treatment. Moreover, while at the HSC, Closs remained under their commitment orders. Therefore, it is irrelevant that the person who initiated the commitment proceedings was an employee of the Department of Corrections. SDCL 27A-10-1 permits anyone with knowledge to file the petition to initiate a mental health commitment. Here, Lint was simply a person with significant first hand knowledge of Closs's mental illness. The county boards of mental illness were the entities that actually exercised the commitment authority.
[¶ 27.] Closs's second contention, that he was simply "warehoused" at the HSC, is also misplaced. Closs had a well-documented history of mental illness dating back nearly twenty years. In the six years prior to his release from the penitentiary, *320 Closs had been refusing his psychotropic medication and had become more violent. The evidence suggested that without hospitalization, Closs would no longer take his medication. Consequently, even if the Department of Corrections had an ulterior motive to curtail Closs's freedom, Closs's commitment was legally caused by his need for hospitalization and treatment for mental illness. This conclusion is confirmed by the fact that Closs's need for treatment was determined in the mental illness board proceedings that adjudicated Closs's commitment, mental illness, and continued need for treatment. It is also confirmed by the fact that Closs admits in his brief that he received treatment while at HSC.
[¶ 28.] Closs's final argument is that statutory procedures necessary to transfer a prisoner from the HSC to the penitentiary were not followed. Closs relies on SDCL 24-15-9 which provides:
The Board of Pardons and Paroles may order the Department of Corrections to transfer any inmate to the Human Services Center. The director of the human services center [sic] shall notify the Department of Corrections when the inmate is ready to be transferred back to the state penitentiary. Upon receipt of the notice, the Department of Corrections shall within five days bring the inmate back to the state penitentiary.
[¶ 29.] This statute, however, only applies to "inmates" under the jurisdiction of the Department of Corrections. Closs was not returned to the penitentiary under this statute because Closs was not in the HSC as an "inmate" subject to the jurisdiction of the Department of Corrections. On the contrary, Closs was committed to the HSC under the mental illness statutes. Therefore, the HSC had no authority to release Closs under SDCL 24-15-9.
[¶ 30.] Moreover, the fact that Closs was not returned to prison under SDCL 24-15-9 disproves Closs's own claim. Because the federal district court had initially released Closs from Department of Corrections jurisdiction, he was not transferred to the HSC under SDCL 24-15-9. Rather, Closs was committed to the HSC under the mental illness statutes. Therefore, the failure to use the transfer procedure in SDCL 24-15-9, which only applies to Department of Corrections inmates, tends to establish that Closs was not effectively detained by the Department of Corrections under a criminal sentence during his time at the HSC.
[¶ 31.] In conclusion, it should be emphasized that even though civil commitments for mental illness necessarily involve involuntary detention, traditional mental illness commitments-such as the one involving Closs-have never constituted criminal punishment. As the United States' Supreme Court noted:
The State may take measures to restrict the freedom of the dangerously mentally ill. This is a legitimate, nonpunitive governmental objective and has been historically so regarded. The Court has, in fact, cited the confinement of "mentally unstable individuals who present a danger to the public" as one classic example of nonpunitive detention. If detention for the purpose of protecting the community from harm necessarily constituted punishment, then all involuntary civil commitments would have to be considered punishment. But we have never so held.
Hendricks, 521 U.S. at 363, 117 S.Ct. at 2083, 138 L.Ed.2d at 516 (internal citations omitted) (emphasis in original).
[¶ 32.] For all of the foregoing reasons, we conclude that Closs's fourteen-month commitment to the HSC was not related to his criminal punishment. Because his *321 mental commitment was unrelated to his criminal punishment, Closs was not entitled to credit for the time spent at the HSC.
[¶ 33.] Affirmed.
[¶ 34.] GILBERTSON, Chief Justice, KONENKAMP, Justice, and AMUNDSON, Retired Justice, concur.
[¶ 35.] SABERS, Justice, dissents.
[¶ 36.] MEIERHENRY, Justice, not having been a member of the Court, at the time this action was submitted to the Court, did not participate.
SABERS, Justice (dissenting).
[¶ 37.] I dissent because the denial of fourteen months credit for time served:
1) penalizes Closs for prevailing on his application for habeas corpus;
2) burdens Closs' right to pursue relief through habeas corpus proceedings;
3) allows disparate treatment of inmates based on whether the court grants the State a stay pending appeal or has the inmate involuntarily committed to a mental institution;
4) extends Closs' time in state custody by fourteen months without cause.
[¶ 38.] I do not question the propriety or ability of the Department of Corrections to institute involuntary commitment proceedings against an inmate in need of treatment. However, that is not the issue. The question is whether the denial of credit for fourteen months while Closs was involuntarily committed by the State during the pendency of the State's appeal is proper. The answer to that question is an unequivocal "no." Closs is entitled to credit against his prison sentence for the time he was involuntarily committed.
[¶ 39.] SDCL 21-27-1 provides:
Any person committed or detained, imprisoned or restrained of his liberty, under any color or pretense whatever, civil or criminal, except as provided herein, may apply to the Supreme or circuit court, or any justice or judge thereof, for a writ of habeas corpus.
State prisoners also have a right under the Constitution and federal statutes to bring a habeas corpus action in federal court once state remedies have been exhausted. By denying credit for the time served in HSC, this Court burdens Closs' statutory right to habeas corpus proceedings. By exercising his right and prevailing, the only thing Closs accomplished was to extend his time in custody for fourteen months. This was an end run by the State and a denial of due process and equal protection to Closs.
[¶ 40.] Rather than being analogous to credit for time served prior to conviction, this case is more analogous to credit for time served pending appeal. For example, in Holland v. Boles, the defendant was given a life sentence which was later overturned, but only after he had served eleven years on that sentence. When the defendant was retried and sentenced, he was initially denied credit on the eleven years served under the original sentence. In ordering that credit be given for that time, the court stated,
denial of credit for time served while in the de facto status of state prisoner is so fundamentally unfair as to constitute a violation of the Due Process and Equal Protection Clauses of the Fourteenth Amendment of the Constitution.
Holland v. Boles, 269 F.Supp. 221, 224 (D.C.W.Va.1967) (quoting Patton v. North Carolina, 256 F.Supp. 225, 236 (W.D.N.C.1966)). Furthermore, it has been held that "[t]o deny credit for time spent in jail after conviction if a person pursues his right to appeal is to place a burden on the *322 exercise of that right ..." Arsad v. Henry, 317 F.Supp. 162, 164 (1970). This case is sufficiently analogous to grant Closs credit for time served while undergoing involuntary "treatment" at HSC. The denial of credit for time served is unfair and wrong.
[¶ 41.] First, there can be no question that Closs' liberty was restricted during the time served at HSC. He could not leave HSC during the time he was committed. Additionally, we have held that far less intrusion on an inmate's liberty constituted confinement for purposes of determining time served. In State v. Rollag, we unanimously held (with Justice Henderson concurring in result) that an inmate was entitled to credit for time served while he was on work furlough. 400 N.W.2d 278 (S.D.1987). In State v. Kiggins, we unanimously held that an inmate could be convicted of escape based on the defendant's failure to return from a work release program stating, "[u]ntil his discharge by due process of law he remained under the legal restraint of his sentence and in constructive custody of the jail." 86 S.D. 612, 615, 200 N.W.2d 243, 244. (emphasis supplied). If a person free to come and go for work, as in Kiggins, and a person allowed to live at home as in Rollag, is confined for purposes of time served, certainly one wholly restricted to a mental institution against his will, with no possibility of leaving, is similarly confined and equally entitled to credit.
[¶ 42.] Second, the majority relies heavily on the fact that it was the County Board's decision to commit Closs. This assertion is immaterial when one acknowledges that if not for the Department initiating those proceedings, Closs would not have been involuntarily committed. Therefore, even if we were to accept the majority's test concerning whether Closs was entitled to credit, the fact is that but for his conviction and subsequent punishment, the Department would not have been able to institute such action. These events lead to the conclusion that his detention in the HSC was directly "related to his punishment for the [] conviction." Therefore, he is entitled to credit.
[¶ 43.] Third, despite the fact that Closs prevailed in his habeas proceeding, the State never intended to let him out of its control. As soon as the court ruled in Closs' favor, the State applied for a stay pending appeal. Upon denial of that petition, involuntary commitment proceedings were immediately instituted. Closs did not have one moment free of State control from the time he prevailed in the habeas proceeding and that decision was overruled and he was returned to the penitentiary. There was no time when Closs was at liberty, nor could there have been. The real effect of the State's actions in this case was to involuntarily extend his sentence by fourteen months.
[¶ 44.] Without question, Closs would have been entitled to credit for time served had he remained in the penitentiary pending the State's appeal. The only difference here is that the State failed in its attempt to keep him in the penitentiary. He was transferred to HSC through no fault or action of his own, but rather through the Department's decision to commence involuntary commitment proceedings. The involuntary commitment proceedings were instituted immediately after the State's petition for a stay was denied. As soon as Judge Piersol's decision was overruled, the Department immediately transferred Closs back to the penitentiary. Nobody inquired as to how his "treatment" was progressing, or whether he had a continuing need for such "treatment" or discussed the possibility of keeping him in "treatment" rather than returning him to prison. The State decided it would keep him confined, and because it could not *323 keep him confined in prison, it caused him to be involuntarily committed to HSC instead.
[¶ 45.] The only person who seems to doubt his need for treatment is Closs, and it seems clear that lacking a substantial improvement in his mental health, he will once again be returned to HSC for treatment when his sentence is finished. That is insufficient reason to deny him credit against his prison term for time involuntarily served at HSC. In fact, it may be one more reason to grant him the credit he deserves.
NOTES
[1]  SDCL 24-15-24 provides:

If the board of pardons and paroles is satisfied that any provision of § 24-15-20 has been violated, it may revoke the parole and reinstate the terms of the original sentence and conviction or it may modify conditions of parole and restore parole status. In addition, the board is authorized to order the reduction of time in full or in part for good conduct granted under § 24-5-1. If the board does not find that the provisions of § 24-15-20 have been violated, it may restore the parolee to the original or modified terms and conditions of his parole.
(emphasis added).
SDCL 24-5-1 provides:
Every inmate sentenced for any term less than life, or who has had an indeterminate sentence set at a term of years, or who has had a life sentence commuted to a term of years, and subject to the provisions of §§ 24-2-17 and 24-2-18, is entitled to a deduction of four months from his sentence for each year and pro rata for any part of a year for the first year to the tenth, and six months for the tenth year and for each year thereafter until the expiration of the period of the sentence as pronounced by the court, for good conduct.
[2]  According to the affidavit filed by Lint, Closs's condition was ongoing, and in the six years leading to his release from the penitentiary, Closs's aggressiveness had increased. Lint stated that when Closs took his medication, his acts of verbal and physical abuse decreased. However, Closs continually refused to take his medication. When he refused his medications, he became indiscriminately violent.
[3]  The significant exception is where the confinement is due to indigency. Closs has not argued that his commitment at HSC was related to indigency. Therefore, Fourteenth Amendment equal protection considerations are not implicated in this case. See Sorenson, 2000 SD 127 at ¶ 15, 617 N.W.2d at 149.
[4]  We ultimately concluded that Sorenson was not entitled to credit because his confinement, either at jail or at the HSC, was unrelated to indigency. Sorenson's confinement was caused by a bond violation.
