
712 N.W.2d 687 (2006)
Valentino MAGHEE, Appellant,
v.
IOWA DISTRICT COURT JUDGE, Linda READE, Appellee.
No. 03-0841.
Supreme Court of Iowa.
April 21, 2006.
Philip B. Mears of Mears Law Office, Iowa City, for appellant.
Thomas J. Miller, Attorney General, and William A. Hill, Assistant Attorney General, for appellee.
LAVORATO, Chief Justice.
Valentino Maghee appeals from a penalty order of the district court in which a portion of his earned time credit as an inmate of the Anamosa State Penitentiary was ordered deducted from his total earned time credit because he filed a frivolous lawsuit. He contends he was denied *688 due process under the Fourteenth Amendment to the Federal Constitution because he was denied appointment of counsel at state expense during the penalty hearing. He also contends the order should be set aside because it was disproportionate to the offense. We reject both contentions and affirm.

I. Background Facts and Proceedings.
A. Underlying proceeding. On December 4, 1996, Maghee filed a "complaint" in the district court against Des Moines officials, alleging the illegal seizure of his property and malicious prosecution to cover up official misconduct. He alleged these actions occurred in December 1991 and May 1994.
On December 19 the Des Moines officials filed a motion to dismiss the complaint on the grounds that the action was barred by the statute of limitations pursuant to Iowa Code section 614.1(1) (1995) (one-year statute of limitations for actions to enforce the payment of a penalty or forfeiture under an ordinance). District judge Linda Reade set the motion for hearing on January 27, 1997. (Judge Reade is now a federal district court judge.) Before the hearing, Maghee filed a resistance in which he alleged that Iowa Code section 614.1(4) (five-year statute of limitations for actions founded on unwritten contracts, injuries to property, fraud, and other actions not otherwise provided for except as provided by subsections 8 and 10) applied.
Maghee failed to appear, either personally or by telephone, for the January 27 hearing, which was set for 8:30 a.m. (Maghee was incarcerated at the time.) He did however file a motion for continuance, which was time-stamped by the clerk at 2:27 p.m. on January 27. In his motion, Maghee alleged that he was unable to secure prison telephone privileges on January 27 and that he was not able to obtain possession of his legal files that were in the possession of prison officials. At 4:04 p.m. on January 27, Judge Reade granted the defendants' motion to dismiss on the grounds that Maghee's action was barred by the statute of limitations pursuant to Iowa Code section 614.1(2) (two-year statute of limitations for actions founded on injuries to person or reputation).
After Judge Reade dismissed Maghee's action, Maghee filed on February 3 a motion for reconsideration of the order dismissing his action, and in that motion he also asked the court to add additional defendants. In support of his motion, Maghee again alleged that the correct statute of limitations was section 614.1(4) and that Judge Reade had erred in applying section 614.1(2). Judge Reade denied Maghee's previous motion to continue, the motion to reconsider, and the motion to add additional defendants. That ruling, however, did not deter Maghee from again filing a motion to add additional defendants, a motion that Judge Reade also denied.
On December 7 Maghee filed a motion to vacate Judge Reade's ruling on the motion to dismiss pursuant to Iowa Rule of Civil Procedure 252(e) (now rule 1.1012(5)) on the grounds that he was prevented from participating in the January 27 hearing because he was in solitary lock-up. He further alleged that prison officials withheld and denied him access to his legal papers. District judge Robert Wilson, who has since that time resigned, denied the motion.
On February 16, 1998, Maghee filed a motion to set aside the ruling on the motion to dismiss pursuant to Iowa Rule of Civil Procedure 179(b) (now rule 1.904(2)) and rule 1.1012(5), alleging the same grounds he urged in his December 7, 1997 motion. On February 16, 1998, Judge Wilson denied the motion, following which, on *689 February 27 Maghee filed a motion to enlarge findings pursuant to rule 1.904(2), a motion to recuse Judge Reade and Judge Wilson, a demand for hearing, and another motion for continuance of the January 27, 1997 hearing. On October 8, 1998, Maghee filed a motion for summary judgment, a motion to allow him to proceed with his action pursuant to the First, Fourth, and Fourteenth Amendments to the United States Constitution, a demand for hearing, and a motion to add additional defendants. On November 12 Judge Wilson denied all of Maghee's outstanding motions and instructed the clerk of court to close the file and refuse any further filings in the case.
B. Present proceedings. On May 6, 1999, Maghee filed the present action against Judge Reade, alleging that the Des Moines officials in the underlying action recruited Judge Reade and the Iowa Department of Corrections officials in their conspiracy and wrongdoing to cover up and continue their misconduct of illegally seizing his property. Maghee further alleged that Judge Reade never answered his motion to continue in violation of Iowa Rule of Civil Procedure 117(c) (now rule 1.455) and in violation of his First Amendment right of access to the courts and in violation of his Fourteenth Amendment right to due process and equal protection. Maghee also alleged that Judge Reade failed to rule on his motion for summary judgment that he filed on January 7, 1997. In addition, Maghee alleged that despite section 614.1(4), Judge Reade in furtherance of the conspiracy ruled in favor of the Des Moines officials by making false rulings that the Iowa statute of limitations for injury to property was two years and not the correct law of five years.
For relief, Maghee asked the court to issue (1) a declaratory judgment that Judge Reade violated his First and Fourteenth Amendment rights and (2) an injunction ordering Judge Reade to rule on his January 7, 1997 motion for continuance. He also asked for attorney fees and court costs.
On April 26, 2000, district judge Richard Blane II filed an order of dismissal pursuant to Iowa Code section 610A.2(1)(b) (1999). In the order, Judge Blane in a thorough analysis found that Maghee's current cause of action was frivolous and malicious as defined in Iowa Code section 610A.2.
In the dismissal order, Judge Blane set a hearing for June 8, 2000 to determine whether the court should enter an order imposing penalties under section 610A.3(1)(a) (loss of good conduct time credits) or (b) (deduction from prisoner's account). Further, the judge ordered a representative of the attorney general's office to appear at the hearing to present evidence on the penalty issue and appointed an attorney to represent Maghee at state expense because of the constitutional ramifications of Maghee's loss of good conduct time credits. Finally, the judge ordered the Iowa Department of Corrections to provide the court a record of Maghee's good conduct time credits and the balance of Maghee's prison account and ordered the Polk County Sheriff to transport Maghee to the Polk County Courthouse for the hearing.
Judge Blane entered an order continuing the June 8 hearing pending the outcome of Maghee's postconviction relief application. Because of the delay in trying the postconviction relief action, Judge Blane on August 6, 2002 set a scheduling conference for August 23. In the same order the judge appointed Maghee new counsel. On August 23 the judge set the penalty hearing for April 1, 2003. On the same day  August 23  the judge relieved Maghee's new counsel of his obligation to represent Maghee for two reasons. First, *690 the State Public Defender's office advised the attorney it would not authorize payment for the attorney's services. Second, the judge noted that this court in Maghee v. State, 639 N.W.2d 28 (Iowa 2002), held that a prison inmate challenging loss of good conduct time credit in a prison disciplinary hearing was not constitutionally entitled to appointed counsel at state expense.
On April 1, 2003, district judge Paul Huscher presided at the penalty hearing at which an assistant attorney general appeared as well as Maghee, who represented himself. During the hearing, the judge engaged the parties in a discussion of the amount of earned time credit that could be taken in a prison disciplinary matter and what the district court is empowered to do pursuant to Iowa Code chapter 610A (2003). (As of January 1, 2001, the designation "good conduct time" was changed to "earned time credit.") The judge asked Maghee whether there was any reduction of earned time credit that would discourage him from making further filings in the case that had been closed and was never appealed. Maghee never gave an answer but continued to maintain his right to challenge an improper ruling.
Judge Huscher stated that he believed Maghee had no intention of abiding by the rules or procedures of the court. The court continued:
I would be inclined and could easily find that taking every day of good time that you have would be insufficient as a sanction in this matter but would be appropriate. On the other hand, it seems to me that the time of the sanction and the amount of good time available to be taken legitimately should be the amount that was, at least as best as we can determine, the amount that you would have had available at the time of the finding of the violation and at the time of your conduct. It appears that that amounts to about 2000 days.
Following the hearing, Judge Huscher on April 2 entered an order that sanctioned Maghee for his frivolous and malicious filings with the loss of 2000 days of earned time credit. See Iowa Code § 610A.3(1)(a). The order directed the warden of Maghee's correctional institution to reduce Maghee's total earned time credits by 2000 days.
On April 14 attorney Philip B. Mears filed his appearance on behalf of Maghee, a motion to expand Judge Huscher's findings, and a motion for the appointment of counsel at state expense. In the motion, counsel contended that the loss of earned time credit is akin to a civil contempt and requires appointment of counsel at state expense. Counsel also asked the court to address the disparity in sanctions between Maghee's penalty and the penalties customarily handed down in prison disciplinary proceedings.
On April 21 Judge Huscher denied the motion following which Maghee appealed. On July 11 this court entered an order directing the district court to rule on Maghee's request for appointment of counsel and for preparation of a transcript, both at state expense. Judge Blane denied the motion and thereafter denied Maghee's motion to reconsider.
On March 3, 2004, this court entered an order in response to Maghee's pro se request for appointment of counsel. The court appointed Mears to represent Maghee on appeal pursuant to Iowa Code section 815.10 and directed the court reporter to prepare any transcripts ordered by Mears for use in this appeal.

II. Issues.
This appeal presents two issues: (1) whether there is a constitutional right to *691 appointment of counsel at state expense in Iowa Code section 610A.3 proceedings, and (2) whether the sanction in this case, loss of 2000 days of earned time credit, should be set aside.

III. Constitutional Right to Appointed Counsel at State Expense.
Maghee contends he has a federal due process right under the Fourteenth Amendment to the appointment of counsel at state expense in this penalty proceeding under Iowa Code section 610A.3. He likens the procedure under section 610A.3 to civil contempt and argues that indigent persons who face imprisonment in a civil contempt proceeding are provided counsel at state expense, as we held in McNabb v. Osmundson, 315 N.W.2d 9, 10, 14 (Iowa 1982). In that case, this court held that McNabb was entitled to counsel under the Due Process Clause of the Fourteenth Amendment to the United States Constitution in a contempt hearing that resulted in his incarceration and would be entitled to counsel in any subsequent hearing if the hearing would result in the loss of his physical liberty. McNabb, 315 N.W.2d at 11, 14.
In contrast, the State contends that loss of earned time credit does not actually extend the inmate's sentence but only changes the potential for the amount of time that an inmate may serve. Given this fact, the State argues that the section 610A.3 penalty proceeding in which the inmate is facing the loss of earned time credit is more like a prison disciplinary proceeding than a civil contempt action because the inmate is already incarcerated and therefore is not facing the loss of liberty. Because an inmate is not entitled to appointment of counsel at state expense in the disciplinary proceeding, as this court held in Maghee v. State, 639 N.W.2d at 30-31, the State argues that a similar procedure used to take away earned time credit based upon frivolous litigation does not require appointment of counsel at state expense. For reasons that follow, we think the State has the better argument.
Because a constitutional issue is raised, our review is de novo. James v. State, 541 N.W.2d 864, 869-70 (Iowa 1995).
A. Applicable law. We begin with the applicable statutes in this proceeding. Iowa Code chapter 610A is entitled "Civil Litigation by Inmates and Prisoners." As applied to this case, Iowa Code section 610A.2(1)(b) allows the court to dismiss a civil action filed by an inmate or prisoner when the action is frivolous or malicious in whole or in part. Iowa Code section 610A.2(2) permits the court to consider several factors in determining whether an action is frivolous or malicious. Judge Blane found that four of the six factors listed in section 610A.2(2) applied to Maghee's action against Judge Reade: (1) the action was without substantial justification, see Iowa Code § 610A.2(2)(a); (2) the action was intended solely or primarily for harassment, see id. § 610A.2(2)(c); (3) the action was without evidentiary support, see id. § 610A.2(2)(d); and (4) the action was asserted with an improper purpose, including but not limited to, harassing an opponent, see id. § 610A.2(2)(e).
If the court finds the inmate has filed a frivolous civil action, the court may dismiss the action, see id. § 610A.2, as Judge Blane did here. If the court dismisses the action, the inmate is subject to penalties pursuant to Iowa Code section 610A.3. The penalties include loss of some or all of the inmate's earned time credits. Id. § 610A.3(1)(a). If the prisoner has no earned time credits to deduct, the court may deduct up to fifty percent of the average balance of the inmate account. Id. § 610A.3(1)(b). Here, as mentioned, Judge Huscher ordered a deduction of 2000 days of Maghee's earned time credits.
*692 Apparently, chapter 610A is the legislature's attempt to deter inmates and prisoners from filing frivolous lawsuits. Iowa is not alone in this attempt. See 28 U.S.C.A. § 1932 (West Supp.2005) (loss of earned good time credit for inmates in federal correctional facilities for frivolous civil litigation); Lynn S. Branham, Of Mice and Prisoners: The Constitutionality of Extending Prisoners' Confinement for Filing Frivolous Lawsuits, 75 S. Cal. L.Rev. 1021, 1031 (2002) (pointing out that twelve states permit the extension of a prisoner's incarceration, generally through revocation of good time credits, for filing a frivolous lawsuit).
B. Analysis. We turn now to Maghee's federal due process claim. The Fourteenth Amendment to the Federal Constitution provides that no state shall "deprive any person of life, liberty, or property, without due process of law." U.S. Const. amend. XIV, § 1. To establish a due process violation, an inmate must first establish that the inmate has a liberty interest of constitutional dimension. See Olim v. Wakinekona, 461 U.S. 238, 250, 103 S.Ct. 1741, 1748, 75 L.Ed.2d 813, 823 (1983); Sanford v. Manternach, 601 N.W.2d 360, 364 (Iowa 1999).
When a state has created a right to good conduct time, that right is embraced within the liberty interest protected by the Due Process Clause of the Fourteenth Amendment. Wolff v. McDonnell, 418 U.S. 539, 557, 94 S.Ct. 2963, 2975, 41 L.Ed.2d 935, 951 (1974). Iowa's law providing for earned time credits creates a liberty interest. Sanford, 601 N.W.2d at 368; see also Iowa Code § 903A.2. Before January 1, 2001, inmates earned "good conduct" time amounting to day for day credit in the reduction of the inmate's sentence. See Iowa Code § 903A.2(1)(a) (1999). In addition, the inmate could earn bonus credit for work, treatment, or education amounting up to five days per month in reduction of the inmate's sentence. See id. § 903A.2(1)(a)(1)-(5). This changed into a single unified credit called "earned time" credit. 2000 Iowa Acts ch. 1173, § 4 (codified at Iowa Code § 903A.2 (2001)). As mentioned, the change became effective January 1, 2001 and applied to all inmates even if they were already in the prison system. See 2000 Iowa Acts ch. 1173, §§ 9-10. Up until January 1, 2001, Maghee therefore earned good conduct time plus bonus credit if he was working or participating in a treatment or educational program. After that date, he accrued earned time credits. (For the balance of this opinion, we will refer to both as "earned time credit.") In any event, Maghee has a liberty interest in his earned time credits, which affects the duration of his sentence.
As mentioned, the earned time credit is a liberty interest protected by the Due Process Clause of the Fourteenth Amendment. The degree of an inmate's interest in personal liberty, however, is less than the degree of interest in personal liberty possessed by one facing probation or parole revocation or one facing jail in a civil contempt action. For example, the immediate personal liberty of an inmate involved in a prison disciplinary proceeding is not threatened because, as the State points out, the inmate is already incarcerated. In contrast, a parolee facing parole revocation, a probationer facing probation revocation, and a respondent in a civil contempt action facing jail are all subject to an immediate threat to their personal liberty. This difference was underscored in Greenholtz v. Inmates of Nebraska Penal & Correctional Complex, a case in which inmates of a state prison brought a civil rights action against a state parole board alleging due process violations in the board's consideration of the inmates' suitability for parole:

*693 The fallacy in respondents' position is that parole release and parole revocation are quite different. There is a crucial distinction between being deprived of a liberty one has, as in parole, and being denied a conditional liberty that one desires. The parolees in Morrissey (and probationers in Gagnon) were at liberty and as such could "be gainfully employed and [were] free to be with family and friends and to form the other enduring attachments of normal life." The inmates here, on the other hand, are confined and thus subject to all of the necessary restraints that inhere in a prison.
442 U.S. 1, 9, 99 S.Ct. 2100, 2105, 60 L.Ed.2d 668, 676-77 (1979) (alteration in original) (citation omitted).
Significantly, in Morrissey the Court held that revocation of parole is not part of a criminal prosecution and for that reason the full panoply of rights due a defendant in a criminal prosecution does not apply to parole revocation. Morrissey v. Brewer, 408 U.S. 471, 480, 92 S.Ct. 2593, 2600, 33 L.Ed.2d 484, 494 (1972). The Court also recognized that "[r]evocation deprives an individual, not of the absolute liberty to which every citizen is entitled, but only of the conditional liberty properly dependent on observance of special parole restrictions." Id. However, the Court considered the loss of this conditional liberty a grievous one requiring that the parolee be accorded due process. Id. at 482, 92 S.Ct. at 2601, 33 L.Ed.2d at 495. The Court then detailed the minimum requirements of due process for parole revocation, including but not limited to, notice of the claimed violations of parole and an opportunity to be heard at two hearings. Id. at 484-89, 92 S.Ct. at 2602-04, 33 L.Ed.2d at 496-99. The two hearings referred to include (1) a preliminary hearing at the time of the parolee's arrest and detention to determine whether there is probable cause to believe that the parolee has committed a violation of his parole and (2) if a probable cause finding is made, a revocation hearing to determine whether the facts show that a violation occurred and that revocation of parole is warranted. Id. at 485-88, 92 S.Ct. at 2602-04, 33 L.Ed.2d at 496-98.
The Court in Morrissey left open the question whether the parolee is entitled to the assistance of retained counsel or appointed counsel at the two hearings. Id. at 489, 92 S.Ct. at 2604, 33 L.Ed.2d at 499. One year later, in Gagnon v. Scarpelli, the Court answered the question as to appointed counsel in the context of a probation revocation. 411 U.S. 778, 93 S.Ct. 1756, 36 L.Ed.2d 656 (1973). Recognizing that probation revocation, like parole revocation, is not a stage of a criminal prosecution, the Court held that a probationer would be entitled to the same minimum due process rights accorded a parolee in a parole revocation. Id. at 782, 93 S.Ct. at 1759-60, 36 L.Ed.2d at 661-62. Given the critical differences between criminal trials and probation or parole revocation hearings, the Court opted for a due process requirement of appointed counsel at state expense on a case-by-case basis:
We thus find no justification for a new inflexible constitutional rule with respect to the requirement of counsel. We think, rather, that the decision as to the need for counsel must be made on a case-by-case basis in the exercise of a sound discretion by the state authority charged with responsibility for administering the probation and parole system. Although the presence and participation of counsel will probably be both undesirable and constitutionally unnecessary in most revocation hearings, there will remain certain cases in which fundamental fairness  the touchstone of due process  will require that the State provide at its expense counsel for indigent probationers or parolees.
*694 Id. at 790, 93 S.Ct. at 1763, 36 L.Ed.2d at 666.
Although the Court in Gagnon refused to adopt precise and detailed guidelines for courts to follow in determining whether to appoint counsel at state expense, it did provide some guidance:
The facts and circumstances in preliminary and final hearings are susceptible of almost infinite variation, and a considerable discretion must be allowed the responsible agency in making the decision. Presumptively, it may be said that counsel should be provided in cases where, after being informed of his right to request counsel, the probationer or parolee makes such a request, based on a timely and colorable claim (i) that he has not committed the alleged violation of the conditions upon which he is at liberty; or (ii) that, even if the violation is a matter of public record or is uncontested, there are substantial reasons which justified or mitigated the violation and make revocation inappropriate, and that the reasons are complex or otherwise difficult to develop or present. In passing on a request for the appointment of counsel, the responsible agency also should consider, especially in doubtful cases, whether the probationer appears to be capable of speaking effectively for himself. In every case in which a request for counsel at a preliminary or final hearing is refused, the grounds for refusal should be stated succinctly in the record.
Id. at 790-91, 93 S.Ct. at 1764, 36 L.Ed.2d at 666-67; accord Pfister v. Iowa Dist. Ct., 688 N.W.2d 790, 795-96 (Iowa 2004).
A hearing to determine penalties applicable under Iowa Code section 610A.3 is more akin to a disciplinary hearing involving loss of earned time credits than to a parole or probation revocation hearing. The legislature in passing section 610A.3 underscored this similarity by allowing the court to enter an order deducting the earned time credits or allowing the credits to be deducted pursuant to a disciplinary hearing under Iowa Code chapter 903A at the facility where the inmate is held. See Iowa Code § 610A.3(2) (2003).
Iowa Code section 903A.3(1) further emphasizes the similarity:
Upon finding that an inmate has violated an institutional rule, or has had an action or appeal dismissed under section 610A.2, the independent administrative law judge may order forfeiture of any or all earned time accrued and not forfeited up to the date of the violation by the inmate and may order forfeiture of any or all earned time accrued and not forfeited up to the date the action or appeal is dismissed, unless the court entered such an order under section 610A.3.

Id. § 903A.3(1) (emphasis added). Again, this provision makes clear that the inmate may be penalized for the inmate's actions in violation of section 610A.2 either in a court proceeding or a disciplinary proceeding at the correctional facility. The difference relates to the limit the statute places on the amount of accrued earned time that an administrative law judge can order forfeited. No such limit is placed on a district judge.
As with the disciplinary hearing, what is at stake in a section 610A.3 penalty hearing is loss of earned time, a liberty interest that does not rise to the level of importance that Morrissey; Gagnon, and Greenholtz attribute to the liberty interest a parolee and probationer possess and that McNabb attributes to one facing jail time in a contempt action. Because there is no due process requirement for appointment of counsel at state expense in a disciplinary hearing, we similarly hold there is no due process requirement for appointment of counsel at state expense in a section 610A.3 penalty proceeding.
*695 That brings us to Maghee's contention that the loss of earned time should be set aside.

IV. Propriety of the Sanction.
Maghee contends, as he did at the penalty hearing, that the court-ordered sanction amounting to a loss of 2000 days of earned time credits was too severe because it was disproportionate to the offense. For that reason, he argues we should set aside the sanction.
As mentioned, Iowa Code section 610A.3(1)(a) allows the district court to impose as a sanction for filing frivolous civil actions "[t]he loss of some or all of the earned time credits acquired by the inmate." (Emphasis added.) Because this provision does not mandate a set penalty, the sanction must rest in the discretion of the district court. Cf. Harpster v. State, 569 N.W.2d 594, 598 (Iowa 1997) ("In criminal cases, sentences are upheld on review unless the judge exercised his discretion on grounds or for reasons clearly untenable or unreasonable. When a sentence is not mandated, a trial court must exercise discretion in determining the sentence to be imposed." (Citations omitted.)). Maghee must therefore show an abuse of discretion to warrant our setting aside the sanction.
As mentioned, Maghee's only complaint at the hearing was that the sanction was disproportionate to the offense. Maghee offered no evidence as to what sanctions are actually imposed for other offenses. So there is in this record no basis for comparison to support Maghee's contention. Moreover, the loss of earned time credits here was within the "some or all" authority of section 610A.3(1)(a). Finally, Judge Huscher recognized he could have ordered forfeited all of Maghee's earned time credits but exercised his discretion not to do so. We conclude Maghee has failed to show an abuse of discretion.

V. Disposition.
In sum, we hold Maghee is not entitled to appointed counsel at state expense. In addition, Maghee has failed to show that the district court abused its discretion in ordering a deduction of 2000 days of earned time credits for filing a frivolous civil action. We therefore affirm.
AFFIRMED.
