
102 Wn.2d 265 (1984)
684 P.2d 712
In the Matter of the Personal Restraint of TERRY PATRICK BARR, Petitioner.
No. 49804-1.
The Supreme Court of Washington, En Banc.
July 26, 1984.
Mitchell A. Riese and Patricia J. Arthur of Institutional Legal Services, for petitioner.
Donald C. Brockett, Prosecuting Attorney, and Ronald W. Skibbie and Daniel W. Short, Deputies, for respondent.
DIMMICK, J.
In this personal restraint petition, petitioner challenges the guilty plea resulting in the conviction under which he is presently serving sentence. He claims an invalid plea on two grounds: the trial court failed to establish a factual basis for the plea; the plea was not "knowing and voluntary" because he was not informed of a critical element of the charge. We reject his contentions and dismiss the petition.
Petitioner was charged on May 1, 1981, with one count of second degree statutory rape and one count of third degree statutory rape. On June 30, 1981, petitioner was charged with, and pleaded guilty to, one count of indecent liberties.[1] The June information recited as follows:
That the defendant, Terry Patrick Barr, in Spokane County, Washington, on or about between November 21, 1980, and February 2, 1981, by forcible compulsion, did knowingly cause [the victim], not the spouse of the *267 defendant, to have sexual contact with the defendant or another.
This second information was filed pursuant to a plea bargain arrangement in which the prosecutor agreed not to charge any other offenses based on currently possessed information in exchange for the guilty plea.
The record reflects that petitioner requested the agreement so that he could be committed for treatment under the sexual psychopath program. The petition and commitment order for the program were also before the trial court at the plea hearing. Under questioning by the court, petitioner indicated that his sexual problems began in prison, where he had previously been incarcerated for four separate offenses. Petitioner stated that he felt it was time to "get to work" on straightening out his life, and that he believed the sexual psychopath program would help him a great deal.
When the prosecutor filed the second information, he apparently understood that all sexual contact with the victim had occurred after the date alleged in the information, November 21. Under the mistaken assumption that the victim had turned 15 on November 19, the plea bargain arrangement was made to charge the "lesser" offense of indecent liberties by forcible compulsion since it appeared that the age requirement of the statute could not be met.
The discussion at the plea taking hearing disclosed a further erroneous assumption. The parties believed that the indecent liberties statute required the victim to be 14 or less, when the statute actually reads less than 14. When petitioner was asked to explain what he did to warrant the indecent liberties charge, he indicated that sexual contact with the victim "occurred prior to the November 21, 1980, date, and when [the victim] was 14." This statement was apparently made in an effort to admit a basis for guilt under the statute's age requirement. Petitioner's counsel also explained that although the information alleged forcible compulsion rather than the underage of the victim, "[petitioner] understands that and knowing that and knowing all the facts of this case wishes to continue with *268 his plea of guilty ..."
The court then reviewed the material allegations in the information, and petitioner acknowledged that he understood the charge. Petitioner's constitutional rights were each thoroughly discussed.
Following the proffer of the guilty plea, the prosecutor presented the factual allegations underlying the charges and the sexual psychopath petition. Petitioner was originally arrested for statutory rape charges involving several juveniles who were runaways. His home was known as a place where runaways could stay without being turned in to authorities. Petitioner had been involved in sexual activities, including oral and anal intercourse, with several juveniles. He had taken and attempted to sell pornographic photographs of these juveniles. The sexual contact complained of in the second information involved yet another juvenile and occurred while the victim stayed at petitioner's home, presumably from November 21, 1980, until February 2, 1981, and involved mutual masturbation.
Upon questioning, petitioner acknowledged receiving copies of the police reports filed in regard to the statutory rape charges. He conceded that the statutory rape charges could have been brought, admitting that the sexual conduct involved juveniles, and that he probably would have been convicted of those charges. He indicated that he joined in the sexual psychopath petition to obtain treatment. The court also probed the facts underlying the indecent liberties charge. Petitioner again admitted that the conduct involved an underage victim.
The court accepted the guilty plea to the indecent liberties charge after determining that it was voluntary, and based on a sufficient factual basis. The court determined that it was a "plea of convenience" because petitioner understood that he probably would have been convicted of the statutory rape charges if tried.
Following acceptance of the plea, the court imposed a 10-year suspended sentence with 5 years' probation on the condition that he undergo treatment as a sexual psychopath. *269 At the end of the 90-day observation period, petitioner was rejected from the program and returned to the county jail. His suspended sentence was revoked and he was sentenced to a maximum 10 years in prison.
[1] Petitioner argues that his plea was invalid because the trial court accepted the plea without obtaining a factual basis for the indecent liberties charge as required by CrR 4.2(d). He raises this claim not on appeal, but for the first time in this collateral proceeding. If petitioner's claim merely asserts a violation of the rules of criminal procedure, failure to bring an appeal forecloses relief in a personal restraint petition. In re Keene, 95 Wn.2d 203, 622 P.2d 360 (1980). Therefore, whether the trial court complied with CrR 4.2(d) is not properly before us in this petition.
If, however, the alleged violation raises a constitutional error, petitioner may challenge the plea in a collateral proceeding.[2] To obtain collateral relief, petitioner must show actual prejudice resulting from the error. In re Hews, 99 Wn.2d 80, 660 P.2d 263 (1983).
Petitioner's claim of constitutional error rests on the failure to inform him that, in the absence of forcible compulsion, the indecent liberties statute requires the victim to be less than 14. He correctly asserts that a constitutionally valid guilty plea must be knowing, intelligent and voluntary, with the accused being apprised of the nature of the charges against him. Henderson v. Morgan, 426 U.S. 637, 49 L.Ed.2d 108, 96 S.Ct. 2253 (1976); In re Hews, supra. Petitioner therefore argues that he has met his burden of showing actual prejudice, because without knowing the statutory elements, he could not have made a voluntary and intelligent plea.
[2] A plea does not become invalid because an accused *270 chooses to plead to a related lesser charge that was not committed in order to avoid certain conviction for a greater offense. See, e.g., People v. Martin, 58 Ill. App.3d 633, 374 N.E.2d 1012 (1978); People v. Johnson, 25 Mich. App. 258, 181 N.W.2d 425 (1970); People v. Clairborne, 39 A.D.2d 587, 331 N.Y.S.2d 780 (1972). See generally J. Bond, Plea Bargaining and Guilty Pleas § 3.55(a), (b) (1982). The choice to plead to such lesser charges is voluntary if it is based on an informed review of all the alternatives before the accused. See North Carolina v. Alford, 400 U.S. 25, 31, 27 L.Ed.2d 162, 91 S.Ct. 160 (1970). What must be shown is that the accused understands the nature and consequences of the plea bargain and has determined the course of action that he believes is in his best interest. See Williams v. State, 316 So.2d 267 (Fla. 1975); see also State v. Majors, 94 Wn.2d 354, 616 P.2d 1237 (1980).
For the trial court to make the proper evaluation, the plea bargain must be fully disclosed. The trial court must find a factual basis to support the original charge, and determine that defendant understands the relationship of his conduct to that charge. Defendant must be aware that the evidence available to the State on the original offense is sufficient to convince a jury of his guilt.
These criteria are satisfied here. The record convinces us that petitioner chose to plead guilty to the second, substituted information charging only one count of indecent liberties to obtain dismissal of the information charging two counts of statutory rape. He thus was able to avoid punishment for two crimes and obtain sentencing that involved treatment for sexual psychopathy. He was fully aware that the State's information alleging indecent liberties was potentially defective. The plea bargain, with its factually suspect information, was completely disclosed to the trial court. Petitioner's reasons for desiring the plea arrangement were discussed at length.
We also find that petitioner understood that the evidence was sufficient to support conviction for the two statutory rape charges. He joined in the sexual psychopath petition *271 alleging statutory rape. He acknowledged that the sexual acts occurred with youths he knew to be juveniles and that he would probably be convicted of the charges.
In summary, we hold that when, as here, the record establishes a factual basis for the two crimes originally charged and reveals defendant's understanding of his complicity in those crimes, the failure to state a basis for all the elements of the offense substituted for the first two charges after plea bargaining will not preclude a finding that the plea to the substituted charge is voluntary and intelligent. In this case, the record amply supports the conclusion that petitioner's plea was voluntary, and rationally based on the alternatives before him. As there was no error, petitioner's personal restraint petition is dismissed.
WILLIAMS, C.J., ROSELLINI, UTTER, BRACHTENBACH, DOLLIVER, DORE, and PEARSON, JJ., and CUNNINGHAM, J. Pro Tem., concur.
NOTES
[1]  RCW 9A.44.100 defines indecent liberties (in relevant part) as knowingly causing another person who is not the actor's spouse to have sexual contact with the actor or another (a) by forcible compulsion; or (b) when the other person is less than 14 years of age.
[2]  We acknowledge that the rule of CrR 4.2(d), which requires the trial court to ascertain the factual basis for the plea, is intended to ensure that the constitutional "voluntary-intelligent" standard is met. See In re Keene, 95 Wn.2d 203, 206, 622 P.2d 360 (1980). A violation of the procedural rule does not necessarily establish, however, that a particular plea was constitutionally infirm. See generally J. Bond, Plea Bargaining and Guilty Pleas § 3.54 (1982).
