Jo Ann Howard (formerly Jo Ann Greenway), the appellant here, was the defendant in a divorce action brought by her husband, Robert McEll Green-way, Sr. The final decree in this divorce action granted the parties a total divorce and ordered “the custody, permanent control and possession of the parties’ minor son, Robert McEll Greenway, Jr. is placed in the father, Robert McEll Green-way, Sr.” Further, an agreement between the parties was incorporated into the final divorce decree and it read in part as follows: “The Juvenile Court of Fulton County has on this day by judicial order, placed the temporary custody of said party’s minor child, a two year old infant son, Robert McEll Greenway, Jr. in the custody of the father, party of first part (Robert McEll Greenway, Sr.), who resides with his parents, Mr. and Mrs. John W. Greenway and party of the second part (Jo Ann Greenway) agrees that the permanent custody, control and care of said child should be with the father and said grandparents.” Following the death of the father, Jo Ann Howard brought a writ of habeas corpus against Mr. and Mrs. John W. Greenway seeking the custody of her minor son. After a hearing the writ of habeas corpus was dismissed with the court grounding its decision on a finding that Jo Ann Howard had contractually relinquished the parental custody and control of her child to the grandparents by the agreement which was made a part of the final divorce decree. The appeal assigns error on the order dismissing the writ of habeas corpus. Held:
“Where the parties in a divorce proceeding enter into a contract settling between themselves the questions of alimony, custody, and support of their minor children, the court may in its discretion approve the agreement in whole or in part, or refuse to approve it as a whole. If any change is made in the agreement as incorporated in the decree which makes the decree conflict with the agreement of the parties, the words of the decree will control. Amos v. Amos, 212 Ga. 670, 671 *253(2) (95 SE2d 5)." Booker v. Booker, 219 Ga. 358 (133 SE2d 353). The words of the divorce decree between the appellant and her now deceased husband nullify the conflicting words of the agreement which were incorporated into said decree. This divorce decree placed the custody and control of the child in the father alone and not jointly with the grandparents, and the appellant has not since the decree relinquished her parental control by voluntary contract to a third party.
Submitted March 14, 1967 — Decided March 23, 1967. Linus L. Zukas, for appellant. Bruce B. Edwards, for appellees.Upon the death of the parent who has held custody under a divorce decree, the right to custody automatically inures to the surviving parent. Girtman v. Girtman, 191 Ga. 173, 181 (11 SE2d 782). Under the allegations in her petition, the appellant as the surviving parent of this minor child has a legal right to the custody of the child. It was error to dismiss the writ of habeas corpus.
Judgment reversed.
All the Justices concur.