HOWARD, Chief Judge.
Appellant was indicted on one count of assault with a deadly weapon, one count of armed robbery, one count of kidnapping for rape and one count of attempting to commit armed rape. Pursuant to a plea agreement, appellant entered a plea of guilty to armed robbery and attempt to commit rape. The other counts were dismissed. Appellant was sentenced to the Arizona State Prison on the armed robbery count for a term of not less than five nor more than eight years and on the attempted rape charge, to a term in the Arizona State Prison of not less than two and one-half nor more than eight years to run concurrently with the armed robbery sentence.
On appeal, appellant attacks the trial court's compliance with Rule 17.2 of the Arizona Rules of Criminal Procedure, 17 A.R.S., and further attacks his sentence.
In State v. Carr, 22 Ariz.App. 407, 527 P.2d 1250 (1974) petition for review dismissed, #3086-PR (Arizona Supreme Court filed March 6, 1975), we addressed ourselves to the necessity of the trial court personally informing the defendant of the constitutional rights which he foregoes by pleading guilty, such as his right not to plead guilty, and determining that defendant understands the same. We further indicated the failure to comply with Rule 17.2, Arizona Rules of Criminal Procedure would result not merely in a remand for the purpose of determining whether the defendant made the plea voluntarily and knowingly, but instead would mandate setting aside the guilty plea and sentence.
The proceedings before the trial court indicate that the following took place:
The court went on to explain the minimum and maximum sentences, but did not advise appellant of his right to present evidence on his own behalf through the compulsory attendance of witnesses, if necessary; his right to confront the witnesses against him and to cross-examine them as to the truthfulness of their testimony; his right to remain silent and to be presumed innocent until proven guilty; or the right not to plead guilty.
There are situations in which reference to the plea agreement can satisfy the requirements of the Rules of Criminal Procedure. For example, in State v. Salas, 532 P.2d 872 (Ariz. App. 1975) the judge in open court gave the plea agreement to the defendant and asked him to read the rights contained therein. The judge then asked the defendant whether he understood them and understood that if he pled guilty he was going to be giving up those rights. That, however, did not occur here.
This court cannot help but comment that there is something wrong with a system which allows the defense attorney to stand idly by and permit the trial court to fall into error in a situation such as this and then turn around and file an appeal. Defense counsel is an officer of the court and has a duty when the plea is being taken to see that the requirements of the Rules of Criminal Procedure are complied with. Furthermore, the prosecutor is also under an obligation to see that a good change of plea takes place.
The judgment of guilt and sentence is set aside; the plea of guilty is set aside; counts 1 and 3 of the indictment are reinstated.
HATHAWAY and KRUCKER, JJ., concur.