
231 Ga. 671 (1974)
203 S.E.2d 484
MITCHELL
v.
WARD.
28441.
Supreme Court of Georgia.
Submitted November 26, 1973.
Decided February 6, 1974.
Vaughn & Barksdale, Sidney L. Nation, for appellant.
James B. Pilcher, for appellee.
GUNTER, Justice.
This habeas corpus appeal involves a contest between the mother and father of a child with respect to the child's custody.
The mother-appellee filed an application for a writ of habeas corpus in the trial court contending that the child was being illegally withheld from her possession and custody by the father-appellant. The child had been born out of wedlock, but the father had thereafter secured an order of court rendering the child legitimate pursuant to Code § 74-103.
At the habeas corpus hearing the trial judge heard evidence in behalf of the mother; the court then inquired of the father if he intended to present evidence showing that the mother was an unfit person to have custody of the child; and upon being told that the father would not contend that the mother was unfit, the trial court declined to hear any evidence on behalf of the father and entered an order placing custody in the mother.
The father has appealed, complaining that he was cut off in the habeas corpus court from presenting evidence which would show what was for the best interest of the child and what would best promote the child's welfare and happiness.
*672 The father of an illegitimate child, rendered legitimate by court order as in this case, has a claim to parental and custodial rights with respect to his child. See Sims v. Pope, 228 Ga. 289 (185 SE2d 80).
Code Ann. § 74-107 provides that in a contest between parents of a child over the child's custody it is the duty of the court to look to and determine solely what is for the best interest of the child and what will best promote the child's welfare and happiness and, exercising the court's discretion, make the custody award accordingly. Code § 50-121 provides that when a writ of habeas corpus is sued out because of the detention of a child, the judge, "on hearing all the facts, may exercise his discretion as to whom the custody" of such child shall be given.
Pursuant to these two provisions in our law we consider it incumbent upon a trial judge to hear the evidence from both contesting parties with respect to what disposition of the child would be in the child's best interest. We further conclude that for one of the parties to be prohibited from presenting such evidence is an improper exercise of the discretion that is lodged in the trial court by these two statutory provisions.
We therefore conclude that this custody judgment must be reversed and the case remanded to the trial court for further proceedings at which both parties will be permitted to present evidence as to what disposition of the child would be in the child's best interest.
Judgment reversed with direction. All the Justices concur.
