
109 Ariz. 159 (1973)
506 P.2d 1053
The STATE of Arizona, Appellee,
v.
James DEFOY, Appellant.
No. 2386.
Supreme Court of Arizona, In Banc.
March 1, 1973.
Rehearing Denied April 3, 1973.
*160 Gary K. Nelson, Atty. Gen. by Peter M. Van Orman, Asst. Atty. Gen., Phoenix, for appellee.
Cornelius J. O'Driscoll, Phoenix, for appellant.
CAMERON, Vice Chief Justice.
This is an appeal from a judgment entered on defendant's pleas of guilty to two counts of first degree burglary, § 13-302, subsec. B, A.R.S., and a sentence of thirteen to fifteen years on each count to run consecutively.
We are asked to answer the following questions on appeal:
1. Did the pleas of guilty comply with Boykin v. Alabama, 395 U.S. 238, 89 S.Ct. 1709, 23 L.Ed.2d 274 (1969)?
2. Did defendant's guilty pleas foreclose inquiry into the matter of the alleged illegal search and seizure?
3. Did the trial court err in denying defendant's motion to withdraw his guilty pleas?
The facts necessary for a determination of this appeal are as follows. After a preliminary *161 hearing, the defendant was held to answer to the charges of burglary, § 13-302, subsec. B, A.R.S., and robbery, § 13-641 A.R.S.
Defendant filed a motion to suppress evidence upon the ground that evidence was obtained pursuant to an illegal search and seizure. This motion was argued and denied on 20 April 1971. On 21 April 1971, the day set for trial, defendant withdrew his previously entered pleas of not guilty and entered guilty pleas to two counts of burglary and pursuant to a plea bargain the allegation of a prior conviction was dropped.
The court advised the defendant of rights he was entitled to under Boykin, supra, and further addressed the defendant concerning the factual basis for the plea:
"Q The information to which you are pleading in this cause number states that on December 2nd of 1970 you committed a burglary, at night, against the residence of a John Furcini, the address is 3834 North 58th Drive, in Phoenix, Arizona.
"A Yes, your Honor.
"Q Is that true?
"A Yes, your Honor.
* * * * * *
"Q All right. Now, did you have permission to enter his home on December 2, 1970?
"A No.
"Q Was he home, or was anyone in the house?
"A Yes, your Honor.
"Q When you entered the house, did you know anyone was in the house?
"A Yes, your Honor.
"Q For what purpose did you enter the house?
"A Robbery.
"Q Is there any reason, Mr. Defoy, that you are proposing to enter a plea to this amended information, other than the fact that you feel you are guilty?
"A No, your Honor, there is no other reason."
As to the second count, the court again advised the defendant of his Boykin rights and asked:
"Q All right. This amended information states that on December 1st of 1970, you burglarized a motor vehicle located at 2435 East Indian School Road in Phoenix.
That must be very close to the Giovanni's restaurant at which you worked?
"A Yes, Your Honor, it was at the parking lot.
"Q And, did you in fact do this?
"A Well, I was in the car, but I didn't burglarize a person. I was in the car. I was an accessory, I guess, same charge.
"Q You did not enter the car, is that correct 
"A No.
"Q  yourself?
"A No, Your Honor.
"Q Were you present with people who did enter the car?
"A Yes, Your Honor.
"Q And, did you know that those people were going to enter the car?
"A Yes, Your Honor.
"Q Did you see them enter the car?
"A Yes, Your Honor.
"Q Did you direct them in any fashion about which car or how to enter it?
"A Yes, Your Honor.
"Q All right. Again, as in the other occasion, if the Court should accept your plea of guilty to this charge, the matter of sentencing rests squarely on this Court.
What is the maximum sentence, counsel, that the law provides?
"MR. McDONALD: One to 15 years on this, and it could run consecutively with the other charge. That would take it up to 30 years.

*162 "THE COURT: Is that correct?
"MR. O'DRISCOLL: That's correct.
"Q BY THE COURT: In this charge, the maximum sentence is 15 years. That's the most the Court can impose. However, in imposing sentence, the sentence could run at the end of the sentence imposed on the previous charge we have talked about.
"A (By Mr. Defoy) Yes, Your Honor.
"Q So, it is possible that we can, if we put these two charges together, that you would serve 30 years in the Arizona State Prison. Do you understand that?
"A Yes, Your Honor, I understand that."
And:
"Q Now, there is one other thing that I do wish to talk to you about. This amended information carries a stipulation which you have signed. In the event that you would wish to withdraw your plea of guilty before you are sentenced, the original informations would be reinstated and you would go to trial on the original causes, not the amended one, do you understand that?
"A Yes, your Honor, I understand.
"Q Now, do you have any questions?
"A No, your Honor."
The record shows that on the date of the trial, the State had some 20 witnesses present and available to testify including two key witnesses who were not citizens of the United States, but who nevertheless had come from California at their own expense to testify. The pleas of guilty were accepted by the court.
On 20 May, after investigation by the probation officer but before sentencing, the defendant moved to withdraw his pleas. The defendant, with counsel present, testified as follows:
"THE COURT: Mr. Defoy, would you, for the record state the reasons for which you wish to withdraw your plea of guilty?
"MR. DEFOY: First, I am not guilty, and, second, I understand that the Court is going to clobber me with 30 years when I did plead guilty."
The motion was denied.
WERE THE BOYKIN REQUIREMENTS MET?
We have read the reporter's transcript of the pleas of guilty and we find that the requirements of Boykin v. Alabama, supra, have been met and that there is a factual basis for the plea. State v. Darling, 109 Ariz. 148, 506 P.2d 1042, filed this day.
MOTION TO SUPPRESS
The law in Arizona has long been that a plea of guilty constitutes a waiver of all nonjurisdictional defenses. State v. Murphy, 97 Ariz. 14, 396 P.2d 250 (1964). Defendant contends, however, that the plea was involuntary in that the denial of the motion to suppress forced the defendant to plead guilty which he would not have done had the motion been granted. We do not agree. The fact that the defendant feels it is necessary to bargain and plead guilty does not make the plea involuntary. Benn v. Eyman, 9 Cir., 436 F.2d 1074 (1971); United States v. Davis, 9 Cir., 452 F.2d 577 (1971).
Having lost the motion, defendant could go to trial and preserve the question of the denial of the motion for appeal or plead guilty and waive the right to contest the denial of the motion. This is what he did here and we will not go back of that plea.
MOTION TO WITHDRAW PLEA
The defendant moved to withdraw his plea of guilty before the sentencing and the motion was properly before the court. See State v. Hanley, 108 Ariz. 144, 493 P.2d 1201 (1972).
However, once a plea has been properly entered and accepted by the trial *163 court, it is a matter of discretion whether the trial court may grant the motion of the defendant to set aside the plea.
In the instant case, defendant contended that (1) he was not guilty and (2) that he did not know he could receive consecutive sentences. The record including the reporter's transcript of the preliminary hearing amply supports the factual basis for the plea and the court was careful to let the defendant know the possible range of the sentencing.
We find no abuse of discretion in the denial of the motion to withdraw the plea.
Judgment affirmed.
HAYS, C.J., and STRUCKMEYER, LOCKWOOD and HOLOHAN, JJ., concur.
