
226 Ga. 619 (1970)
176 S.E.2d 712
KNOX
v.
KNOX et al.
25862.
Supreme Court of Georgia.
Submitted June 9, 1970.
Decided July 9, 1970.
Rehearing Denied July 28, 1970.
Claude Hambrick, for appellant.
Reuben A. Garland, Edward T. M. Garland, Bryan M. Cavan, Webb, Parker, Young & Ferguson, Guy Parker, for appellees.
FELTON, Justice.
1. In the plaintiff father's habeas corpus action against his divorced wife for the custody of their nine-year-old daughter, the applicable law is Code § 74-107 (Ga. L. 1913, p. 110, as amended), rather than Code § 50-121. Harwell v. Gay, 186 Ga. 80, 84 (196 SE 758); Fort v. Alewine, 223 Ga. 359, 361 (155 SE2d 12).
2. The provision of Code Ann. § 74-107, as to no prima facie right to the custody of the child in the father, did not enlarge *620 the rights of third parties, which are governed by Code § 50-121. Hill v. Rivers, 200 Ga. 354, 362 (37 SE2d 386). "While, as between the parents, the court has a very broad discretion  looking always to the best interest of the child  and may award the child to one, to the exclusion of the other, though the latter may not be an unfit person to exercise custody, or has not otherwise lost the right of custody, still the court, in a controversy between parents, should not, ordinarily, award the child to a third party, if one or both of the parents be morally fit and custody has not otherwise been lost in one of the modes provided by law." Hill v. Rivers, supra, p. 363. (Emphasis supplied).
3. When the custody of a minor child awarded by a divorce decree is forfeited in the mother by reason of her unfitness, the custody automatically inures to the father, unless it be lost in one of the modes provided by law (Hill v. Rivers, supra, p. 357), or unless he is "unfit" to have custody. Perkins v. Courson, 219 Ga. 611 (135 SE2d 388).
4. There was evidence that the mother was hallucinatory and in need of psychiatric treatment, which authorized the court to award custody to someone else, even if her condition did not make her "an unfit person to exercise custody." There was no evidence that the father had lost his right of custody in any of the modes provided by law.
5. It is not a ground upon which to deny custody to the father, who has not lost his right to it in any of the modes provided by law, that he may feel it his duty to bring his child up in his own faith, even though the child has been taught a different faith heretofore under her mother's custody. See Sloan v. Jones, 130 Ga. 836, 856 (62 SE 21).
6. Nor can the father be considered unfit merely because he has not maintained a close relationship with his daughter during his former wife's custody of the child, it appearing that such relationship was made difficult, if not impossible, by the attitude and behavior of the mother.
7. The record shows that the trial court rendered its judgment, denying the grant of the writ of habeas corpus and awarding the custody of the child to her adult stepbrother, upon the erroneous theory that the court's discretion permitted the award of custody to the third party even where one or both of the parents were morally fit and custody had not otherwise been lost in one of the modes provided by law.
*621 This judgment is therefore reversed and a new trial granted, in order that custody can be awarded in accordance with the principles set forth in this opinion.
Judgment reversed. All the Justices concur. Almand, C. J. and Undercofler, J., concur specially.
