
171 Ariz. 444 (1992)
831 P.2d 443
STATE of Arizona, Appellee,
v.
Agripina Liza AGUILAR, Appellant.
No. 1 CA-CR 90-1275.
Court of Appeals of Arizona, Division 1, Department C.
May 12, 1992.
Grant Woods, Atty. Gen. by Paul J. McMurdie, Chief Counsel, Crim. Div., Daniel *445 J. Kiley, Asst. Atty. Gen., Phoenix, for appellee.
Dean W. Trebesch, Maricopa County Public Defender by James R. Rummage, Deputy Public Defender, Phoenix, for appellant.

OPINION
GRANT, Presiding Judge.
This appeal requires us to determine whether the trial court can properly enter a judgment of guilt when placing a defendant on probation pursuant to Ariz. Rev. Stat. Ann. ("A.R.S.") section 13-3601(G)[1] under the Domestic Violence Diversion Program. We hold that it cannot.
I. FACTS AND PROCEDURAL HISTORY
After firing several shots at the father of her unborn child, defendant was charged with aggravated assault, a class 3 felony. At her preliminary hearing, defendant entered into a plea agreement. Defendant agreed to waive the preliminary hearing and plead guilty to "Amended Count I: Endangerment, a class 6 felony, in violation of A.R.S. §§ 13-1201, 13-701, 13-702, 13-801, 13-812 and 13-3601 committed on March 12, 1990." (Emphasis added).
At her arraignment in superior court, defendant pled guilty to endangerment, a class 6 felony, and the plea agreement was accepted by the court. Because of its importance to the issue raised, portions of the change of plea proceeding are quoted at length.
THE COURT: Your agreement reflects you were originally charged with the much higher offense of aggravated assault, a Class 3 felony and it's now being amended and reduced to endangerment as a Class 6 felony. In Paragraph 3 it states there will be no other charges filed against you concerning anything else that was discussed in Departmental Report Number XX-XXXXXX. Do you have any questions about that?
MS. AGUILAR: No.
THE COURT: In Paragraph 2 it's been written in that you shall be placed on probation pursuant to the domestic relations statute, the domestic violence statute and it says the proceedings may be deferred, terms and conditions of probation shall include those necessary for the victim's protection and that you shall receive counseling and that you shall pay restitution to the victim in an amount not to exceed $150. Do you understand what is meant by restitution?
MS. AGUILAR: Yes.
THE COURT: If necessary the judge can hold a hearing to determine the precise amount that you would have to pay and you can have input or present evidence at that time, as well, if you want to challenge the figures. The defendant must successfully complete a probation program before the proceedings may be dismissed and then it says the gun must be forfeited.


Let's talk about the domestic violence statute, the one you're pleading guilty under. It means if you do successfully complete your sentence then no conviction is entered against you. If you do not successfully complete that sentence then clearly this felony conviction would be entered; do you understand?
MS. AGUILAR: Yes.
....
THE COURT: I take it, Mrs. Aguilar, you understand if you proceed now with this agreement it means you're turning down for all time that other choice, you're giving those rights up and the State is never going to have to prove your guilt because you will be admitting it and there won't be a trial; do you understand?
MS. AGUILAR: Yes.

*446 THE COURT: Would you rather contest this matter and have a trial instead of this agreement?
MS. AGUILAR: No.
THE COURT: For the record, how do you plead to endangerment, a Class 6 felony, non-dangerous, nonrepetitive in violation of A.R.S. 13-1203, the endangerment statute, the sentencing statutes, 13-701, 702, 801 and 812 and the domestic violence statute, 13-3601, do you plead guilty or not guilty?
MS. AGUILAR: Guilty.
(Emphasis added).
Later at sentencing, the trial court either understood the terms of the plea agreement differently than defendant or did not follow the terms of the plea agreement. The trial court entered a judgment of conviction for a class 6 felony. Like the change of plea colloquy, the dialogue at sentencing is important to the issue raised and is quoted at length.
THE COURT: Counsel, I'm really concerned. I mean, she fires four shots at this guy. Only because she's got a bad aim is she not looking at 25 calendar years in prison for murder.
MR. DRIGGS: Yes, Your Honor. I've informed Agripina when I got this case that the court would be very concerned over that.
....
THE COURT: I want you to tell me about this gun business. How come you think you can just fire a gun at someone because you're mad at them? Were you trying to kill him?
THE DEFENDANT: No.
....
THE COURT: No legal cause appearing, Miss Aguilar, I'll suspend imposition of sentence for three years in your case. I'm suspending the sentence, but that means I can drop it on you anytime. It just means I'm delaying the sentencing if you follows [sic] the rules of probation. If you don't follow the rules, then I'm going to sentence you in prison. Do you understand that?
THE DEFENDANT: Yes.
....
THE COURT: Because this is a felony, you cannot possess a weapon anyway, legally, any more.
I'm going to order you be incarcerated in Maricopa County Jail three months beginning one year from today, January 31 of 1991, not be released until October 30th of 1991. There is a possibility that if you obey the rules perfectly, that the jail term may be either moved or vacated, but if you don't do exactly what you're told by the probation officer here, then you're going to go to jail, and your mother  you better have made up with her by that time because you'll have two kids to take care of. You don't go shooting people because you're mad. Do you understand that?
THE DEFENDANT: Yes.
....
MR. DRIGGS: Your Honor, I don't know if it's reflected there, but in the  under the terms of the plea agreement, it's under that 36  Chapter 36 
THE COURT: The DOVE 
MR. DRIGGS:  of the Domestic Violence Statute, which would delay imposition if she successfully completes the probation, then she wouldn't have this on her record at all?
THE COURT: It's not in  let's see. Probation for 3601.
Okay. Under 3601, then what I have to do apparently  I'm not sure. It says probation under 3601, but I'm not inclined to suspend adjudication of guilt for someone who shot at somebody. So I'll grant her probation under 3601. I'm granting her probation, but I think the legislature doesn't know as much as I do in this case and I don't think that I can be required not to adjudicate her guilty of endangerment, because this is not just domestic violence; this is just plain attempted murder, which has been pled down very gently because of her emotional problems.
So, I'm leaving the judgment of guilty of endangerment on her record. She is dangerous and she's going to go to jail for it if she doesn't follow these rules perfectly.

*447 You can take me up on it if you want, but I think the legislature is wrong and I think to suspend imposition of an adjudication is wrong in this case. And I think that their attempt to require the judiciary to not to perform a judicial function when it has to is probably unconstitutional. So take me up if you want, but she's adjudicated guilty of a felony called endangerment. And she's darn lucky. You must have done some miracle work to get her this because she's lucky not to be looking at murder or assault with a deadly and mandatory prison and a whole bunch of other bad things that the domestic violation code has nothing to do with. So you've done a real good job on it.
So you have a chance to come out of this all right, Miss Aguilar, unless I'm reversed on appeal. If you live up to the terms of your probation and you are successfully terminated, then you can get it off your record, but I don't think something as serious [sic] shooting at somebody is mere domestic violence.
And the plea agreement, which is not clear on the point, just says probation per that section, so she's getting probation and I think I'm complying with the plea agreement. Thank's for bringing it up, however.
....
MR. DRIGGS: Thank you, Your Honor. I will ask to review that section, I'm not quite sure.
THE COURT: What, 3601?
MR. DRIGGS: Yes, as far as our appeals or 
THE COURT: It just says adjudication is suspended, but I think I can do everything else. But in this case I don't see it as a DOVE problem; just simple assault.
MR. DRIGGS: I don't know. I think in 3601(G) they talk about crimes such as this, but I'm not sure whether that  they're just trying to 
THE COURT: Well, I don't think the legislature can tell us everything. They think they can. And I think in this case for them to tell me that I can't adjudicate her guilty when she's fired four shots at somebody, is probably beyond the legislative power to tell the judiciary how to apply the law. I don't think they can repeal the judiciary power. In any case, they're going to have trouble with me on that one today.
(Emphasis added).
A timely notice of appeal was filed.
II. ISSUE PRESENTED FOR REVIEW
Did the trial court err when, after purporting to accept the plea agreement provisions, it refused to defer the entry of judgment of guilt pursuant to A.R.S. section 13-3601(G)?
III. DISCUSSION
Defendant argues that the trial court erred by entering the judgment of guilt. Defendant relies on the terms of the plea agreement and the fact that the trial court placed her on probation pursuant to A.R.S. section 13-3601(G). She requests this court to "set aside the judgment of guilt, without disturbing the probation which has been imposed, or to remand the matter to the trial court with directions to set aside the judgment of guilt, while leaving the probation intact." Defendant argues that because the trial court accepted the plea agreement and placed her on probation pursuant to subsection 3601(G), the trial court could not enter a judgment of guilt. A.R.S. section 13-3601(G) states:
If the defendant is found guilty of an offense included in domestic violence and if probation is otherwise available for such offense, the court may, without entering a judgment of guilt and with the concurrence of the prosecutor and consent of the defendant, defer further proceedings and place the defendant on probation as provided in this subsection. The terms and conditions of probation shall include those necessary to provide for the protection of the alleged victim and other specifically designated persons and additional conditions and requirements which the court deems appropriate, including imposition of a fine, incarceration of the defendant in a county jail, payment of restitution and any counseling *448 or diversionary programs available to the defendant. On violation of a term or condition of probation, the court may enter an adjudication of guilt and proceed as otherwise provided for revocation of probation. On fulfillment of the terms and conditions of probation, the court shall discharge the defendant and dismiss the proceedings against the defendant. This subsection does not apply in any case in which the defendant has previously been found guilty under this section, or in which charges under this section have previously been dismissed in accordance with this subsection.
The state concedes that under section 13-3601(G), a trial court cannot enter a judgment of guilt unless and until the offender violates probation and consequently fails to complete the Domestic Violence Diversion Program. However, the state argues that under the terms of the plea agreement, participation in the program was discretionary with the trial court. The state argues that the plea agreement stated that proceedings against the defendant "may" be deferred. If proceedings under 3601(G) were mandatory, argues the state, then the parties would have used the word "shall." Furthermore, the state contends, at the change of plea hearing, the trial court concluded by stating: "It [is] ordered setting this matter for possible entry of judgment of guilt and sentencing for July 31." The state argues that this is further evidence of the discretionary provision in the plea agreement.
This argument fails. Regardless of whether the Domestic Violence Diversion Program was mandatory or discretionary under the plea agreement stipulations, the trial court placed defendant on probation pursuant to A.R.S. section 13-3601(G). Having done so, the court had no authority to enter the judgment of guilt.
The domestic violence statutory scheme details specific procedures to be followed from arrest to completion of diversion and specifies which offenses come within the definition of domestic violence. The statute does not create a separate offense for which punishment can be imposed and it contemplates a "vertical prosecution" process. State v. Sirny, 160 Ariz. 292, 294, 772 P.2d 1145, 1147 (App. 1989). Thus, having agreed to allow defendant to participate in the Domestic Violence Diversion Program and having placed her on probation pursuant to subsection 3601(G), the trial court was obliged to defer the entry of judgment of guilt.
Having argued that the plea agreement, if accepted, did not stipulate that defendant would participate in the Domestic Violence Diversion Program, the state posits that the trial court exercised its discretion and actually placed defendant on probation pursuant to A.R.S. section 13-901, et seq. The state argues at length the proposition that a trial court will be affirmed on appeal if its order is proper, even if the trial court incorrectly understood the source of its authority for the challenged order.
The state then argues that because this portion of the plea agreement was discretionary and because the trial court placed defendant on probation pursuant to A.R.S. section 13-901, et seq., defendant now cannot attack the conviction or sentence. The state relies on cases which hold that a defendant cannot attack a conviction pursuant to a valid plea agreement merely because the court exercised discretion authorized by the plea agreement in a manner unfavorable to the defendant. See State v. Darling, 109 Ariz. 148, 506 P.2d 1042 (1973). In other words, the state is contending that because defendant got what she bargained for, she has no complaint on appeal. This argument, of course, stands only if the court agrees with the state's interpretation of the plea agreement and the state's position that the trial court actually placed defendant on probation pursuant to A.R.S. section 13-901, et seq., and not A.R.S. section 13-3601(G) as was articulated by the trial court.
As a general proposition, it is true that a trial court's order, if correct, will be affirmed on appeal even if based on incorrect reasons. It is also true that a defendant has no complaint on appeal when the trial court sentences in accordance with the plea agreement. However, a fair reading of the *449 plea agreement and the change of plea proceedings demonstrates that defendant's requested relief should be granted. See State v. Diaz, 109 Ariz.Adv.Rep. 29 (Ct. App. March 24, 1992).
As noted, the trial court did not believe that deferral of the entry of judgment of guilt was appropriate under the circumstances of this case, and therefore entered the judgment of guilt for a felony. However, instead of rejecting this provision of the plea agreement and permitting the defendant an opportunity to withdraw her plea pursuant to Rule 17.4(e), Arizona Rules of Criminal Procedure, the trial court placed her on probation pursuant to the Domestic Violence Diversion Program, A.R.S. section 13-3601, and entered the judgment of guilt.
Defendant argues that the trial court had no lawful authority to enter the judgment of guilt, having placed her on probation pursuant to the Domestic Violence Diversion Program.
In essence, the trial court rejected a provision of the plea agreement and did not provide defendant with an opportunity to withdraw her plea. See State v. Soto, 126 Ariz. 477, 480, 616 P.2d 937, 940 (App. 1980). Therefore, the conviction and sentence imposed are reversed and the matter remanded to the trial court for further proceedings consistent with this decision and Rule 17.4(e), Arizona Rules of Criminal Procedure.
EUBANK and KLEINSCHMIDT, JJ., concur.
NOTES
[1]  Subsequent to the proceedings in this case, A.R.S. § 13-3601 was amended. See 1991 Ariz. Sess. Laws ch. 225, § 3. As a result, subsection (G), the focus of this opinion, is now subsection (H). The 1991 amendment made no substantive changes to the subsection. All references to § 13-3601 in this opinion refer to the statute as it read at the time of the proceedings against this defendant.
