
601 N.W.2d 84 (1999)
In the Interest of H.G., Minor Child.
H.G., Minor Child, Appellant.
No. 98-1793.
Supreme Court of Iowa.
October 13, 1999.
Nancy L. Burk, Toledo, for appellant.
Thomas J. Miller, Attorney General, Janet L. Hoffman, Assistant Attorney General, and Brent D. Heeren, Assistant County Attorney, for appellee-State.
Considered by CARTER, P.J., and LAVORATO, SNELL, CADY, and SCHULTZ,[*] JJ.
CADY, Justice.
A child who married during the pendency of a child in need of assistance proceeding appeals from a ruling by the juvenile court denying her application for termination and discharge. We affirm and remand for further proceedings.

I. Background Facts and Proceedings.
H.G. was adjudicated to be a child in need of assistance on December 23, 1996. She was fourteen years old. The adjudication was based on the failure of her mother to exercise a reasonable degree of supervision and provide needed treatment to alleviate *85 a serious mental disorder or emotional damage.[1] Following a dispositional hearing, the juvenile court found H.G. should remain in the custody of her mother with supervision to the Department of Human Services (DHS). H.G. was pregnant at the time of the dispositional hearing.
The initial permanency plan required the family to participate in numerous services. H.G. was also ordered to attend school and participate in prenatal and other services, as well as attend all prenatal doctor visits. H.G. gave birth on October 8, 1997.
The case was periodically reviewed by the court following the dispositional hearing. Based upon recommendations made by the DHS, supervision was continued.
In July of 1998, a DHS caseworker recommended a modification of the disposition. H.G. was sixteen years old, and pregnant with her second child. She had not been attending school regularly. The DHS felt H.G. was in need of more structure. It recommended H.G., and her child, be placed at a residential facility.
Following a hearing on the State's motion to modify the dispositional order, the juvenile court found a more restrictive placement was required. The court placed custody of H.G. with the DHS for placement at the House of Mercy in Des Moines. H.G., however, was allowed to remain with her mother until the placement was available.
The day before H.G. was to be transported to the residential facility, she married a twenty-three-year-old man. The application for an underaged marriage was approved by the mother and granted by a district court judge. The clerk of court issued the marriage license.
H.G. then filed an application with the juvenile court for discharge and release based upon her marriage and emancipation. Despite the marriage, the DHS continued to recommend residential placement. The juvenile court denied the application without granting a hearing. The court determined it continued to maintain jurisdiction over the case because H.G. had met the definition of a child in need of assistance at the time the proceeding was commenced.
H.G. appealed. The issue we face is whether the marriage of a child during the pendency of a child in need of assistance proceeding terminates the jurisdiction of the juvenile court.

II. Scope of Review.
We review child in need of assistance cases de novo. In re E.H. III, 578 N.W.2d 243, 248 (Iowa 1998). We review "both the facts and the law, and we adjudicate rights anew." In re A.M.H., 516 N.W.2d 867, 870 (Iowa 1994) (quoting In re T.A.L., 505 N.W.2d 480, 482 (Iowa 1993)). Our focus is upon protecting the best interests of the child. In re E.H. III, 578 N.W.2d at 248.

III. Discussion.
Our legislature has given "exclusive jurisdiction" over child in need of assistance proceedings to the juvenile court. Iowa Code § 232.61(1) (1997). A child in need of assistance is defined as an "unmarried child" who needs assistance from the state due to certain statutorily defined circumstances. Id. § 232.2(6). These circumstances generally involve deficiencies in parenting, and range from parental abandonment to numerous types of harm visited upon the child as a result of the acts or omissions of the parent. Id. § 232.2(6)(a)-(o).
A child in a child in need of assistance proceeding is defined as a person under eighteen years of age. Id. § 232.2(5). Thus, both age and marital status help *86 define the jurisdiction of the juvenile court in a child in need of assistance proceeding. In determining this jurisdiction, "the age and marital status of the child at the time the proceeding is initiated is controlling." Id. § 232.61(2).
In this case, the juvenile court properly acquired jurisdiction over H.G. She met the age and marital status requirements at the time the petition was filed. The question is whether her marriage during the pendency of the proceeding divested the juvenile court of its jurisdiction and required the court to discharge her from the custody and supervision of the DHS. H.G. claims the court was required to discharge her under the statutory emancipation she acquired through her marriage, and because she could no longer meet the definition of a child in need of assistance.
We recognize minors "attain their majority by marriage." Id. § 599.1. Yet, this generally means children become emancipated from parental authority. See City of Des Moines v. Reisman, 248 Iowa 821, 823, 83 N.W.2d 197, 198 (1957); see also Vaupel v. Bellach, 261 Iowa 376, 379, 154 N.W.2d 149, 150 (1967) (emancipation means the freeing of the child from the custody of the parent and from the obligation to render services to a parent). Thus, marriage may release a child from parental authority, but it does not change the status of a child from a minor to an adult without some statute expressly providing for the change. Reisman, 248 Iowa at 823, 83 N.W.2d at 198-99. The statute governing child in need of assistance proceedings is silent about the impact of marriage after jurisdiction has been obtained.
There is no question H.G. no longer meets the definition of a child in need of assistance. Iowa Code § 232.2(6). She is now married and only an "unmarried child" falls within the definition of a child in need of assistance. The juvenile court could not acquire jurisdiction of H.G. because of her marital status. However, there is an important distinction between acquiring jurisdiction and retaining jurisdiction.
Generally, once a court obtains jurisdiction over a person and the subject matter of a case, it retains jurisdiction until a final disposition has been made. Jensen v. Jensen, 260 Iowa 371, 377, 147 N.W.2d 612, 616 (1967). Subject matter jurisdiction cannot be ousted by the parties or by any procedures employed by the parties during the course of the proceeding. State ex rel. Iowa State Highway Comm'n v. Read, 228 N.W.2d 199, 202 (Iowa 1975). This is true even if the subsequent procedure would have prevented jurisdiction from attaching at the commencement of the action. 20 Am.Jur.2d Courts § 111, at 412-13 (1995).
Although the legislature specifically conferred child in need of assistance jurisdiction on the juvenile court by using the age and marital status of a child at the time the proceeding is initiated, it did not utilize either factor as grounds to subsequently terminate the proceeding and discharge the child. Instead, termination of a child in need of assistance proceeding prior to expiration hinges upon a finding by the juvenile court that "the purposes of the order have been accomplished and the child is no longer in need of supervision, care, or treatment." Iowa Code § 232.103(4). We believe the legislature did this for a purpose.
If marriage terminated the jurisdiction of the juvenile court, the court could be prevented from satisfying the important goals of a child in need of assistance proceeding. Not only would this be contrary to the general principles of jurisdiction applicable to courts, but could frustrate the purposes of the juvenile court. Thus, the need to achieve the goals of the juvenile process must be paramount to any rights acquired by the child through marriage. 47 Am.Jur.2d Juvenile Courts § 119, at 1065 (1995).
*87 Our conclusion that marriage of a child during the pendency of the case does not alter the jurisdiction of the juvenile court is consistent with other courts who have considered the issue. In the case of In re Hook, the Supreme Court of Vermont held that the marriage of a thirteen-year-old girl after her committal by the juvenile court to the custody of the state board as a neglected and dependent child did not release her from the jurisdiction of the juvenile court. In re Hook, 95 Vt. 497, 115 A. 730, 733 (1922). That court reasoned,
Chapter 319 ..., being passed for the protection of a class of minors unable adequately to protect itself, ... is not penal, but protective. It does not seek to punish the child or its parents for misdeeds or shortcomings. It steps in merely to save the child from the evil tendencies of its situation, and to give it more efficient care and training, to the end that it may become more worthy and useful member of society. It is to be liberally construed. The welfare of the child lies at the very foundation of the statutory scheme, and, from the moment that the court determines that a child comes within the classes specified therein, he becomes a ward of that court, and so continues until he attains his majority, unless sooner "discharged"....
....
... The petitioner insists that this guardianship of the state was and could be of no higher character than ... one arising from the parental relation, ... which would be discharged by the marriage....
....
... [W]e think that when the state once assumes control of such a child as the statute describes its authority is and continues to be superior to any other, no matter what the latter may be.... The welfare and best interests of the child become the paramount and controlling consideration, and, before the state can be compelled to relinquish its control, it must be made to appear in some legal way that these considerations require it.
....
... [T]he jurisdiction of the Hartford juvenile court was not affected by this child's marriage, and that thereafter that court could lawfully take such action with reference to her discipline and control as the circumstances warranted.
Id. at 731-33 (citations omitted). Similarly, in State ex rel. Johnson v. Wiecking, the Supreme Court of Minnesota held,
[I]t is as essential for the protection and welfare of both the child and the public that marriage should not exclude the child from the benevolent operation of the law. Of course, there may be cases where a dependent, neglected, or delinquent girl under eighteen years of age by marriage removes every ground for charging her with being either dependent, neglected, or delinquent. And if the juvenile court should find that such is the case here, there will be no detention of [the juvenile who alleges marriage released her from the juvenile court's jurisdiction].
State ex rel. Johnson v. Wiecking, 200 Minn. 490, 274 N.W. 585, 585 (1937). We have previously adopted the quoted reasoning of the Wiecking court in State v. Garman, 250 Iowa 166, 168-69, 93 N.W.2d 105, 106 (1958).[2]
By retaining jurisdiction, we recognize the juvenile court will be in a position to properly assess the impact of the marriage and the extent it may eliminate the need for the State to provide continued assistance. McPherson v. Day, 162 Iowa 251, 253, 144 N.W. 4, 5 (1913). Thus, the juvenile court can consider all the circumstances and structure a disposition that will serve the best interests of the child. *88 This approach is compatible with the goals of juvenile proceedings, as well as the legislative scheme which establishes those proceedings. Our laws look with favor upon marriage. Board of Dirs. of Indep. Sch. Dist. v. Green, 259 Iowa 1260, 1269, 147 N.W.2d 854, 859 (1967). Yet, the best interests of the child are paramount.
We conclude that marriage by a child during the pendency of a child in need of assistance proceeding does not divest the juvenile court of its jurisdiction. Nevertheless, the marriage may be a factor which could support a finding by the juvenile court that "the purposes of the order have been accomplished and the child is no longer in need of supervision, care, or treatment." Iowa Code § 232.103(4). Therefore, we remand the case to the juvenile court for a hearing on the application for discharge.
AFFIRMED AND REMANDED FOR FURTHER PROCEEDINGS.
NOTES
[*]  Senior judge assigned by order pursuant to Iowa Code section 602.9206 (1999).
[1]  H.G. was adjudicated in need of assistance under Iowa Code sections 232.2(6)(c)(2) and 232.2(6)(f) (1995).
[2]  For additional references supporting the rule that marriage of a minor does not affect the juvenile court's jurisdiction, see W.R. Habeeb, Annotation, Marriage as Affecting Jurisdiction of Juvenile Court over Delinquent or Dependent, 14 A.L.R.2d 336 (1950).
