
750 N.W.2d 688 (2008)
275 Neb. 863
Edward POINDEXTER, appellant,
v.
Robert HOUSTON et al., appellees.
No. S-07-089.
Supreme Court of Nebraska.
June 13, 2008.
*690 Edward Poindexter, pro se.
Jon Bruning, Attorney General, and Linda L. Willard for appellees.
HEAVICAN, C.J., and WRIGHT, CONNOLLY, GERRARD, STEPHAN, McCORMACK and MILLER-LERMAN, JJ.
CONNOLLY, J.

I. SUMMARY
In 1971, a jury convicted Edward Poindexter of first degree murder. The district court sentenced him to life imprisonment. He seeks a writ of habeas corpus. He claims the State should immediately release him because his mandatory release date was April 1988. The district court quashed the writ and dismissed the case. We conclude that Poindexter did not have a mandatory release date of April 1988. We hold that an inmate serving a life sentence for first degree murder must *691 have his or her sentence commuted to a term of years before he or she is eligible for parole. Because the Nebraska Board of Pardons has not commuted Poindexter's sentence, we affirm.

II. BACKGROUND
The record shows that the Nebraska Board of Parole has denied Poindexter parole several times. The record also shows that the Board of Pardons has denied Poindexter a commutation hearing on at least two occasionsMarch 1987 and May 1993.
In May 2006, Poindexter petitioned for a writ of habeas corpus. In his petition, he requested that his "defacto [sic] mandatory minimum release date of April 17, 1988 be honored" and that he "be released immediately and unconditionally from imprisonment." He alleged that his imprisonment after April 17, 1988, was unconstitutional. The Lancaster County District Court ordered Robert Houston, Director of Correctional Services for the State of Nebraska, to show cause why the writ of habeas corpus should not be issued. The State then moved to quash Poindexter's petition. The court entered an order quashing the writ of habeas corpus and dismissing the case. Poindexter appeals.

III. ASSIGNMENTS OF ERROR
Poindexter assigns, restated and renumbered, that the district court erred by (1) sustaining the State's motion to quash and failing to rule on his habeas corpus petition on its merits, (2) failing to find that the State erroneously claimed he was serving a "minimum life" sentence, (3) failing to find that he had a liberty interest in being paroled and discharged from parole by April 17, 1988, and (4) failing to find that the appellees conspired to violate his constitutional rights "when they created their own reasons to deny [him] parole that did not exist at the time of his conviction and sentencing."

IV. STANDARD OF REVIEW
On appeal of a habeas petition, we review the trial court's factual findings for clear error and its conclusions of law de novo.[1]

V. ANALYSIS
Habeas corpus is a special civil proceeding providing a summary remedy to persons illegally detained.[2] A writ of habeas corpus challenges and tests the legality of a person's detention, imprisonment, or custodial deprivation of liberty.[3] Habeas corpus requires the showing of legal cause, that is, that a person is detained illegally and is entitled to the benefits of the writ.[4]

1. POINDEXTER IS NOT ELIGIBLE FOR PAROLE UNTIL THE BOARD OF PARDONS COMMUTES HIS SENTENCE TO A TERM OF YEARS
The first issue is whether Poindexter is, or has been, eligible for parole. The State contends that Poindexter's sentence carries a minimum term of life and that, therefore, he is not eligible for parole until the Board of Pardons commutes his sentence to a term of years. But Poindexter contends that when he was sentenced, the law did not require that his sentence be commuted before gaining parole eligibility. He argues he was eligible for parole "`at *692 any time.'"[5] He asserts that applying any current statutes that are different from those in place when he was sentenced would violate ex post facto principles.
Both U.S. Const. art. I, § 10, and Neb. Const. art. I, § 16, provide that no ex post facto law may be passed. An ex post facto law applies to events that occurred before the law's enactment.[6] It disadvantages a defendant by creating or enhancing penalties that did not exist when the offense was committed.[7] An ex post facto analysis applies when a statutory amendment changes the punishment of a crime.[8]
If Poindexter is correct that commutation is a prerequisite for parole eligibility under current statutes but was not required when he committed his offense, then we agree that requiring commutation under the current statutes could raise an ex post facto issue. But we conclude below that a commutation was required by statutes in effect when Poindexter committed the crime, just as it is required under the current statutes. Ex post facto principles are not implicated.

(a) The Statutes in Place When Poindexter Committed His Offense Require a Commutation Before He Is Eligible for Parole
We first address whether the statutes in place in 1970 when Poindexter committed his offense required a commutation to a term of years before inmates sentenced to life imprisonment for first degree murder could be eligible for parole. In 1970, Neb.Rev.Stat. § 83-1,110 (Cum. Supp.1969) provided, in relevant part: "(1) Every committed offender shall be eligible for release on parole upon completion of his minimum term less reductions granted in accordance with this act, or, if there is no minimum, at any time." Poindexter claims that his sentence did not have a minimum term because he was sentenced to prison "during life." So, Poindexter argues that under the 1969 statute, he was eligible for parole "at any time" and that commutation was unnecessary.
We understand Poindexter's argument to be that his sentence had no minimum term because it was a flat sentence of life imprisonment rather than an indeterminate sentence. We disagree.
In State v. McMillian[9] and State v. Rhodes,[10] we impliedly held that flat sentences do have minimum terms for purposes of the 1969 version of § 83-1,110. The appellants in those cases had received flat sentences of 5 years and 3 years respectively after pleading guilty. (In 1971, flat sentences were not converted to indeterminate sentences by operation of law.[11]) The appellants believed their flat sentences made them ineligible for parole. They sought postconviction relief, arguing that their pleas were involuntary because the court did not advise them they would be ineligible for parole. We affirmed the denial of postconviction relief. We decided that under the 1969 statute, "the [appellants] are eligible for release on parole *693 upon completion of their minimum terms less reductions."[12]
Although the sentences in McMillian and Rhodes were flat sentences, we applied the 1969 version of § 83-1,110 to decide that the appellants were eligible for parole upon completion of their sentences less reductions granted to them. In other words, when a court imposed a flat sentence, we interpreted the defendant's "minimum term" to mean the flat sentence imposed by the court. Thus, contrary to Poindexter's argument, a flat sentence did have a minimum term under the 1969 statute. In Poindexter's case, his sentence of life is the "minimum term" of his flat sentence. Under the 1969 version of § 83-1,110, Poindexter is parole eligible "upon completion of his [life imprisonment] term less reductions granted," and not "at any time" as he suggests.
Poindexter's life sentence is indefinite.[13] It is impossible to determine the number of years that Poindexter may live in serving his life sentence. His sentence has no term of years from which reductions can be taken.[14] We conclude that under § 83-1,110 (Cum.Supp.1969), Poindexter is not eligible for parole until the Board of Pardons commutes his life sentence to a term of years.

(b) Current Statutes Require a Commutation Before Poindexter Is Eligible for Parole
We next compare Poindexter's parole eligibility under the current version of § 83-1,110,[15] which provides in pertinent part: "(1) Every committed offender shall be eligible for parole when the offender has served one-half the minimum term of his or her sentence ..." Like the 1969 statute, parole eligibility under the current version of § 83-1,110 depends on the offender's minimum term.
Having decided that Poindexter's minimum term is his life sentence, Poindexter is eligible for parole under the current statute once he has served one-half his life sentence. Because the sentence is indefinite, it is impossible to determine when Poindexter will have served one-half his life sentence. We conclude that under § 83-1,110 (Cum.Supp.2006), Poindexter is not eligible for parole until the Board of Pardons commutes his life sentence to a term of years.[16]

(c) Summary of Commutation Issue
We conclude that both the 1969 version and the current version of § 83-1,110 require commutation to a term of years before inmates sentenced to life imprisonment for first degree murder are eligible for parole. Therefore, no ex post facto issue is raised by our decision that Poindexter is not eligible for parole until the Board of Pardons commutes his sentence to a term of years.
The Board of Pardons has the unfettered discretion to grant or deny a commutation of a lawfully imposed sentence for any reason or for no reason at all.[17] The record shows that the Board of Pardons denied Poindexter a commutation hearing in March 1987 and again in May 1993. Because Poindexter has not yet received *694 a commutation of his sentence to a term of years, he is not yet eligible for parole.

2. POINDEXTER DID NOT HAVE A LIBERTY INTEREST IN COMMUTATION OR A MANDATORY RELEASE DATE OF APRIL 17, 1988
Poindexter contends that he had a "defacto [sic] mandatory release date of no later than ... April 17, 1988."[18] He claims that he had a liberty interest in being released no later than that date. As evidence of this alleged liberty interest, he cites letters in the record and a self-created study showing the times other inmates with life sentences served before they were released on parole.
The letters, dating from the 1980's, were sent by the Secretary of State, the Department of Correctional Services, and the Board of Pardons. The letters explain that the average length of time served on a life sentence before the Board of Parole recommended a commutation to the Board of Pardons was 17 or 18 years.
Poindexter's study lists 22 Nebraska inmates who received life sentences for first degree murder and were later released on discretionary parole after their sentences were commuted. The inmates on Poindexter's list were sentenced between 1955 and 1974 and were released on discretionary parole by 1992. Poindexter calculated the "Mean Time Served" by these inmates before they were released on discretionary parole. According to Poindexter, the inmates served an average of 18.45 years before being released.
Poindexter relies on the 17- to 18-year averages in the letters and his study. By adding 17 years to his sentence date, April 17, 1971, he concludes that he had a liberty interest in his "defacto [sic] mandatory release date" of April 17, 1988. We understand Poindexter's argument to be that because other life inmates received commutations to terms of years and were released on parole after serving an average of 17 or 18 years, he had a liberty interest in similarly being released after 17 years. Because such a release would necessarily require a prior commutation,[19] we believe the more precise issue is whether Poindexter had a liberty interest in having his sentence commuted so that he could be eligible for parole after serving about 17 years, like the inmates in his study.
The U.S. Supreme Court has stated that "[t]here is no constitutional or inherent right of a convicted person to be conditionally released before the expiration of a valid sentence."[20] The Court later applied this principle in a case involving commutation of life sentences, concluding that "an inmate has `no constitutional or inherent right' to commutation of his sentence."[21]
Although an inmate has no constitutional or inherent right to commutation, we recognize that a state may under certain circumstances create a liberty interest that is subject to due process protection.[22] But such circumstances are not present here.
We have previously held that neither the Nebraska Constitution nor Nebraska's statutes create a liberty interest in commutation hearings other than the *695 right to file an application for commutation.[23]
Nor did the Board of Pardons' commutation of sentences for the inmates in Poindexter's study create a protected liberty interest in commutation. The U.S. Supreme Court rejected a similar argument that a pardons board's practice of granting commutations to most life inmates created a protectable liberty interest.[24] There, the Connecticut Board of Pardons had granted about three-fourths of the applications for commutation of life sentences. Other life inmates, whose commutations had been denied, argued that the board's practice was sufficient to create a protectable liberty interest in commutation. The Court disagreed, concluding that a liberty interest could not be created simply by past actions of the pardons board:
A constitutional entitlement cannot "be createdas if by estoppelmerely because a wholly and expressly discretionary state privilege has been granted generously in the past." ... No matter how frequently a particular form of clemency has been granted, the statistical probabilities standing alone generate no constitutional protections; a contrary conclusion would trivialize the Constitution.[25]
This reasoning applies here. As mentioned, the Board of Pardons has the unfettered discretion to grant or deny a commutation of a lawfully imposed sentence for any reason or for no reason at all.[26] That the Board of Pardons has exercised this discretionary authority and granted commutations for other life inmates after they served, on average, 17 or 18 years does not create a protectable liberty interest.
We reaffirm our previous conclusion that the State has not created a liberty interest in sentence commutation other than the right to file an application for commutation.[27] Therefore, Poindexter did not have a liberty interest in having his sentence commuted for an April 17, 1988, release. His argument that April 17, 1988, was his "defacto [sic] mandatory release date" is without merit.

3. POINDEXTER'S ADDITIONAL ASSIGNMENTS OF ERROR ARE WITHOUT MERIT
We have considered Poindexter's remaining assignments of error, and we conclude they are without merit.

VI. CONCLUSION
We conclude that under both the statutes in place when Poindexter committed his crime and the current statutes, Poindexter is not eligible for parole until the Board of Pardons commutes his life sentence to a term of years. We further conclude that Poindexter did not have a liberty interest in having his sentence commuted to obtain an April 17, 1988, release. The district court did not err in quashing the writ of habeas corpus and dismissing Poindexter's case.
AFFIRMED.
NOTES
[1]  Anderson v. Houston, 274 Neb. 916, 744 N.W.2d 410 (2008).
[2]  Tyler v. Houston, 273 Neb. 100, 728 N.W.2d 549 (2007).
[3]  See id.
[4]  Id.
[5]  Reply brief for appellant at 8.
[6]  See State v. Gales, 269 Neb. 443, 694 N.W.2d 124 (2005).
[7]  See id.
[8]  Id.
[9]  State v. McMillian, 186 Neb. 784, 186 N.W.2d 481 (1971).
[10]  State v. Rhodes, 187 Neb. 332, 190 N.W.2d 623 (1971).
[11]  Compare Neb.Rev.Stat. § 83-1,105 (Reissue 1971), with Neb.Rev.Stat. §§ 83-1,105.01(2) and 29-2204(1)(B) (Cum.Supp. 2006).
[12]  McMillian, supra note 9, 186 Neb. at 785, 186 N.W.2d at 482. Accord Rhodes, supra note 10.
[13]  See State v. Lynch, 215 Neb. 528, 340 N.W.2d 128 (1983).
[14]  See id.
[15]  See § 83-1,110 (Cum.Supp.2006).
[16]  See, also, Ditter v. Nebraska Bd. of Parole, 11 Neb.App. 473, 655 N.W.2d 43 (2002).
[17]  See, State v. Marrs, 272 Neb. 573, 723 N.W.2d 499 (2006); Otey v. State, 240 Neb. 813, 485 N.W.2d 153 (1992).
[18]  Brief for appellant at 22.
[19]  See discussion supra Part V.1(a) through (c).
[20]  Greenholtz v. Nebraska Penal Inmates, 442 U.S. 1, 7, 99 S.Ct. 2100, 60 L.Ed.2d 668 (1979).
[21]  Connecticut Board of Pardons v. Dumschat, 452 U.S. 458, 464, 101 S.Ct. 2460, 69 L.Ed.2d 158 (1981).
[22]  See Sandin v. Conner, 515 U.S. 472, 115 S.Ct. 2293, 132 L.Ed.2d 418 (1995). See, also, Greenholtz, supra note 20.
[23]  See Otey, supra note 16. See, also, Dumschat, supra note 21.
[24]  Dumschat, supra note 21.
[25]  Dumschat, supra note 21, 452 U.S. at 465, 101 S.Ct. 2460 (emphasis in original) (citation omitted).
[26]  See, Marrs, supra note 17; Otey, supra note 17.
[27]  See Otey, supra note 17.
