
516 N.W.2d 287 (1994)
STATE of North Dakota, Plaintiff and Appellee,
v.
Reginald TRIEB, Defendant and Appellant.
Cr. No. 930217.
Supreme Court of North Dakota.
May 19, 1994.
*289 David F. Senn (argued), Dickinson, for defendant and appellant; appearance by Reginald Trieb.
Barbara L. Nudell (argued), Asst. State's Atty., Hettinger, for plaintiff and appellee.
NEUMANN, Justice.
Reginald Trieb appeals from an amended judgment and sentence. We reverse and remand.
Reginald Trieb (Trieb) was charged and tried for the crime of murder, a class AA felony. He was convicted by a jury, and sentenced to life in prison. He appealed from the judgment of conviction, and this court reversed and remanded for a new trial. State v. Trieb, 315 N.W.2d 649 (N.D.1982). Before the second trial, Trieb entered a plea of guilty pursuant to a plea agreement. This agreement, dated September 16, 1982, was in writing; was signed by the prosecutor, Trieb's counsel, and Trieb; and was approved by the trial court directly after the sentencing hearing on September 24, 1982.[1]
At the sentencing hearing there was extensive discussion about the effects of parole and "good time" on the sentence agreed to in the plea agreement. The sentencing hearing included the following exchange:
"THE COURT: Mr. Goetz [prosecutor], state for the record, if you will, sir, the reasons for the prosecution agreeing to this plea agreement.
"MR. GOETZ: .... The State feels that he is pleading guilty to the crime that was charged, that that in fact is what the facts show. The resulting sentence was life imprison [sic], and under North Dakota statute as quoted, Section 12.1-32-01(1) that under a life sentence the defendant is eligible for parole in 30 years less good time. Based upon the same statute, good time would mean that Mr. Trieb would be eligible to be considered for parole in 21 years from the date of confinement. In essence, the plea agreement says the same thing and he has plead to a firm 22 years without any consideration of good time and the parole would be the same 21 years taking into consideration that there will be no good time subtracted from the 21 years. Therefore, the State feels that in essence the defendant would receive the samepossibly the same number of years in the State Penitentiary under this plea agreement, your Honor.
"THE COURT: Mr. Reichert [defense attorney]?
"MR. REICHERT: That's not my understanding.
* * * * * *
"MR. REICHERT: This agreement and the things that are accompanied in this agreement state that Reginald Trieb will not be eligible for parole for 21 years, that's necessary because the statute says that. It is my belief that Reginald Trieb is eligible for good time off the 22 year sentence. Good time is statutory, it's completely separate and distinct from parole and it's my belief that he would be eligible for that." *290 Recognizing that the parties were not in agreement as to the details of the plea bargain, the judge called a recess for the parties to discuss the matter. Following the recess, Goetz reiterated his understanding of the terms of the agreement. When asked whether he agreed with the interpretation of the agreement just given by Goetz, Trieb responded that he understood that no good time would be considered on the 21 years. The sentencing proceeded:
"THE COURT: Now I want this to be clear because the statute specifically provides that there shall be no eligibility for a parole for a period of 30 years less good time and the Court in considering the plea agreement has adopted the interpretation of the State and as agreed to by the defendant that the sentence of 22 years is the equivalent of the 30 year requirement of the statute."
The sentence was reduced to writing and filed on October 12, 1982. Included in the sentence was a copy of the plea agreement, and the following:
"[T]he sentence is that you, Reginald Trieb,
1.
"Be imprisoned in the State Penitentiary located in Burleigh County, North Dakota, for a term of twenty-two (22) years commencing as of noon, November 19, 1979, at hard labor; and,
2.
"You shall not be eligible for parole for a period of twenty-one (21) years from November 19, 1979, said twenty-one (21) years being two hundred fifty-two (252) months, without any reduction for good time while in the State Penitentiary, that is, and stated differently, you shall serve twenty-one years in the State Penitentiary and said twenty-one years shall not be reduced by good time credit, such twenty-one year sentence being equal to a sentence of thirty years less good time."
In response to Trieb's motions for post conviction relief under Rules 32(d) and 35(a) of the North Dakota Rules of Criminal Procedure, on June 25, 1993, the district court amended the judgment and sentence. The district court found that the provision of the September 24, 1982, sentence that denied Trieb the opportunity to earn good time during the first 21 years was illegal, and accordingly amended it pursuant to Rule 35(a) of the North Dakota Rules of Criminal Procedure. The sentence was amended to read:
"[T]he sentence is that you, Reginald Trieb:
* * * * * *
"2. You shall not be eligible for parole for a period of twenty-one (21) years from and after November 19, 1979, said twenty-one (21) years being two hundred fifty-two (252) months, and that any good time earned by the Defendant while so incarcerated, shall be applicable only to the twenty-second year of said sentence."
Trieb appeals from the amended judgment and sentence. He raises four issues: 1) Whether the plea agreement entitles Trieb to statutory good time. 2) Whether the September 24, 1982, sentence is illegal by not following the terms of the plea agreement. 3) Whether, at the initial sentencing, the trial court rejected the plea agreement. 4) Whether the amended sentence is illegal.
The first three issues revolve around the initial sentencing on September 24, 1982. Trieb argues the district court erred in denying his post conviction motion to withdraw his guilty plea. Trieb's position is that at the sentencing hearing the district court failed to meet the requirements of Rule 11, N.D.R.Crim.P., and as a result he should be allowed to withdraw his plea of guilty pursuant to Rule 32(d), N.D.R.Crim.P.
Withdrawal of a guilty plea is allowed when it is necessary to correct a manifest injustice. N.D.R.Crim.P. Rule 32(d); e.g., State v. Zeno, 490 N.W.2d 711, 713 (N.D. 1992). "The determination of whether or not there has been a manifest injustice supporting withdrawal of a guilty plea lies within the trial court's discretion and will not be reversed on appeal except for an abuse of discretion." Zeno, 490 N.W.2d at 713. An abuse of discretion under this rule occurs when the court's legal discretion is not exercised *291 in the interest of justice. Kaiser v. State, 417 N.W.2d 175, 179 (N.D.1987). We are not persuaded such an abuse has occurred in this case.
Trieb contends that the sentencing court did not conform to Rule 11(d), N.D.R.Crim.P, resulting in a manifest injustice. Specifically, Trieb argues that the sentencing court improperly engaged in plea negotiations, rejected the plea agreement, failed to allow Trieb the opportunity to withdraw the guilty plea, and then handed down a sentence less favorable than that encompassed by the plea agreement.
Although failure to comply with Rule 11 may result in a manifest injustice justifying withdrawal of a guilty plea, e.g., State v. Boushee, 459 N.W.2d 552 (N.D.1990), we are not convinced this district court erred in finding "no failure on the part of the sentencing Court to comply with the requirements of Rule 11." This is a situation where in order to determine whether the district court abused its discretion, it is necessary to review that court's preliminary findings of fact. Zeno, 490 N.W.2d at 713; Houle v. State, 482 N.W.2d 24, 26 (N.D.1992). Actions under Rule 32(d) are essentially civil in nature, and as such the district court's findings of fact will not be disturbed unless clearly erroneous pursuant to Rule 52(a), N.D.R.Civ.P. Houle, 482 N.W.2d at 25-26 n. 3.
Trieb's contention that the sentencing judge engaged in plea negotiations is a losing argument in this case. Mere discussion regarding the terms of a plea agreement is not synonymous with negotiation. To hold differently would conflict with a judge's duty under Rule 11 to ascertain whether an agreement is in existence. The extent of the sentencing judge's exchanges with Trieb, Trieb's counsel, and the State was limited to determining whether an agreement actually existed. Therefore, the district court did not err in finding that "[n]one of the terms or conditions of the plea agreement were suggested by the Court, nor did the sentencing Court engage in any negotiations."
Trieb's argument that the sentencing court rejected the plea agreement also fails. The record is full of evidence to support the district court's finding that the sentence reflected the interpretation of the plea agreed upon by the State and Trieb. The State and Trieb understood that Trieb would remain in the State Penitentiary for 21 years, without any opportunity to lessen that sentence, whether through parole or good time, and that the maximum number of years Trieb would have to serve would be 22 years. Any possible ambiguities in the written plea agreement were eliminated by the exchanges which clarified the details of the proposed agreement. The sentencing court did not reject the agreement, therefore there was no need to allow Trieb to withdraw his guilty plea.
The fourth issue Trieb raises on appeal is the legality of the amended sentence. He argues that both the original sentence and the amended sentence are illegal. The remedy he seeks under Rule 35(a),[2] N.D.R.Crim.P., is either amendment of the sentence to allow application of good time earned on the entire sentence, or, in the alternative, an opportunity to withdraw his guilty plea. We agree with Trieb; both sentences are illegal.
The district court found that "[t]he sentencing Court, in denying the Defendant the opportunity to earn good time while incarcerated for the first twenty-one (21) years of said sentence exceeded the sentencing Court's jurisdiction. Accordingly, that portion of said sentence is illegal." Attempting to remedy the illegality of the sentence, the district court amended it to allow Trieb to earn good time during the first 21 years, but then restricted the application of such good time to the 22nd year. Although there is a substantive difference between the two sentences, the amended sentence does not go far enough to correct the illegality, and as a result, the amended sentence is illegal as well.
The term "illegal sentence" as used in Rule 35(a) applies to a sentence that the *292 judgment of conviction does not authorize. E.g., Bishop v. Municipality of Anchorage, 685 P.2d 103, 105 (Alaska App.1984). Examples of illegal sentences include: a sentence in excess of a statutory provision or in some other way contrary to an applicable statute, a sentence which fails to conform to the oral pronouncement of the sentence, or a sentence which is ambiguous with respect to the time and manner in which it is to be served. 3 Wright, Federal Practice and Procedure: Criminal 2d § 582 (1982). In addition, a sentence is illegal if it does not comply with a promise of a plea bargain, DeCoteau v. State, 504 N.W.2d 552, 556 (N.D.1993); cf. 3 Wright, § 585 at 398 ("A sentence within statutory limits, but that is contrary to a plea agreement that has been accepted, by the court, is not illegal. It has, however, been imposed in an illegal manner"), or when the sentencing court lacks jurisdiction to impose it, Stein v. State, 758 P.2d 132, 133 (Alaska App.1988). Rule 35(a) provides that illegal sentences may be corrected at any time. See also State v. Nace, 371 N.W.2d 129, 131 (N.D.1985) ("The substantial nature of the right is emphasized by the `at any time' reference in Rule 35(a)").
The State argues that since defendants are free to waive rights guaranteed by statute or by constitution, Trieb was free to waive his right to good time. The flaw in this argument is that Trieb and the State waived a right that did not belong to them. The deduction of good time credits from an inmate's sentence is a discretionary matter entrusted not to the courts but to the administrators of the penitentiary. NDCC ch. 12-54.1; see State v. Aqui, 721 P.2d 771, 774 (N.M.1986) (held district court did not have jurisdiction to entertain motion for good time credits), cert. denied, 479 U.S. 917, 107 S.Ct. 321, 93 L.Ed.2d 294 (1986). "The computation of good time credits is exclusively an administrative responsibility." Aqui, 721 P.2d at 774.
The sentencing court was outside its jurisdiction when it, in effect, guaranteed good time on a 30 year sentence by sentencing Trieb to 22 years, while placing limitations on accrual and application of good time. The amendment made by the district court, although a step in the right direction, did not go far enough to cure the illegal sentence. As a practical matter, there is little difference between prohibiting the accrual of good time, and allowing accrual of good time but limiting its application. The purpose of good time "is to encourage prison discipline, to encourage prisoners to observe the rules of the prison, to act as an inducement for the good conduct of a prisoner for which reward may be given if earned by him, to improve the morale and well-being of each inmate in each institution, or to rehabilitate prisoners generally." 72 C.J.S. Prisons § 145(b) (1987) (footnotes omitted). If we were to allow defendants to waive good time in plea agreements, prosecutors might be encouraged to bargain away this administrative tool which the legislature has given the Department of Corrections. This would directly conflict with the legislative purpose of providing for good time.
We reverse and remand to the district court to amend the sentence to allow for good time, or to allow Trieb to withdraw his guilty plea.
VANDE WALLE, C.J., and LEVINE, J., concur.
SANDSTROM, Justice, dissenting.
Reginald Trieb agreed to serve twenty-two years in the North Dakota State Penitentiary, twenty-one years without any reduction for good-time credit. I would affirm the amended judgment and sentence because Trieb specifically waived his right to receive good-time credit on the first twenty-one years of his sentence, and because he has no standing to raise any right or interest of prison administrators.
As part of a plea bargain, Trieb pled guilty to murder for the 1979 brutal killing of seventeen-year-old Val Scott Blade. Trieb murdered Blade by striking him several times in the head with a metal jack handle while Blade was sleeping. Trieb and his companions then took Blade's body to the nearby Grand River, where Trieb shot Blade several times and left him lying on the ice. See State v. Trieb, 315 N.W.2d 649, 651 (N.D. 1982).
*293 As part of the plea agreement, Trieb agreed to a twenty-two-year sentence. Trieb also agreed that he would not be "eligible for parole for a period of twenty-one (21) years... without any reduction for good time." The transcript of the hearing makes clear that a thirty-year sentence for Trieb was reduced by the maximum amount of good time Trieb waived. Transcript of Plea Bargain Hearing and Sentencing, September 24, 1982, p. 29.
The majority concludes Trieb was without authority to waive his future right to good time, and therefore, Trieb's sentence is illegal. Chapter 12-54.1, N.D.C.C., is silent as to the ability of prisoners to waive their right to good time as part of plea negotiations. Based on the majority's conclusion as to the purpose of good time, "to encourage prison discipline," the majority concludes the legislature created good time only for the benefit of prison administrators.
The majority focuses only on prison administrators' interest in good time, and ignores the interest prisoners have in being able to earn good-time credits. As the majority notes, good-time credits are designed "to improve the morale and well-being of each inmate in each institution, or to rehabilitate prisoners generally." 72 C.J.S. Prisons § 145(b) (1987) (footnotes omitted).
In focusing only on prison administrators' interest, the majority ignores this Court's holding that a prisoner's right to statutory good time is a liberty interest protected by the Due Process Clause of the Fourteenth Amendment. Matz v. Satran, 313 N.W.2d 740, 742 (N.D.1981); Jensen v. Satran, 332 N.W.2d 222, 226 (N.D.1983). Due process requires that before a prisoner's good time can be revoked, the prisoner must be given advance written notice of the prohibited acts that may result in the loss of good time; advance written notice of the claimed violation; a written statement by the fact-finders as to the evidence relied on; and a limited right to call witnesses and present documentary evidence in defense. Matz; Jensen.
Chapter 12-54.1, N.D.C.C., creates statutory rights in prisoners which are protected by the United States Constitution. Like other rights, the right to receive good time can be knowingly and intelligently waived by the holder of the right. See First State Bank v. Anderson, 452 N.W.2d 90, 92 (N.D.1990); Gajewski v. Bratcher, 221 N.W.2d 614, 628 (N.D.1974); N.D.C.C. § 1-02-28.
In August 1984, the Director of the North Dakota Department of Parole and Probation wrote to Deputy Attorney General Calvin Rolfson seeking an opinion as to whether inmates could waive their right to good time eligibility. In a February 1985 letter opinion, Deputy Attorney General Rolfson responded by concluding:
"We have found no cases which directly deal with the issue presented in your letter, namely the issue of whether a defendant can plea bargain away his guarantee statutory good time. In North Dakota, good time is purely statutory. Smith vs. Satran, 295 N.W.2d 118 (N.D.1980). As a general rule, statutory rights may be waived or surrendered, in whole or in part, by the party to whom or for whose benefit they are given. 28 Am Jur.2d, Estoppel and Waiver, Section 164, Page 185 (1966). The doctrine of waiver is applicable to all rights and privileges to which a person is legally entitled whether secured by contract, conferred by statute, or guaranteed by the constitution, provided such rights and privileges rest in the individual who has waived them and are intended for his benefit. Gajewski vs. Bratcher, 221 N.W.2d 614 (N.D.1974); Wellens vs. Beck, 103 N.W.2d 281 (N.D.1960). Therefore, according to these general rules of law, an individual could waive his statutory good time pursuant to a plea agreement."
The Attorney General's interpretation is persuasive, and should be adopted by this Court. See United Hospital v. D'Annunzio, 514 N.W.2d 681 (N.D.1994).
The majority concludes the prison administrators' ability to control prisoners could be harmed if prisoners are allowed to waive good time as part of plea negotiations. The majority's conclusion is speculative. The record is devoid of evidence supporting the majority's conclusion that allowing the waiver of good-time credits will lead to decreased prison discipline.
*294 The majority wrongly assumes prison administrators will be without tools to control prisoners if Trieb's waiver of good time is affirmed. Prison administrators have many other tools at their disposal to encourage good behavior by prisoners. See N.D.C.C. § 12-47-12; Ennis v. Schuetzle, 488 N.W.2d 867, 872 (N.D.1992) (the warden is statutorily authorized to regulate conduct of prisoners by withholding job and housing privileges); Jensen v. Powers, 472 N.W.2d 223, 225 (N.D. 1991) (the warden is authorized to deny prisoner use of privileged items of property by removing items, such as a television and a personal computer, from the prisoner's cell); Jensen v. Satran, 332 N.W.2d 222, 226 (N.D. 1983) (the transfer of an inmate to less amenable and more restrictive quarters is within authority of penitentiary officials); Havener v. Glaser, 251 N.W.2d 753, 760 (N.D.1977) (placement of prisoners in administrative isolation after prisoners were allegedly found in possession of marijuana did not constitute a deprivation of liberty interest within meaning of Due Process Clause).
Additionally, prison administrators have discretion to award sentence reductions for meritorious conduct by a prisoner. See N.D.C.C. §§ 12-54.1-03 and 12-54.1-04. I do not read Trieb's plea agreement as precluding Trieb from earning sentence reduction credits for meritorious conduct.
The prison administrators, whose interest the majority would vindicate, have raised no objection to the sentence in question. If prison administrators believed Trieb's sentence illegally infringed on their authority, they could have petitioned this Court for a supervisory writ directing the district court to amend Trieb's sentence. State ex rel. Olson v. Maxwell, 259 N.W.2d 621, 629 (N.D. 1977). In Maxwell, the Attorney General sought a supervisory writ requiring the district court to amend a sentence. The district court sentenced a female to imprisonment at the state penitentiary and at no other place. At that time, all female prisoners were being transported out-of-state to serve their sentences. The Attorney General, on behalf of prison administrators, claimed the sentence was an illegal infringement on executive authority. This Court exercised its supervisory jurisdiction to hear and decide the case. Maxwell.
This Court's authority to issue, hear, and determine remedial or original writs is found in Art. VI, § 2, N.D. Const. Although used sparingly, supervisory control over lower courts is exercised to "prevent injustices in extraordinary cases where no other remedy is adequate or allowed by law." Odden v. O'Keefe, 450 N.W.2d 707, 708 (N.D.1990). See State ex rel. Koppy v. Graff, 484 N.W.2d 855, 857 (N.D.1992).
Prison administrators have not challenged the practice of allowing prisoners to waive their right to good time. Trieb had a statutory right to earn good time. In exchange for a reduced sentence, Trieb bargained away his right. Trieb has no standing to assert any rights of prison administrators. The amended judgment should be affirmed.
MESCHKE, J., concurs.
NOTES
[1]  The terms of the plea agreement were:

"1. Reginald Trieb will plead guilty to the crime of murder a Class AA felony, 12.1-16-01, N.D.C.C. as is defined in the Complaint.
"2. The Court will impose a sentence of 22 years for the crime. Reginald Trieb will receive credit for time already served commencing November 19, 1979.
"3. All parties to this Agreement understand that parole will be determined by the provisions of 12.1-32-01(1) which the parties agree is that the Parole Board will not consider parole until Reginald Trieb has served 21 years, being 252 months.
"4. The State shall dismiss all other charges pending against Reginald Trieb resulting from events of November 12 or 13 in Adams County, North Dakota."
[2]  Rule 35(a), N.D.R.Crim.P., provides:

"(a) Correction of sentence. The sentencing court may correct an illegal sentence at any time and may correct a sentence imposed in an illegal manner within the time provided herein for the reduction of sentence."
