
27 Cal.App.4th 102 (1994)
32 Cal. Rptr.2d 639
In re the Marriage of LESLIE and FRANK D. McCANN.
LESLIE McCANN, Plaintiff and Appellant,
v.
FRANK D. McCANN, Defendant and Respondent.
Docket No. A062856.
Court of Appeals of California, First District, Division Two.
July 11, 1994.
*104 COUNSEL
Daniel E. Lungren, Attorney General, and Mary Roth, Deputy Attorney General, for Plaintiff and Appellant.
Gerald D. Connor for Defendant and Respondent.
OPINION
KLINE, P.J. 

Introduction
The district attorney appeals from the grant of a motion to set aside an ex parte order for child support enforcement. The question presented is whether a child support order terminates by operation of law upon the death of the custodial parent. We hold that the order does not automatically terminate when the custodial parent dies. Even if the noncustodial parent assumes custody, he or she still must request judicial termination of the order if termination is not provided for in the existing support order.
We further hold that the district attorney may bring an action on behalf of the children for whose benefit the support was ordered to recover arrearages accruing after the custodial parent's death.

Statement of Facts
Frank D. McCann and Leslie McCann were married in 1974. They had two daughters, Stacy, born in 1975, and Lauren, born in 1978. The marriage was dissolved in 1988.
The judgment of dissolution provided that the parents would have joint legal custody of the children, while the mother would have physical custody. Frank was ordered to pay Leslie child support of $250 per month for each *105 child "until further order of the court or until a child reaches the age of 18 years of age, marries, dies, or is otherwise emancipated."
Leslie became ill. She moved with the daughters to the home of her mother, Lilian Clague. In December 1990, Leslie died. After her death, the daughters continued residing with their grandmother. In January 1992, Stacy moved for six months from her grandmother's home to the home of a friend of Leslie. According to Mrs. Clague, she paid the friend $500 per month for Stacy's care. After six months at the friend's home, Stacy spent the summer of 1992 at a dude ranch. She returned to her grandmother's home in August 1992.
Frank made all his child support payments up to the time of Leslie's death. After her death, from December 1990 to January 1992, he paid $500 per month to Mrs. Clague for the girls' expenses. Frank reduced his payments to Mrs. Clague to $250 per month for the period Stacy spent away from Mrs. Clague's home. Upon her return, he resumed paying $500 per month. The arrearages claimed in this case are $250 per month for this eight-month period, or $2,000.

Statement of the Case
In December 1992, the San Francisco District Attorney moved for an order authorizing him to appear on behalf of the children to enforce the order. (Civ. Code, § 4702, subd. (b).)[1] The declaration filed with the motion designated the district attorney as attorney "pursuant to Welfare and Institutions Code section 11475.1"[2] and requested a wage assignment in the amount of $500 per month.
*106 In March 1993, Frank McCann moved to set aside the order for child support enforcement, contending that it terminated when he assumed custody of his daughters upon Leslie McCann's death. In response, the district attorney filed a memorandum of points and authorities requesting the court to find that the support order survived the death of the custodial parent, to permit district attorney enforcement of the order, and additionally to find that Frank McCann owed $2,000, plus interest, under the order.
The superior court granted the motion to set aside the order for support enforcement. The district attorney appeals.

Discussion

I.

The Support Order Did Not Terminate on the Custodial Parent's Death
At the time of Leslie McCann's death, a valid court order was in force requiring respondent to pay $500 per month for the support of his children. None of the contingencies specified in the order had occurred, so the order did not terminate by operation of law. (Fam. Code, § 4007.)
(1a) The trial court found that upon Leslie McCann's death, Frank assumed custody of his daughters. Citing In re Marriage of Gregory (1991) 230 Cal. App.3d 112 [281 Cal. Rptr. 188], the court found that because the noncustodial parent had assumed custody, the support order had terminated upon the custodial parent's death.
Gregory held that a child support order does not terminate automatically on the death of the custodial parent; the noncustodial parent must look to the courts to modify or terminate the order. (In re Marriage of Gregory, supra, 230 Cal. App.3d at p. 116.) The court stated that "there is no legal or policy reason to terminate a child support order when a custodial parent dies and the noncustodial parent does not assume custody." (Ibid.) This language led the trial court in the present case to conclude that if the noncustodial parent does assume custody, the support order terminates automatically.
*107 We disagree with this interpretation of Gregory. Even if respondent assumed custody of the children upon the mother's death, that action did not operate to automatically terminate the support order. Instead, it merely provided a basis for respondent to seek judicial modification or termination of the support order. Because Frank did not seek a termination of the support order, the trial court erred in concluding that the order had terminated.
An order to pay child support is a court-imposed obligation. (Fam. Code, § 3585; Armstrong v. Armstrong (1976) 15 Cal.3d 942, 947 [126 Cal. Rptr. 805, 544 P.2d 941].) Respondent cannot unilaterally terminate his court-ordered support obligation before the times listed in the order for its termination. He is required to seek modification of the order based on changed circumstances if he believes the death of the mother warrants a modification or termination of the support order. (Lehrer v. Lehrer (1976) 63 Cal. App.3d 276, 279 [133 Cal. Rptr. 709] [obligee parent cannot decide that events not described in the order constitute emancipation].)
(2) The state's interest in protecting the welfare of the children dictates that the time for termination of court-ordered child support be determined by the court, an impartial third party, and not by the obligor parent. The court may make this determination at the time it makes the order, by providing for termination on the occurrence of certain events. When those events have not occurred, the court may determine that a support order should be terminated or modified because of a change in circumstances that was not anticipated in the original order. The child support obligor may not usurp this judicial function by unilaterally deciding whether his or her obligation has ended.
This rule is consistent with cases holding, in circumstances other than the death of the custodial parent, that assumption of custody does not automatically terminate a support order. For example, in Jackson v. Jackson (1975) 51 Cal. App.3d 363 [124 Cal. Rptr. 101], the father, who was the child support obligor, assumed sole physical custody of the child. Almost two years after assuming custody, he requested and received a termination of the child support order. The mother sought to recover arrearages accrued during the period between the father's assumption of custody and the termination of the order. (Id., at p. 365.) The Court of Appeal held that while the trial court could not modify the order retroactively, it could exercise its equitable discretion to deny enforcement or permit only partial enforcement of the order on the ground that the father had discharged his obligation by assuming physical custody and paying all the child's expenses. (Id., at p. 368.) The order could not terminate prior to the action of the court. (1b) Similarly, in the present case, an assumption of custody can only be the factual predicate for a modification or termination by the court.
*108 Had Frank sought modification of the support order upon Leslie's death, as he should have, the conflict that now exists would not have arisen and the court would be spared the difficult task of reconstructing the intended custodial arrangement. The principle that a judicial order can be modified or terminated only by judicial action, not unilaterly by the party bound thereunder, is thus supported by the salutary policies of preventing conflict and thereby conserving judicial resources.

II.

The District Attorney May Enforce the Order on Behalf of the Children
(3) Respondent argues that neither the district attorney nor the children can enforce the support order against Frank McCann. We conclude that the district attorney is authorized to proceed on behalf of the children to enforce the support order and collect arrearages.[3]
The child support obligation runs to the child and not the parent. (Williams v. Williams (1970) 8 Cal. App.3d 636, 640 [87 Cal. Rptr. 754].) The district attorney may act to enforce a child support order on behalf of a child who is not receiving public assistance. (Welf. & Inst. Code, § 11475.1, subd. (a).) The custodial parent is not a necessary party to such an action. (Welf. & Inst. Code, § 11350.1, subd. (a).) Leslie McCann's death affects neither the children's right to enforce the child support order nor the district attorney's statutory authorization to act in their behalf.
The district attorney may maintain an action to recover arrearages in child support payments. (Welf. & Inst. Code, § 11350.1, subd. (c).) However, respondent argues that the district attorney may not bring such an action because the children are not the "real parties in interest" in an action for arrearages, as opposed to one to obtain or modify a support order. In re Marriage of Utigard (1981) 126 Cal. App.3d 133 [178 Cal. Rptr. 546], upon which respondent relies, reasoned that payment of arrearages can be assumed to be a payment to reimburse the custodial parent for support of the children, rather than a payment for the benefit of the children themselves. (See also In re Marriage of Lackey (1983) 143 Cal. App.3d 698, 706 [191 Cal. Rptr. 309] ["It is well established that when a custodial parent brings an action for payment of child support arrearages as distinguished from an initial action for support or request for modification, the child is not the real *109 party in interest."].) The court in Utigard stated that it "[did] not reach the question under what conditions the children might be deemed the beneficiaries of arrearages in child support." (Utigard, supra, 126 Cal. App.3d at p. 143.)
Because the arrearages in the present case accrued after the custodial parent's death, the presumption that the action has been brought to reimburse the custodial parent for having supported the children has no application. Under the unique circumstances of this case, the children must be deemed to be the beneficiaries of the arrearages; otherwise the death of the custodial parent would render the order unenforceable. The instant action may therefore be brought on behalf of the children by the district attorney.
For the foregoing reasons, the judgment is reversed.
Smith, J., and Phelan, J., concurred.
NOTES
[1]  Family Code section 4201 (formerly Civ. Code, § 4702, subd. (b)) provides: "In any proceeding where a court makes or has made an order requiring the payment of child support to the person having custody of a child for whom support may be ordered, the court may do either or both of the following:

"(a) Direct that the payments shall be made to the county officer designated by the court for that purpose.
"(b) Direct the district attorney to appear on behalf of the minor children in any proceeding to enforce the order."
[2]  Welfare and Institutions Code section 11475.1, subdivision (a), provides that "[t]he district attorney shall take appropriate action, both civil and criminal, to establish, modify, and enforce child support ... on behalf of a child who is not receiving public assistance...." Subdivision (i) provides that "[i]n the exercise of the anthority granted under this article, the district attorney may intervene, pursuant to subdivision (b) of Section 387 of the Code of Civil Procedure, by ex parte application, in any action under the Family Code, or other proceeding wherein child support is an issue.... By notice of motion, order to show cause, or responsive pleading served upon all parties to the action, the district attorney may request such relief as appropriate which the district attorney is authorized to seek."

Welfare and Institutions Code section 11350.1 specifies the procedures to be followed in actions brought under section 11475.1. (Monterey County v. Cornejo (1991) 53 Cal.3d 1271, 1281 [283 Cal. Rptr. 405, 812 P.2d 586].) This section, subdivision (a), provides that "in any action brought by the district attorney for child support of a minor child or children, the action may be prosecuted in the name of the county on behalf of the child, children, or caretaker parent. The caretaker parent shall not be a necessary party in the action...."
[3]  Portions of the trial record and the briefs speak of the district attorney as acting on behalf of Lilian Clague. Mrs. Clague, though a caretaker, is not the "caretaker parent" (Welf. & Inst. Code, § 11350.1, subd. (a)), nor has she formally intervened in the underlying action (at least as far as the record shows). Mrs. Clague is not a party to the judgment and the district attorney is not authorized to enforce the child support order on her behalf.
