
367 N.W.2d 561 (1985)
In re the Marriage of Judith R. MURRAY, petitioner, Appellant,
v.
Frederick T. MURRAY, Respondent.
No. C7-84-1185.
Court of Appeals of Minnesota.
May 14, 1985.
*562 Morley Friedman, St. Paul, for appellant.
Peter M. Rosene, Faricy & Rosene, St. Paul, for respondent.
Heard, considered and decided by POPOVICH, C.J., and SEDGWICK and RANDALL, JJ.

OPINION
POPOVICH, Chief Judge.
Appellant appeals a portion of a judgment dissolving the parties' marriage. Appellant and respondent both claim the trial court's sua sponte award of legal custody of their two children to the Ramsey County Human Services Department (1) exceeded the court's authority, (2) deprived the parents of due process and equal protection, and (3) was not supported by the evidence. We reverse and remand.

FACTS
This appeal involves a troubled family that has been involved with social service agencies since 1982. The persons affected are Fred Murray, the father and respondent; Judith Murray, the mother and appellant; and Brandon and Brenda Murray, fourteen-year-old twin brother and sister and children of the parties to this appeal.
In February 1982, the Ramsey County Community Human Services Department (RCCHSD) became involved with the Murray family because respondent had taken his son, Brandon, out of school. Shortly afterwards, appellant and the children moved from the home to a shelter for battered women. A domestic abuse order was obtained, and the RCCHSD has been involved ever since.
Appellant and the children have participated in counseling on a regular basis since February 1982. Counseling efforts by the RCCHSD have generally excluded respondent.
On July 1, 1983, Brandon came home drunk from a fishing trip. Appellant took him to Mounds Park Hospital. Two weeks later, Brandon was moved to Abbott-Northwestern Hospital. He was treated for four months as an inpatient for chemical dependency and psychiatric problems. Brandon then went to the Wilder Foundation's Bush Annex for further treatment and was living there at the time of the dissolution. On April 6, 1984, a separate proceeding in Ramsey County Juvenile Court adjudicated Brandon dependent under Minn.Stat. § 260.015, subd. 6(b). The juvenile court awarded temporary legal custody of Brandon to the RCCHSD so that Brandon's treatment would be paid by Ramsey County.
Appellant was hospitalized for depression and suicidal tendencies in early July 1983 and from July 24 to August 11, 1983. She remains under the care of a psychiatrist.
At the dissolution hearing, both appellant and respondent sought legal and physical custody of their children. Appellant's psychologist testified appellant should have custody of the children. The social workers at the RCCHSD recommended custody of the children be given to appellant.
A custody evaluation prepared by the Ramsey County Department of Court Services recommended appellant receive physical custody of the children but that legal custody be given to RCCHSD. The preparer of this report stated her recommendation was made to ensure the court could remove the children from the home if necessary. Representatives from the RCCHSD disagreed with the proposal to have legal custody, and the RCCHSD was not a party to the dissolution proceeding.
In its judgment, the Ramsey County Family Court awarded custody as follows:
7. Custody and Visitation. Legal Custody of Brenda Joan Murray and Brandon Todd Murray is given to the Ramsey County Department of Human Services with physical custody given to Petitioner, subject to the award of interim temporary custody of Brandon Todd *563 Murray to the Ramsey County Human Services Department * * *.
The court's award was supported by detailed factual findings. The family court relied upon Minn.Stat. §§ 518.176, subd. 2, 518.17, subd. 3, 518.156, subd. 2 for its authority to award legal custody of the children to the RCCHSD.

ISSUES
1. Did the Ramsey County Family Court have the authority to award legal custody of the children to the Ramsey County Community Human Services Department?
2. Did the legal custody award deprive the parties of due process and equal protection under the law?
3. Does the evidence support the family court's award of legal custody to the RCCHSD?

ANALYSIS
1. The parties claim the trial court exceeded its authority by vesting legal custody of their children with RCCHSD. The family court relied upon various statutes as authority for granting legal custody to the RCCHSD and physical custody to appellant.
"Legal custody" and "physical custody" are defined by statute:
"Legal custody" means the right to determine the child's upbringing, including education, health care and religious training.
* * * * * *
"Physical custody and residence" means the routine daily care and control and the residence of the child.
Minn.Stat. § 518.003, subd. 3(a), (c) (1984).
The intent of the trial court was to ensure that the children could be quickly removed from appellant's home should it be necessary. The effect of the court's order is to vest crucial decisions regarding the children's upbringing with the welfare board and to subject the parents to the strict requirements for modification of custody contained in Minn.Stat. § 518.18 (1984).
2. The family court believed the authority for its actions was contained in Minn. Stat. §§ 518.156, subd. 2, 518.17, subd. 3, 518.176, subd. 2. Each of these statutes is analyzed below.
Minn.Stat. § 518.156 (1984) is entitled "Commencement of Custody Proceeding" and states:
Subdivision 1. In a court of this state which has jurisdiction to decide child custody matters, a child custody proceeding is commenced:
(a) By a parent
(1) By filing a petition for dissolution or legal separation; or
(2) Where a decree of dissolution or legal separation has been entered or where none is sought, by filing a petition or motion seeking custody of the child in the county where the child is permanently resident or where he is found or where an earlier order for custody of the child has been entered; or
(b) By a person other than a parent, by filing a petition or motion seeking custody of the child in the county where the child is permanently resident or where he is found or where an earlier order for custody of the child has been entered.
Subd. 2. Written notice of a child custody proceeding shall be given to the child's parent, guardian and custodian, who may appear and be heard and may file a responsive pleading. The court may, upon a showing of good cause, permit the intervention of other interested parties.

Id. (emphasis added).
The family court relied upon subdivision 2. Subdivision 2 permits a party to intervene in a child custody proceeding upon a showing of good cause. In this matter, the RCCHSD did not move to intervene, did not believe it was necessary that it have legal custody of the children, and did not want legal custody of the children. Section 518.156 does not give the family court authority to place legal custody of *564 the children with a third party who does not seek custody.
Minn.Stat. § 518.17, subd. 3 (1984) provides:
Custody order. Upon adjudging the nullity of a marriage, or a dissolution or separation, or a child custody proceeding, the court shall make such further order as it deems just and proper concerning: (a) the legal custody of the minor children of the parties which shall be sole or joint; (b) their physical custody and residence; and (c) their support. In determining custody, the court shall consider the best interests of the child and shall not prefer one parent over the other solely on the basis of the sex of the parent.
Id. (emphasis added).
Subdivision 3 does not appear to contemplate a granting of legal custody to someone other than the parent. The statute prescribes that legal custody shall be "sole or joint." Id.
"Joint legal custody" means that both parents have equal rights and responsibilities, including the right to participate in major decisions determining the child's upbringing, including education, health care and religious training.
Minn.Stat. § 518.003, subd. 3(b) (1984). "Sole legal custody" is not defined in chapter 518. Sole legal custody could refer to one parent or some other person. The tenor of the entire statute, however, implies that legal custody should be granted to a parent.
The cases addressing the family court's authority under section 518.17 generally arise from a custody dispute between a parent and a grandparent. In these cases, the courts have held grandparents "may not be preferred over the natural [parent] in the absence of grave reasons for doing so." Pikula v. Pikula, 349 N.W.2d 322, 325 (Minn.Ct.App.1984); see Wallin v. Wallin, 290 Minn. 261, 187 N.W.2d 627 (1971). We do not believe Minn.Stat. § 518.17 permits a family court to place legal custody with a third person who is not seeking and objects to legal custody of the children.
The third statute relied upon by the trial court in taking this action was Minn.Stat. § 518.176, subd. 2 (1984), which provides:
If both parents or all contestants agree to the order, or if the court finds that in the absence of the order the child's physical or emotional health is likely to be endangered or his emotional development impaired, the court may order the county welfare board or the department of court services to exercise continuing supervision over the case under guidelines established by the court to assure that the custodial or visitation terms are carried out.
Id. (emphasis added).
Section 518.176 allows the court to order the county welfare board to supervise the custodial terms of the dissolution decree if the court finds the absence of the order would endanger the child's physical or emotional health. The court's finding that some sort of protective order is necessary is supported by the record. The question becomes whether this statute authorizes a family court to sua sponte place legal custody of children with a welfare board over the objection of the parents and the welfare board.
Section 518.176 allows the court to order supervision; it does not address legal custody. Legal custody is addressed in the statutes described above. Consequently, the family court exceeded its authority by awarding legal custody of the children to the RCCHSD.
3. The family court's intent in taking this action was to be able to remove the children from the home in an emergency. This objective could have been accomplished by an order giving the RCCHSD supervisory powers, including the authority to place the children in a foster home if necessary. Minn.Stat. § 518.176, subd. 2 (1984); see Currier v. Currier, 271 Minn. 369, 375-76, 136 N.W.2d 55, 59-60 (1965).
The family court in a dissolution proceeding under chapter 518 does not have the authority to award legal custody of children to a welfare board. Neglect and dependency *565 proceedings are the exclusive jurisdiction of the juvenile court proceeding in accordance with chapter 260. Minn.Stat. 260.111 (1984). Under these circumstances, the family court exceeded its authority under chapter 518 by awarding legal custody of the children to the RCCHSD.
4. Since we determine the family court exceeded its authority, we need not address the other issues raised in this matter.

DECISION
The family court exceeded its authority under chapter 518 by awarding legal custody to the RCCHSD. This matter is remanded to the family court with instructions to (1) grant legal custody to appellant subject to Brandon's temporary custody with the RCCHSD and (2) make any other appropriate order within its authority.
Reversed and remanded.
