
137 N.W.2d 792 (1965)
Application of Donald H. McKay for a writ of habeas corpus.
Donald H. McKAY, Petitioner and Appellant,
v.
Joseph MITZEL and Winnifred Mitzel, Respondents.
No. 8166.
Supreme Court of North Dakota.
October 21, 1965.
*793 Conmy & Conmy, Bismarck, for petitioner and appellant.
Larry M. Hatch, Linton, for respondents.
STRUTZ, Judge (on reassignment).
Petitioner brings habeas corpus proceedings to determine the custody of three minor children. The parents were divorced in 1955, and custody of the children was awarded to the mother by the decree. The petitioner is the natural father, who was remarried, in 1957, to a woman who had two children by a former marriage. Two other children have been born as the issue of this second marriage.
The natural mother, who also remarried following the divorce, died in 1963, and this proceeding was brought by the father to secure the custody of the three children by his first marriage.
The respondents in this proceeding are the parents of the mother, and the grandparents of the children involved. The children, two girls and a boy, presently are living with the respondents in Linton and are attending the public schools in that city. The petitioner, with his present family, is residing in the State of Colorado where he is employed by a construction firm. They reside in a trailer home, but the petitioner advised the trial court that, if he were awarded the custody of these three children, he would rent an apartment or a house. The record discloses that the petitioner's salary is adequate to care for these children in addition to his other obligations.
The record further discloses that the petitioner suffered an injury in connection with his employment which made it necessary for him to seek reductions in the amounts which he was required to pay for the support of these children, under the divorce decree. Such payments first were reduced to ninety dollars a month and thereafter to seventy-five dollars a month. It further appears that the children lived with the respondents during the period following the divorce of their parents and until their mother's remarriage, a period of approximately two years, and that, since their mother's remarriage, they have spent much time with the respondents.
At the time of the trial, the court, in the presence of counsel for both the petitioner and the respondents, talked to the children in chambers. At that time, the girls were fifteen and fourteen and the boy was approximately ten and one-half years of age. All of the children expressed a desire to remain with the respondents.
The trial court found that both the petitioner and the respondents were fit and proper persons to have the custody of such minor children. In its decision, the court pointed out that the petitioner's wife is a comparative stranger to the three children involved in this proceeding. The court noted that petitioner's wife has four children of her own and that, although she testified that her relations with the three children involved in this proceeding were excellent on those occasions when they visited their father and that she would try to treat them the same as if they were her own, she could not be expected to give them the same love and consideration that she would give to her own offspring.
Findings of fact and conclusions of law were made in favor of the respondents, and the petition for writ of habeas corpus was denied. The petitioner has appealed from *794 the order denying his petition and has demanded a trial de novo of all the issues before this court.
It is the contention of the petitioner that, as the natural father of the children involved in this proceeding, he is entitled to their custody. Sec. 14-09-04, N.D.C.C. He points out that this court has held that, where the mother is dead, the father is entitled to the custody of the children. Raymond v. Geving, 74 N.D. 142, 20 N.W.2d 335.
This court has also held that, upon the death of the parent to whom custody of a child was awarded in a divorce proceeding, the surviving parent may be given custody in a habeas corpus proceeding upon a showing that such parent is a proper person. Garrett v. Burbage, 55 N.D. 926, 215 N.W. 479.
Our statute provides that, of two persons equally entitled to custody, preference is to be given to a parent. Sec. 30-10-07(1), N.D.C.C.
While a parent's right to the custody of a child is preferred by this section, in awarding custody the court will be guided by Section 30-10-06, North Dakota Century Code. This section provides that, in awarding custody of a minor, the court is to be guided by certain considerations:
"1. By what appears to be for the best interests of the child in respect to its temporal and its mental and moral welfare, and if the child is of sufficient age to form an intelligent preference, the court or judge may consider that preference in determining the question; * * *."
Thus the statutory right of the parent to primary consideration in the matter of custody is subject to a determination of what is best for the child, such best interests of the child being paramount. Nelson v. Ecklund, 68 N.D. 724, 283 N.W. 273. Consequently, where the mother is dead, the father has the right to custody superior to that of anyone else, unless the best interests of the child require that he be deprived of such custody. Thus, before the natural right of a parent to custody of a minor child may be set aside, it must appear that the best interests of the child require such action.
In the matter before us, the trial court found both the natural father, as the petitioner, and the maternal grandparents, as the respondents, fit to have custody of these children. If this were the only matter before the court, the father clearly would be entitled to the writ prayed for. But, in awarding custody, the court must weigh all of the conflicting rules and presumptions, together with all of the circumstances of the particular case. And, as has been pointed out, the controlling consideration of the court in determining custody should be the welfare and best interests of the children. Within the limits imposed by our statute, the trial court is vested with a large discretion in determining what is in the child's best interests and to whom custody should be awarded. The court, having had all of the parties before it, in this case determined that the best interests of the children required that the custody be awarded to the respondents. We cannot say that, in so finding, the court abused its discretion.
We would point to a further consideration which lends support to the court's decision in this matter. At the time of the trial, the two daughters whose custody was involved in this proceeding were fifteen and fourteen years of age, while the son was ten years and five months old. The court, in chambers, in the presence of counsel for both sides, asked these children what their wishes were in the matter of custody, and they stated that they preferred to remain with the respondents. In determining an award of custody, the court may *795 consider the wishes of the children where such children have reached the age of discretion, although such preference is not controlling on the court. Since the children were fifteen, fourteen, and ten years of age, they were not too young to exercise some judgment in respect to their custody. This is especially true of the two older children, and we believe the court was right in determining that the best interests of the children required that they remain together. The desires of the children relative to custody were entitled to consideration. It was for the trial court, in the exercise of its discretion, to appraise the intelligence of the children and to decide what weight, if any, should be given to their wishes in determining the question of custody.
The welfare and best interests of the children, the fitness of the parties, and the right of custody of the parties were all before the trial court. The findings and conclusions of the court are well supported by the evidence, and we agree with these findings.
The order appealed from is affirmed.
BURKE, C. J., and TEIGEN and ERICKSTAD, JJ., concur.
KNUDSON, J., not being a member of the Court at the time of submission of this case, did not participate.
