opinion: Mr. Justice Stewart
  delivered the opinion of the Court.
  The petitioner was brought to trial in an Oklahoma court on a charge of unlawfully distributing heroin. Since he had been convicted of felony offenses twice within the preceding 10 years, the members of the jury were instructed, in accordance with the habitual offender statute then in effect in Oklahoma, that, if they found the petitioner guilty, they “shall assess [the] punishment at forty (40) years imprisonment.” The jury returned a verdict of guilt and imposed the mandatory 40-year prison term.
  Subsequent to the petitioner’s conviction, the provision of the habitual offender statute under which the mandatory 40-year prison term had been imposed was in another case declared unconstitutional by the Oklahoma Court of Criminal Appeals. Thigpen v. State, 571 P. 2d 467, 471 (1977). On his appeal, the petitioner sought to have his 40-year sentence set aside in view of the unconstitutionality of this statutory provision. The Court of Criminal Appeals acknowledged that the provision was unconstitutional, but nonetheless affirmed the petitioner’s conviction and sentence, reasoning that the petitioner was not prejudiced by the impact of the invalid statute, since his sentence was within the range of punishment that could have been imposed in any event. We granted certiorari to consider the petitioner’s contention that the State deprived him of due process of law guaranteed to him by the .Fourteenth Amendment. 444 U. S. 963.
  By statute in Oklahoma, a convicted defendant is entitled to have his punishment fixed by the jury. Okla. Stat., Tit. 22, § 926 (1971). Had the members of the jury been correctly instructed in this case, they could have imposed any sentence of “not less than ten . . . years.” Okla. Stat., Tit. 21, § 51 (A)(1) (1971). The possibility that the jury would have returned a sentence of less than 40 years is thus substantial. It is, therefore, wholly incorrect to say that the petitioner could not have been prejudiced by the instruction requiring the jury to impose a 40-year prison sentence.
  It is argued that all that is involved in this case is the denial of a procedural right of exclusively state concern. Where, however, a State has provided for the imposition of criminal punishment in the discretion of the trial jury, it is not correct to say that the defendant’s interest in the exercise of that discretion is merely a matter of state procedural law. The defendant in such a case has a substantial and legitimate expectation that he will be deprived of his liberty only to the extent determined by the jury in the exercise of its statutory discretion, cf. Greenholtz v. Nebraska Penal Inmates, 442 U. S. 1, and that liberty interest is one that the Fourteenth Amendment preserves against arbitrary deprivation by the State. See Vitek v. Jones, 445 U. S. 480, 488-489, citing Wolff v. McDonnell, 418 U. S. 539; Greenholtz v. Nebraska Penal Inmates, supra; Morrissey v. Brewer, 408 U. S. 471. In this case Oklahoma denied the petitioner the jury sentence to which he was entitled under state law, simply on the frail conjecture that a jury might have imposed a sentence equally as harsh as that mandated by the invalid habitual offender provision. Such an arbitrary disregard of the petitioner’s right to liberty is a denial of due process of law.
  The State argues, however, that, in view of the revisory authority of the Oklahoma Court of Criminal Appeals, the petitioner had no absolute right to a sentence imposed by a jury. See Okla. Stat., Tit. 22, § 1066 (1971) (“The Appellate Court may reverse, affirm or modify the judgment appealed from. . .”). The argument is unpersuasive. The State concedes that the petitioner had a statutory right to have a jury fix his punishment in the first instance, and this is the right that was denied. Moreover, it is a right that substantially affects the punishment imposed. No case has been cited to us in which the Court of Criminal Appeals has increased a sentence on appeal, and the State’s Assistant Attorney General indicated at oral argument that it was doubtful whether the appellate court had power to do so. In consequence, it appears that the right to have a jury fix the sentence in the first instance is determinative, at least as a practical matter, of the maximum sentence that a defendant will receive. Nor did the appellate court purport to cure the deprivation by itself reconsidering the appropriateness of the petitioner’s 40-year sentence. Rather, it simply affirmed the sentence imposed by the jury under the invalid mandatory statute. In doing so, the State deprived the petitioner of his liberty without due process of law.
  Accordingly, the judgment is vacated, and the case is remanded to the Oklahoma Court of Criminal Appeals for further proceedings not inconsistent with this opinion.
  So ordered.
  See 1976 Okla. Sess. Laws, ch. 94, § 1, codified at Okla. Stat., Tit. 21, §61 (B) (Supp. 1977). The text of §51 provided:
  “(A) Every person who, having been convicted of any offense punishable by imprisonment in the penitentiary, commits any crime after such conviction is punishable therefor as follows:
  “1. If the offense of which such person is subsequently convicted is such that upon a first conviction an offender would be punishable by imprisonment in the penitentiary for any term exceeding five (5) years, such person is punishable by imprisonment in the penitentiary for a term not less than ten (10) years.
  “2. If such subsequent offense is such that upon a first conviction the offender would be punishable by imprisonment in the penitentiary for five (5) years, or any less term, then the person convicted of such subsequent offense is punishable by imprisonment in the penitentiary for a term not exceeding ten (10) years.
  “3. If such subsequent conviction is for petit larceny, or for any attempt to commit an offense which, if committed, would be punishable by imprisonment in the penitentiary, then the person convicted of such subsequent offense is punishable by imprisonment in the penitentiary for a term not exceeding five (5) years.
  “(B) Every person who, having been twice convicted of felony offenses, commits a third, or thereafter, felony offenses within ten (10) years of the date following the completion of the execution of the sentence, shall be punished by imprisonment in the State Penitentiary for a term of twenty (20) years plus the longest imprisonment for which the said third or subsequent conviction was punishable, had it been a first offense; provided, that felony offenses relied upon shall not have arisen out of the same transaction or occurrence or series of events closely related in time or location; provided, further, that nothing in this section shall abrogate or affect the punishment by death in all crimes now or hereafter made punishable by death.”
  The Oklahoma Legislature has since amended §51 (B). See 1978 Okla. Sess. Laws, ch. 281, § 1, Okla. Stat., Tit. 21, §51 (B) (Supp. 1979).
  “Defendant asserts in his fourth assignment of error that [Okla. Stat., Tit. 21,] § 51 (B), under which he was sentenced, is unconstitutional. We agree. This question was laid to rest by this Court in Thigpen v. State, Okla. Cr., 571 P. 2d 467 (1977). We must find however, that the defendant was not prejudiced by the use of this statute in that the sentence imposed is within the range of punishment authorized by the provisions of [Okla. Stat., Tit. 21,] § 51 (A).” Hicks v. State, No. F-77-751 (Mar. 8, 1979).
  The decision of the Oklahoma Court of Criminal Appeals is unreported. A petition for rehearing was denied April 6,1979.
  Only if the jury fails to do so may the trial court impose sentence. Okla. Stat., Tit. 22, § 927 (1971).
  Because of our disposition of the case, we do not reach the petitioner’s several other contentions.
  Because the appellate court did not purport to resentenee the petitioner, we have no occasion to consider his contention that due process of law requires that the State provide him with notice and a hearing, including the opportunity to present mitigating evidence, before appellate sentencing. See McGautha v. California, 402 U. S. 183, 218-220; Specht v. Patterson, 386 U. S. 605, 606. See also Mempa v. Rhay, 389 U. S. 128.
choices: Alabama Alaska American Samoa Arizona Arkansas California Colorado Connecticut Delaware District of Columbia Federated States of Micronesia Florida Georgia Guam Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Marshall Islands Maryland Massachusetts Michigan Minnesota Mississippi Missouri Montana Nebraska Nevada New Hampshire New Jersey New Mexico New York North Carolina North Dakota Northern Mariana Islands Ohio Oklahoma Oregon Palau Pennsylvania Puerto Rico Rhode Island South Carolina South Dakota Tennessee Texas Utah Vermont Virgin Islands Virginia Washington West Virginia Wisconsin Wyoming United States Interstate Compact Philippines Indian Dakota