
206 N.J. Super. 182 (1985)
502 A.2d 46
STATE OF NEW JERSEY, PLAINTIFF-RESPONDENT,
v.
CLYDE WILSON, DEFENDANT-APPELLANT.
Superior Court of New Jersey, Appellate Division.
Submitted October 15, 1985.
Decided December 4, 1985.
*183 Before Judges COHEN and ASHBEY.
Thomas S. Smith, Public Defender, attorney for appellant (Jeffrey N. Greenman, Designated counsel, of counsel and on the letter brief).
Irwin I. Kimmelman, Attorney General, attorney for respondent (Jessica S. Oppenheim, Deputy Attorney General, of counsel and on the letter brief).
PER CURIAM.
Defendant was charged in a four count indictment with burglary (N.J.S.A. 2C:18-2), possession of a weapon for an unlawful purpose (N.J.S.A. 2C:39-4), possession of a weapon by a person convicted of crime (N.J.S.A. 2C:39-7) and unlawful possession of a weapon (N.J.S.A. 2C:39-5(d)). Following plea negotiations, defendant entered a plea of guilty to the burglary charge. The undertaking of the State was to move to dismiss the other counts and to recommend that any custodial sentence not exceed ten years with any mandatory minimum not to exceed three years. Defendant further agreed that if he failed to appear at the time of sentencing, he would be subject to an extended term of twenty years with a mandatory minimum not to exceed ten years. A sentencing date was set and defendant was freed on bail. Defendant failed to appear at sentencing. Bail was revoked. He was arrested approximately two months later.
At the second sentencing hearing defendant advised the court that he was unable to appear on the original date because he had been very sick and under the care of a doctor. He referred to a doctor's disability certificate which had been forwarded to the court a few days after the original sentencing date. The court rejected the defendant's explanation without holding a hearing and proceeded to sentence the defendant to a term of twenty years with a mandatory minimum of ten years.
*184 The primary issue presented for our determination is whether the court erred in honoring the plea agreement for an extended term in the event of defendant's nonappearance at sentence. Because we are convinced that a sentence based entirely upon nonappearance in court is an illegal sentence, we reverse.
We recognize that defendant, by the age of 36, had a long juvenile and adult criminal record beginning in 1962. Surely, the State had a right to move for an extended sentence if defendant so understood as a part of his agreement. State v. Kovack, 91 N.J. 476 (1982). What is improper is a sentence based upon a factor which is unrelated to the sentencing criteria set forth in the Code of Criminal Justice. N.J.S.A. 2C:1-1 et seq. Nowhere in the code is it suggested that defendant's appearance for sentence is one of those criteria. State v. Roth, 95 N.J. 334 (1984); State v. Hodge, 95 N.J. 369 (1984).
We do not say that the reasons for defendant's failure to appear for sentence may not be considered. They must, however, be relevant to identified sentencing guidelines. Since defendant's sentence was based upon an impermissible factor we do not find it necessary to decide whether the court correctly determined that defendant was a persistent offender on the record available or whether the agreement fairly apprised the defendant of the consequences of non-appearance if he were sick.
With this exception we are satisfied that the balance of the plea agreement was well understood by defendant and there was a factual basis. No sound reason exists to permit defendant to withdraw his guilty plea or to permit a rehearing of the applicability of an extended term on the merits. We exercise our authority to reduce the sentence to ten years, three years without parole eligibility. R. 2:10-3. Having resolved defendant's arguments as to sentence in his favor, we need not consider the other points raised in his brief.
*185 The matter is remanded for the entry of a modified judgment of conviction consistent herewith.
