
113 Ariz. 413 (1976)
555 P.2d 659
STATE of Arizona, Appellee,
v.
Robert Ervin DOSKOCIL, Appellant.
No. 3381-PR.
Supreme Court of Arizona, En Banc.
September 20, 1976.
*414 Bruce E. Babbitt, Atty. Gen., Phoenix, by John S. O'Dowd, Asst. Atty. Gen., Tucson, for appellee.
Jerry DeRose, Globe, for appellant.
HAYS, Justice.
Robert Ervin Doskocil was found guilty by a jury of one count of unlawful possession of marijuana, A.R.S. § 36-1002.05, and one count of unlawful possession of dangerous drugs, A.R.S. § 32-1970. He was sentenced to serve concurrent terms of not less than two nor more than four years in the Arizona State Prison. The Court of Appeals, Division Two, in a per curiam memorandum decision, found no error as to the conduct of the trial but reversed because of a denial of a speedy trial. Rule 8.2(c), 17 A.R.S. We granted the petition for review for the sole purpose of considering the violation of Rule 8.2(c).
The facts necessary for a determination of this matter are as follows: On July 12, 1974, Doskocil was stopped and arrested while driving from Safford to Phoenix by Globe police officers. He was arraigned on August 13, 1974. Doskocil entered into plea negotiations and signed a plea agreement on September 26, 1974, at which time he agreed to plead guilty to possession of marijuana, a misdemeanor, if the charge of possession of dangerous drugs would be dismissed. The county attorney did not sign this agreement until November 15, 1974, at which time it was filed with the court. On December 11, 1974, the court rejected the plea agreement because of Doskocil's significant prior criminal record. Trial of this matter was finally commenced on March 4, 1974, and from a verdict and judgment of guilt defendant appealed.
Doskocil's trial was commenced 203 days after his arraignment. Rule 8.2, in effect at that time, provided:
"c. Defendants Released from Custody.

"Every person released under Rule 7 shall be tried by the court having jurisdiction of the offense within 120 days *415 from the date of his initial appearance before a magistrate on the complaint, indictment or information, or within 90 days from the date of his arraignment before the trial court, whichever is the lesser."
And Rule 8.4(a) reads as follows:
"The following periods shall be excluded from the computation of the time limits set forth in Rules 8.2 and 8.3:
"a. Delays occasioned by or on behalf of the defendant, including, but not limited to, delays caused by an examination and hearing to determine competency, the defendant's absence or incompetence, or his inability to be arrested or taken into custody in Arizona."
The State argues that the entire period from September 26 until January 7, 1975, is excluded as a delay occasioned by the defendant under Rule 8.4(a). The State supports this position by pointing out that the plea bargain was contingent upon Doskocil not having a substantial criminal background. Defendant knew that the check of his history would reveal factors which would negate the possibility of successfully entering a plea agreement. Thus, the State reasons that this time period, September 26 to January 7, 99 days, should be excluded as a delay occasioned by the defendant under Rule 8.4(a).
It is our position, however, that Rule 8.4(a) does not come into play when a plea agreement has been filed and a guilty plea entered. Such an agreement presupposes a disposition of the case in the same context as a trial in which it is assumed that after hearing all of the evidence the judge will decide the case in the exact way the parties have agreed. If, after having heard all of the evidence, the judge cannot so decide the case, in fairness to the parties the judge should declare a mistrial. The analogy between a rejected plea bargain and a mistrial is so compelling to us that we feel that Rule 8.2(d) should apply. This rule requires that the new trial ordered after a mistrial shall commence within 60 days of the entry of the order declaring the mistrial, in this instance, 60 days from December 19, 1974, when the court rejected the plea agreement.
A continuance from January 7, 1975 to February 4, 1975 was properly granted under Rule 8.5, Arizona Rules of Criminal Procedure; hence, 28 days are excluded. The trial commenced on March 4, 1975 which, after excluding the days indicated, fell well within the period set by the rules.
The trial court was correct in denying defendant's motion to dismiss.
Affirmed.
CAMERON, C.J., STRUCKMEYER, V.C.J., and HOLOHAN and GORDON, JJ., concur.
