Opinion by
Judge CRISWELL.Defendant, Michael C. Wilbur, appeals the order of the trial court denying his Crim.P. 35(c) motion. We reverse and remand with directions.
Defendant entered pleas of guilty to one count each of first degree burglary, aggravated robbery, first degree sexual assault, first degree kidnapping, and crime of violence, in exchange for the dismissal of the remaining charges and a stipulated sentence of an 18-year term of incarceration.
During the providency hearing, after defendant had been advised of the elements of the offenses and the possible penalties and had assured the court that he understood his rights and wished to waive them, the following colloquy occurred:
The Court: You’re going to go down to the State penitentiary to the Department of Corrections in Canon City for 18 years. Now, in reality, with the good time law the way it is, you’ll get — that will be about a nine year sentence, and you will also get credit for this time you have been in the county jail. You get over two years of your sentence basically knocked off already ‘cause you have been in the county jail for over a year, or State Hospital.
Defendant: Well, almost eighteen months.
The Court: Huh? Eighteen months?
Defendant: Almost eighteen months.
The Court: So that’s almost three years, then, on your sentence that’s already been served, with the good time law the way it is.
But you are going to be down there for a significant length of time under today’s standards.
Defendant: Yeah.
The Court: Do you understand that?
Defendant: Yes, sir.
No objection to the court’s advice to the defendant was registered by the prosecutor.
Thereafter, defendant formally tendered, and the court accepted, his guilty pleas.
However, after the entry of his plea, the parole board determined that parole was discretionary, not mandatory, for sex offenders. That interpretation of the pertinent statute was affirmed in Thiret v. Kautzky, 792 P.2d 801 (Colo.1990). As a result of this interpretation of the statute, defendant may be required to serve the full 18-year sentence on his first degree sexual assault conviction, contrary to the explicit advice given to him by the sentencing court.
Defendant, therefore, filed a Crim.P. 35(c) motion, asserting that his plea had been *3made unknowingly, and therefore, it had been involuntarily entered, because it was based upon the trial court’s advice with respect to the sentence. As a remedy, he asked that his sentence for this conviction be reduced so as to reflect the terms of the plea bargain as it was interpreted at the time of his sentencing.
A hearing on defendant’s motion was held, and defendant’s former counsel testified that, prior to sentencing, he had advised defendant that he would serve only approximately one-half of the sentence that he had agreed to. This was consistent with defendant’s testimony which reiterated his understanding of the plea agreement, as explained by the provi-deney court.
However, the court that heard defendant’s Crim.P. 35(c) motion determined that he had bargained for and received an 18-year sentence. Thus, that court concluded that, while defendant may have expected to serve only nine years, he had received no guarantee that that would be true. Accordingly, defendant’s motion was denied.
I.
On appeal, defendant contends that the trial court erred in finding that his plea was not based on an agreement that he would serve only nine years under the good time law. We agree.
When attacking a conviction by a motion for post-conviction relief, a defendant must establish by a preponderance of the evidence that the conviction is invalid. People v. Brewer, 648 P.2d 167 (Colo.App.1982).
Unless there is no record support for the factual findings of the Crim.P. 35(c) court, that court’s determination may not be disturbed on appeal. Lamb v. People, 174 Colo. 441, 484 P.2d 798 (1971).
A guilty plea must be knowing, intelligent, and voluntary before the plea may form the basis for a judgment of conviction. Wilson v. People, 708 P.2d 792 (Colo.1985). And, a defendant has a constitutional right to be treated with fairness throughout the plea bargaining process. People v. Fisher, 657 P.2d 922 (Colo.1983).
If a defendant has reasonably relied to his detriment on a promise made by the People, he is entitled to have that promise enforced. People v. Fisher, supra. And, in determining whether the terms of a plea agreement have been met, a court must consider defendant’s legitimate expectations arising from the agreement. See People v. Macrander, 756 P.2d 356 (Colo.1988).
Here, it is undisputed that, prior to accepting defendant’s plea, the providency court interpreted the agreement to require that defendant, if he qualified under the good time law, serve no more than one-half of the sentence that the People and defendant had agreed upon. The court’s interpretation of the agreement formed part of the advisement given to defendant, and it was only after receiving such advice that defendant’s plea was tendered and accepted. Accordingly, the trial court’s contemporaneous interpretation of the plea agreement must be deemed to reflect the terms of the agreement as both parties understood them, and it was based on this interpretation that defendant proceeded to enter his plea of guilty.
Given these circumstances, therefore, it is true only in a technical sense that defendant was given no guarantee that he would serve only nine years. Subject to defendant’s conduct being such that he would accumulate good time, he was expressly informed that he would be released after serving nine years. Hence, the undisputed evidence does not support the district court’s determination that defendant was not given assurances upon this subject at the time of the plea agreement.
We conclude, therefore, that with respect to defendant’s conviction for first degree sexual assault, his legitimate expectations, based upon the providency court’s explicit assurance as to the legal effect of the plea agreement, have not been met. With respect to that conviction, therefore, defendant must be resentenced to a term commensurate with the terms of the plea agreement, as interpreted by the providency court.
The People’s reliance upon People v. Sorenson, 824 P.2d 38 (Colo.App.1991) is misplaced. There, the trial court resenteneed *4defendant solely because the court’s prior unexpressed expectations regarding the time defendant would actually serve in prison had not been met. There was no allegation in Sorenson that defendant reasonably relied to his detriment upon any advice given to him by the trial court regarding parole.
Nor does People v. Moore, 844 P.2d 1261 (Colo.App.1992) require a contrary result. There, it was alleged that defendant’s plea was entered involuntarily because his attorney had advised him incorrectly regarding parole. However, there was no allegation that the plea agreement had been interpreted by the providency court to contemplate mandatory parole or that the defendant had been advised by the court that he would be paroled at the end of a specified period. This significant factor is what distinguishes defendant’s circumstances from those presented in both Sorenson and Moore.
The order is reversed, and the cause is remanded to the trial court with directions to resentence defendant on the first degree sexual assault conviction in accordance with the views expressed in this opinion.
PLANK and RULAND, JJ., concur.