
137 Ill. App.3d 854 (1985)
484 N.E.2d 1165
THE PEOPLE OF THE STATE OF ILLINOIS, Plaintiff-Appellee,
v.
TIMOTHY JOHN COSBY, Defendant-Appellant.
No. 4-85-0099.
Illinois Appellate Court  Fourth District.
Opinion filed October 17, 1985.
*855 William K. Brown, of Goldfine & Bowles, P.C., of Peoria, for appellant.
G. Patrick Riley, State's Attorney, of Eureka (Robert J. Biderman and Gwendolyn Klingler, both of State's Attorneys Appellate Service Commission, of counsel), for the People.
Reversed and remanded.
JUSTICE TRAPP delivered the opinion of the court:
The defendant, Timothy John Cosby, appeals the judgment entered on his plea of guilty to a charge of aggravated criminal sexual abuse (Ill. Rev. Stat., 1984 Supp., ch. 38, par. 12-16(b)). As the basis for his assertions that his conviction should be vacated and that he should be allowed to plead anew, Cosby maintains that the circuit court erred in denying his amended motion to withdraw his guilty plea and that the court erred in failing to make available to him the complete transcript and record of juvenile proceedings in which the alleged victim of his offense was the respondent. Alternatively, Cosby argues that the three-year sentence imposed upon him was an abuse of discretion, and that his sentence should therefore be vacated and the cause remanded for resentencing.
Cosby pleaded guilty to a charge of aggravated criminal sexual abuse on November 16, 1984. As the factual basis for the plea, the Woodford County State's Attorney stated that on the night of July 20-21, 1984, the victim, then age 14, was baby-sitting at the Minonk home of Daniel Peek. On that night, Cosby, then age 20, went to the Peek residence and performed with the victim an act of sexual intercourse per os.
On December 17, 1984, Cosby filed a motion to withdraw his guilty plea. The stated basis for the motion was that "defendant does not believe he is guilty." Following argument by counsel on December 21, 1984, the court denied the motion on the ground that it did not contain the certificate required by Supreme Court Rule 604(d) (87 Ill.2d R. 604(d)) and did not state with specificity the grounds on which Cosby relied as the basis for the motion.
Following the imposition of sentence, Cosby, who had previously been represented by court-appointed counsel, obtained private counsel. On January 4, 1985. Cosby's private counsel filed a second motion *856 to withdraw Cosby's guilty plea which was amended on February 5, 1985. So far as it pertained to the issue which we consider on appeal, the amended second motion to withdraw Cosby's guilty plea alleged that at the time Cosby pleaded guilty, he believed that the alleged victim was over 15 years of age at the time of the alleged offense; that he was told by his appointed counsel that this belief was not relevant to his guilt or innocence; and that had he been aware that his reasonable belief regarding the age of the victim was a defense to the offense with which he was charged, he would not have entered a guilty plea. Cosby further asserted that at no time during the proceedings on his guilty plea did the court advise him that a reasonable belief that the victim was over 15 was a defense to the charge pending against him.
At a hearing on the amended second motion to withdraw Cosby's guilty plea held February 8, 1985, Cosby testified that he had known the victim for about a month before the alleged offense and had only talked to her on a couple of occasions prior to that time. At the time of the alleged offense, he had no idea as to her age, but prior to that time had seen her mostly with males between the ages of 16 and 21. In response to further questioning, Cosby stated that he felt that the victim was "about 17 or older" at the relevant time and that she was a junior or senior in high school, but that no one had ever told him how old she was.
Cosby further testified that on the day that he pleaded guilty, he asked the public defender, "Would not knowing her age and her making the first move on me be a defense[?]" and that the public defender replied, "No." At no other time prior to Cosby's entering his guilty plea did the public defender tell him that a reasonable belief at the time of the alleged offense that the victim was older than 15 was a defense to the charge pending against him. He would not have pleaded guilty if he had known at the time of his plea that that was a defense.
On cross-examination, Cosby denied that during the summer of 1984, after Daniel Peek told Cosby that the victim was interested in him, he said to Peek, "I wouldn't touch that, she is jailbait."
The State presented testimony of Woodford County public defender Daniel M. Harrod, who initially represented Cosby. Harrod testified that on the date that Cosby pleaded guilty to aggravated criminal sexual abuse, he (Harrod) was aware that an affirmative defense to that charge is that at the time of the alleged offense, the defendant reasonably believed that the victim was over 16. He recalled conversations with Cosby regarding the possible use of that defense prior to *857 the entry of Cosby's guilty plea, but did not recall exactly when those conversations took place. Harrod further testified as follows with regard to his conversations with Cosby dealing with the defense of reasonable belief as to the alleged victim's age:
"Q. Do you recall what he said to you and what you said to him?
A. Not specifically.
Q. Do you recall in general?
A. Yes. You are talking about the affirmative defense with regard to age?
A. Yes.
A. Yes. We did discuss that. As a matter of fact, I believe that you and I have discussed it from the standpoint that I indicated to you that we were considering raising that as a defense at which time I believe you may have related to me that you had either knowledge or you had a report or some information from a Mr. Peek that would suggest that Mr. Cosby had dated the girl in question on a prior occasion and that perhaps Mr. Peek had related either in a report or anyway you related to me there is some mention of so-called `jail bait' involved.
Q. Did you relay that information to Mr. Cosby?
A. Yes. I believe I did.
Q. Did you recall what his reaction to that was?
A. No.
Q. Did all of these conversations take place prior to the entry of his plea of guilty?
A. Yes."
On cross-examination, Harrod reiterated that he did not recall the specific contents of the conversations between he and Cosby with respect to the defense of a reasonable belief as to the alleged victim's age, but acknowledged that during his conversations with Cosby, Cosby may have made to him the statement, "What is a person suppose [sic] to do, ask for a driver's license to see before having sex?" Harrod had no recollection as to whether Cosby specifically indicated to him that at the time of the alleged offense he thought the victim was older than 15. At the end of the cross-examination of Harrod by Cosby's counsel, the following dialogue occurred:
"Q. * * *
Dan, did he [Cosby] ever tell you anything or make a statement to you to indicate that he understood that he couldn't be convicted, if a jury believed him about his belief of her [the alleged victim's] age?

*858 A. I don't know if I can answer that. I don't know if I could say we specifically discussed that one way or the other.
Q. My question, I suppose, is not directed to what you told him but to what he understood. Did you understand my question on that basis?
A. Yes.
Q. I know you couldn't look into his mind but he may have said something to you.
A. I don't know. I think I could honestly say that he may not have, but I can certainly say we discussed it."
The State's final witness was Patrick Riley, the Woodford County State's Attorney. With respect to negotiations with Harrod prior to Cosby's guilty plea, Riley stated:
"I specifically remember that during that conversation with Mr. Harrod that he indicated to me that a portion of the basis of his reasons for thinking that a lesser sentence should be imposed was that the affirmative defense of age was available to him and that I should take that into consideration in making any kind of offer to him."
At the conclusion of the hearing, the court denied Cosby's amended second motion to withdraw his guilty plea. As the basis for its decision, the court relied on Harrod's statement that he had discussed the defense of reasonable belief as to the victim's age with Cosby, and also relied on statements by Cosby, immediately prior to pleading guilty, that he had discussed the case many times with Harrod and that he had no questions that were unanswered regarding the law applicable to the case.
In support of his assertion that the circuit court erred in refusing to allow him to withdraw his guilty plea, Cosby relies on the fact that the court at no time attempted to ascertain his state of mind at the time of the alleged offense relative to the alleged victim's age, and contends that the undisputed fact that the alleged victim acted as the aggressor at the relevant time could have induced him to believe that she was over 15 at the time.
As the basis for its contention that the trial court properly denied Cosby's amended second motion to withdraw his guilty plea, the State relies on public defender Harrod's testimony that he had thoroughly discussed the case with Cosby, including the defense of a reasonable belief as to the alleged victim's being of age and the probability of prevailing at trial. The State also points to Cosby's statement, at the time that he pleaded guilty, that there was no question in his mind that he was five years older than the alleged victim and maintains *859 Cosby rejected the defense of a reasonable belief as to the alleged victim's being of age by pleading guilty.
 1, 2 Whether a guilty plea may be withdrawn rests within the sound discretion of the trial court. (People v. Jameson (1944), 387 Ill. 367, 56 N.E.2d 790.) The Jameson court set out the considerations which should guide the exercise of the trial court's discretion to permit withdrawal of guilty pleas:
"The discretion of the trial court to permit the withdrawal of the plea of guilty is a judicial discretion which should always be exercised in favor of innocence and liberty. The law favors a trial upon the merits by jury, and all courts should so administer the law and construe the rules of practice as to secure a hearing upon the merits, if possible. The least surprise or influence causing a defendant to plead guilty when he has any defense at all should be sufficient cause to permit a change of the plea from guilty to not guilty. The withdrawal of the plea of guilty should not be denied in any case where it is evident that the ends of justice will be served by permitting the plea of not guilty in its stead. People v. Schraeberg, 340 Ill. 620; People v. Kurant, 331 Ill. 470." 387 Ill. 367, 375, 56 N.E.2d 790, 794.)
Normally, a defendant seeking reversal of a trial court's decision denying a motion to withdraw a guilty plea must establish that (1) the guilty plea was attributable to a misapprehension of law or fact on his part; (2) he has a defense to the charge(s) worthy of consideration; or (3) there is doubt as to his guilt, and the ends of justice would be better served by a trial of the cause. People v. Worley (1966), 35 Ill.2d 574, 221 N.E.2d 267, cert. denied (1967), 386 U.S. 972, 18 L.Ed.2d 130, 87 S.Ct. 1163; People v. Romero (1984), 128 Ill. App.3d 461, 470 N.E.2d 1080.
 3 Upon considering the evidence presented at the hearing on the amended second motion to withdraw Cosby's guilty plea, we have concluded that Cosby labored under a misapprehension of law at the time he pleaded guilty. Paragraph 12-17(b) of the Criminal Code of 1961 provides:
"It shall be a defense [to a charge of aggravated criminal sexual abuse] that the accused reasonably believed the person to be 16 years of age or over." (Ill. Rev. Stat., 1984 Supp., ch. 38, par. 12-17(b).)
At the hearing on the amended second motion to withdraw his guilty plea, Cosby stated that at the time of the offense charged, he felt that the alleged victim was "about 17 or older" and that she was a junior or senior in high school. Cosby further testified that he would not *860 have pleaded guilty had he known that a reasonable belief at the time of the alleged offense that the victim is of age is a defense to a charge of aggravated criminal sexual abuse. Moreover, public defender Harrod candidly admitted that Cosby may not have understood that defense. No evidence contradicts the above testimony. We therefore hold that at the time that he pleaded guilty, Cosby misapprehended the law relative to the offense charged, and that for this reason the trial court abused its discretion in denying Cosby's amended second motion to withdraw his guilty plea. See Mendenhall v. Hopper (S.D. Ga. 1978), 453 F. Supp. 977, aff'd (5th Cir.1979), 591 F.2d 1342; People v. Jimenez (1979), 73 App. Div.2d 533, 422 N.Y.S.2d 414 (where defendant does not know of, or does not fully understand, potential defense to offense to which he pleaded guilty, plea is not knowingly and voluntarily entered).
 4 It is also apparent that a reasonable belief as to the alleged victim's being of age, which by statute is an absolute defense to a charge of aggravated criminal sexual abuse (Ill. Rev. Stat. 1983, ch. 38, par. 12-17(b)), constitutes a defense worthy of consideration in the case at bar. Additionally, Cosby's uncontradicted testimony as to his belief at the time of the alleged offense that the alleged victim was 17 or older creates a doubt as to his guilt, and it is apparent that under the circumstances here present allowing Cosby to withdraw his guilty plea would best serve the ends of justice.
 5 Since that statement does not preclude a conclusion that Cosby's understanding of the applicable statutes was erroneous or that he had a defense to the charge worthy of consideration, the fact that Cosby indicated at his guilty plea hearing that he understood the charge against him does not require a result different from that which we reach. The same is true of Cosby's acknowledgment at the time that he pleaded guilty that he knew that he was five years older than the alleged victim, for that statement contains no indication as to the time period to which it is applicable. Moreover, if a defendant is not fully aware of the meaning and implications of a defense to a charge pending against him, it cannot be said that he knowingly rejects that defense by pleading guilty to the pending charge.
The principal case on which the State relies in support of its argument that the trial court did not abuse its discretion in refusing to allow Cosby to withdraw his guilty plea, People v. Hale (1980), 82 Ill.2d 172, 411 N.E.2d 867, is readily distinguishable, for in that case, unlike in the case at bar, the defendant presented no evidence of a defense worthy of consideration.
Because the evidence presented at the hearing on Cosby's *861 amended second motion to withdraw his guilty plea provides evidence that at the time he pleaded guilty defendant was under a misapprehension as to the existence of a defense worthy of consideration, and that upon such record there may be doubt as to defendant's guilt and because the ends of justice will be better served by a trial upon the charge which the plea was entered, we reverse the conviction.
The cause is remanded to the circuit court with directions that Cosby be permitted to withdraw his guilty plea and to plead anew.
In view of our decision, we need not consider defendant's remaining contentions.
Reversed and remanded with directions.
McCULLOUGH and MORTHLAND, JJ., concur.
