
49 P.3d 306 (2002)
203 Ariz. 34
In re the Matter of Lisa June THOMAS, now known as Lisa June Nielson, Petitioner-Appellee,
v.
Jayme D. THOMAS, Respondent-Appellant.
No. 1 CA-CV 01-0086.
Court of Appeals of Arizona, Division 1, Department D.
June 27, 2002.
*307 Law Office of Bette O. Adelman, P.C. by Bette O. Adelman and Ellis & Baker, P.C. by Teresa H. Foster, Phoenix, Attorneys for Petitioner-Appellee.
Nancy A. Stewart, P.C. by Nancy A. Stewart, Phoenix, Attorney for Respondent-Appellant.

OPINION
NOYES, Judge.
¶ 1 The trial court awarded Jayme D. Thomas and her former domestic partner, Lisa June Nielson, joint custody of Thomas's daughter. We conclude that the court had jurisdiction to decide the custody issue but abused its discretion in awarding joint custody because the applicable statute, Arizona Revised Statutes ("A.R.S.") section 25-415 (2000), requires findings that make it impossible for the court to properly award custody to both a legal parent (Thomas) and a non-legal parent (Nielson).

I.
¶ 2 When Thomas and Nielson lived together in a committed relationship, Thomas adopted her own sister's newborn daughter. Thomas and Nielson have raised the child since birth. It is undisputed that Nielson is "in loco parentis" to the child, has been acting as a parent, and is regarded as such by the child.
¶ 3 When the child was one year old, Nielson and Thomas ended their relationship and stipulated to joint custody of the child. In February 1988, the trial court, pursuant to said stipulation, entered an order (the "First Order") awarding joint custody to the parties, with Thomas as primary residential parent.
¶ 4 In September 1999, Thomas was hospitalized for mental health and drug abuse issuesfor the seventh time since 1997. Nielson promptly filed a petition for temporary and permanent custody. Thomas opposed the petition. In October 1999, the court issued an order (the "Second Order") awarding temporary custody to Nielson and supervised visitation to Thomas.
¶ 5 Thomas filed a motion to dismiss the petition and vacate the First and Second Orders on grounds that they were void pursuant to Rule 60(c)(4), Arizona Rules of Civil Procedure, for lack of subject matter jurisdiction. The motions were denied. Thomas filed a petition for special action. Jurisdiction was declined.
¶ 6 Following entry of the Second Order, Thomas began a sustained personal recovery marked by clean test results and participation in counseling. After a hearing in December 2000, the court issued an order (the "Third Order"), directing the parties to resume joint custodyand designating Nielson as the final decision maker on medical, educational, and religious issues in the event of a dispute. The court also awarded attorneys' fees and costs to Nielson. Thomas appeals. We have appellate jurisdiction pursuant to A.R.S. § 12-2101(B) (1994).

II.
¶ 7 We review de novo the trial court's legal determination that subject matter *308 jurisdiction exists. Hughes v. Creighton, 165 Ariz. 265, 267, 798 P.2d 403, 405 (App.1990). Likewise, we review de novo the trial court's interpretation and application of statutes. Wells Fargo Credit Corp. v. Tolliver, 183 Ariz. 343, 345, 903 P.2d 1101, 1103 (App.1995).
¶ 8 Thomas contends that the trial court lacked subject matter jurisdiction for both the First Order and the modifications reflected in the Second and Third Orders. Because the Third Order superseded the others and resulted in this appeal, we focus on it.

A.
¶ 9 Nielson contends that Thomas, having once stipulated to jurisdiction, is now estopped from contesting jurisdiction. We conclude that estoppel does not apply here, for "parties may not create or destroy jurisdiction by agreement or by consent." 5A Charles Alan Wright & Arthur R. Miller, Federal Practice and Procedure § 1350, at 204 (2d ed.1990); see Acheson v. Acheson, 107 Ariz. 235, 239, 485 P.2d 560, 564 (1971) (holding that a divorce decree based on stipulated jurisdictional facts that did not exist was void). Accordingly, we must look beyond the parties' stipulations to determine whether the trial court had jurisdiction.
¶ 10 Nielson argues that the trial court had jurisdiction pursuant to A.R.S. §§ 25-403 (Supp.2001)[1] and 25-415.[2] Section 25-403 plainly does not apply. As relevant here, that statute pertains to custody and visitation disputes between biological or adoptive parents. Higgins v. Higgins, 194 Ariz. 266, 270, ¶ 15, 981 P.2d 134, 138 (App.1999). Thomas is such a parent but Nielson is not.

B.
¶ 11 Section 25-415 confers jurisdiction on the trial court to decide a child custody proceeding initiated by a non-legal parent if (a) one of the legal parents is deceased, (b) the child's legal parents are not married to each other at the time the petition is filed, or (c) there is a pending proceeding for dissolution of marriage or for legal separation of the legal parents at the time the petition is filed. A.R.S. § 25-415(A)(4). The statute defines "legal parent" as "a biological or adoptive parent whose parental rights have not been terminated." A.R.S. § 25-415(G)(2). As used in this Opinion, therefore, the phrase "non-legal parent" refers to all parents who do not fit the definition of "legal parent."
¶ 12 The trial court found jurisdiction in A.R.S. § 25-415(A)(4)(b) because "[t]he *309 child's legal parents were not married to one another at the time the petition was filed." Thomas argues that this conclusion is "nonsensical"; that subsection (A)(4)(b) does not apply because Thomas is the child's only legal parent, she is not married to another legal parent, and she "could not be married to a nonexistent person."
¶ 13 We agree with the trial court that subsection (A)(4)(b) applies. That the child has always had only one legal parent obviously means that she did not have two legal parents who were married to each other when the petition was filed. To interpret the statute as Thomas argues that it should be interpreted would mean that non-legal parents could initiate custody proceedings under § 25-415(A)(4)(b) if the child has a single legal parent as the result of death, separation, or divorce, but could not do so if the child has a single legal parent as the result of adoption. We find no good reason to so arbitrarily remove adopted children from the protection of a statute that was drafted with the best interests of all similarly situated children in mind, and we therefore reject the interpretation argued by Thomas. See State v. Medrano-Barraza, 190 Ariz. 472, 474, 949 P.2d 561, 563 (App.1997) (stating that the court interprets statutes so as to avoid an absurd result).
¶ 14 We hold that § 25-415(A)(4)(b) conferred jurisdiction on the trial court to decide the custody and visitation issues that led to the Third Order. We now decide whether the court abused its discretion in awarding joint custody to a legal parent and a non-legal parent.

C.
¶ 15 Section 25-415 does not address the joint custody issue. We therefore interpret the statute in the context of related provisions and the overall statutory scheme, with the goal of achieving consistency among related provisions. See Prudential v. Estate of Rojo-Pacheco, 192 Ariz. 139, 148, 962 P.2d 213, 222 (App.1997). The relevant provisions are A.R.S. § 25-415(A)(2) and (B).
¶ 16 Subsection (A)(2) requires that a petition by a non-legal parent be summarily dismissed unless the pleadings establish, among other things, that "[i]t would be significantly detrimental to the child to remain or be placed in the custody of either of the child's living legal parents who wish to retain or obtain custody." Subsection (B) creates "a rebuttable presumption that it is in the child's best interest to award custody to a legal parent." The statute also provides that the non-legal parent can rebut that presumption by showing "clear and convincing evidence that awarding custody to a legal parent is not in the child's best interests."
¶ 17 In directing the court to award custody to a legal parent unless the non-legal parent proves by clear and convincing evidence that it is not in the child's best interest to do so, the statute requires the court to make an either-or decision: Either it is in the child's best interest for a legal parent to have custody or it is not. The court cannot reasonably find that it is in the child's best interest for a legal parent to have custody and that it is also in the child's best interest for a non-legal parent to have custody. If the court finds that it is in the child's best interest to award custody to a non-legal parent, the court abuses its discretion in also awarding custody to a legal parent, for the court has necessarily found "by clear and convincing evidence that awarding custody to a legal parent is not in the child's best interests." Id.
¶ 18 Interpreting a statute is often easier than applying it. We recognize that the trial court made a great effort to decide this case in accordance with the best interests of the child, and we also believe that such an effort need not be frustrated by a statute that requires the court to award custody to only one of the parties. The court can award reasonable visitation rights to the other party, and the court has considerable discretion in shaping the contours of its custody and visitation orders.

III.
¶ 19 The Third Order is vacated (the First and Second Orders are not reinstated), and the matter is remanded for further proceedings consistent with this Opinion. Nielson's *310 request for attorneys' fees and costs on appeal is denied.
CONCURRING: PHILIP HALL, Presiding Judge, and WILLIAM F. GARBARINO, Judge.
NOTES
[1]  Section 25-403 provides in pertinent part:

A. The court shall determine custody, either originally or on petition for modification, in accordance with the best interests of the child.
[2]  Section 25-415 provides in relevant part:

A. A child custody proceeding may also be commenced in the superior court by a person other than a legal parent by filing a verified petition, or by a petition supported by an affidavit, in the county in which the child is permanently resident or is found. The petition shall include detailed facts supporting the petitioner's right to file the petition. The petitioner shall provide notice as required by subsection e. Notice shall include a copy of the petition and any affidavits. The court shall summarily deny a petition unless it finds that the petitioner by the pleadings established that all of the following are true:
1. The person filing the petition stands in loco parentis to the child.
2. It would be significantly detrimental to the child to remain or be placed in the custody of either of the child's living legal parents who wish to retain or obtain custody.
3. A court of competent jurisdiction has not entered or approved an order concerning the child's custody within one year before the person filed a petition pursuant to this section, unless there is reason to believe the child's present environment may seriously endanger the child's physical, mental, moral or emotional health.
4. One of the following applies:
(a) One of the legal parents is deceased.
(b) The child's legal parents are not married to each other at the time the petition is filed.
(c) There is a pending proceeding for dissolution of marriage or for legal separation of the legal parents at the time the petition is filed.
B. If a person other than a child's legal parent is seeking custody there is a rebuttable presumption that it is in the child's best interest to award custody to a legal parent because of the physical, psychological and emotional needs of the child to be reared by the child's legal parent. To rebut this presumption that person must show by clear and convincing evidence that awarding custody to a legal parent is not in the child's best interests.
