OPINION
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: * * * Did your counsel, who speaks Spanish, Mr. Vigil, explain to you what this plea agreement was?
THE DEFENDANT: Yes.
THE COURT: And did you sign it yourself ?
THE DEFENDANT: Yes.
THE COURT: Do you feel like you understand it?
THE DEFENDANT: Yes.
THE COURT: And you know by signing it, Mr. Tisnado [sic], that you are in effect giving up your right to go to trial *485before a jury on all the original charges ?
THE DEFENDANT: That’s what the paper says.
THE COURT: Well, are you willing to give up your right to go to trial before a jury?
THE DEFENDANT: Yes.
THE COURT: Now if you went to trial before a jury the county attorney would have to prove beyond a reasonable doubt each one of the charges separately that you’re charged with. Do you understand that ?
THE DEFENDANT: Yes.
THE COURT: And then the jury after hearing it could find you guilty on 1, 2, or all 4 of these charges.
THE DEFENDANT: Yes.
THE COURT: Now you also have the right to give up your trial by jury as you have indicated you want to do. Do you understand that ?
THE DEFENDANT: Yes.
THE COURT: And is that what you intended to do, give up your right to trial by jury?
THE DEFENDANT: I don’t want a jury trial.
THE COURT: All right then, you have the right, if you can make a plea agreement, to in effect tell the county attorney which I assume your attorney has done here, I’ll plead guilty to two of these charges provided the other two are dismissed and that’s what your attorney has indicated is being done.
THE DEFENDANT: Yes.
THE COURT: Do you feel that you’re doing this freely and voluntarily ?
THE DEFENDANT-: Yes, because he’s being pushed.
THE COURT: Being pushed, who is pushing you ?
THE DEFENDANT: Oh, he is doing it on his own.
THE COURT: You’re not being pushed by anybody?
THE DEFENDANT: No, no.
THE COURT: You don’t feel like anybody talked you into this against your will then, right ?
THE DEFENDANT: No.
THE COURT: And nobody threatened you that if you didn’t plead guilty something would happen to you of you’d get a rougher deal or anything ?
THE DEFENDANT: No.”
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 rein*486stated. The cause is remanded to the superior court for further proceedings consistent with this opinion.
HATHAWAY and KRUCKER, JJ., concur.