
322 So.2d 22 (1975)
Linda A. DINKEL, Petitioner,
v.
Darrell G. DINKEL, Respondent.
No. 46764.
Supreme Court of Florida.
August 14, 1975.
*23 James W. Grimsley of Smith, Grimsley, Barron & Remington, Ft. Walton Beach, for petitioner.
D. Michael Chesser, Ft. Walton Beach, for respondent.
ADKINS, Chief Justice.
Upon petition for certiorari to review the opinion of the District Court of Appeal, First District, at 305 So.2d 90 (1974), conflict appears with the myriad cases setting forth the rule that in the absence of a clear showing of abuse of discretion, the decision of the trial judge in a child custody case will not be reversed. Grant v. Corbitt, 95 So.2d 25 (Fla. 1957); Green v. Green, 254 So.2d 860 (Fla.App. 1st, 1971); and Harrison v. Harrison, 165 So.2d 235 (Fla.App. 2nd 1966).
The only contested issue before the trial court in this proceeding for dissolution of marriage was the matter of custody of the parties' three-year-old child.
In any child custody proceeding, the welfare of the child is the prime consideration. Green v. Green, supra. Although a spouse has committed adultery, it may nonetheless be in the best interest of the child that custody be awarded to that spouse. Anderson v. Anderson, 205 So.2d 341 (Fla.App. 2nd, 1967). As stated in McAnespie v. McAnespie, 200 So.2d 606, (Fla.App. 2nd, 1957):
"The fact that a mother is guilty of adultery does not necessarily disqualify her to have the custody of her children. Although she may have been a bad wife, she may be a good mother. The moral unfitness of a mother must be such as has a direct bearing on the welfare of the child, if it is to deprive her of the custody of the child." (Emphasis supplied) (p. 609)
The District Court of Appeal in the case sub judice recognized these rules. Although the District Court referred to the "moral unfitness" of the mother, there is nothing in the opinion which indicates that such "moral unfitness" had any "direct bearing on the welfare of the child." There is conflict and we have jurisdiction.
Petitioner admitted having sexual relations over a period of time with one man while she was married to respondent. During the time petitioner was having an affair with a co-teacher, respondent was overseas in military service. Although the sexual activity was carried on while the subject child was present in the two-bedroom mobile home, it was never performed in front of the child.
Although contradictory testimony was presented at the trial, the record contains competent substantial evidence to show that petitioner is an attentive, intelligent, loving and responsible parent whose adulterous activity did not adversely affect the child.
After holding two separate hearings and listening to twelve witnesses present over 230 pages of testimony, the trial judge entered a judgment awarding custody of the child to petitioner giving extensive visitation rights to respondent. In the final judgment, the trial judge found that although petitioner had committed adultery, it is in the best interest of the minor child that custody be awarded to petitioner.
The District Court reversed the award of custody of the minor child to petitioner and found that, because petitioner had committed adultery in the presence of her child, she was an unfit mother, and therefore not entitled to custody.
Adultery may or may not have a direct bearing on the welfare of a child of tender years. Engaging in sexual intercourse with someone other than one's *24 spouse in the same household where the subject child is present does not necessarily affect the child's welfare. Whether the adultery has a direct bearing on the welfare of the child is a question for the trier of fact. Where the trier of fact determines that the spouse's adultery does not have any bearing on the welfare of the child, the act of adultery should not be taken into consideration in reaching the question of custody of the child.
Where the trier of fact reaches the conclusion that the adulterous conduct adversely affects the child, the scales are tipped against the award of custody to the adulterous spouse. Even if the trier of fact determines that the spouse's adultery has an adverse effect on the child, other factors, i.e., cruelty, neglect, parental unfitness, exhibited by the other spouse, may be present to tip the scales back in favor of the award of custody to the adulterous spouse. In the latter event, it may be that the best interest of the child would be served by awarding custody to a third party.
While Fla. Stat. § 61.13(2), F.S.A., provides for equal consideration of the spouses in the award of custody, it is still the law in this State that, other essential factors being equal, the mother of the infant of tender years should receive prime consideration for custody. Anderson v. Anderson, 309 So.2d 1 (Fla. 1975).
It is the function of the trial judge in a child custody proceeding to determine what is in the best interests of the child. An appellate court should not reverse the trial judge's findings absent a showing of abuse of discretion. Green v. Green, supra; Harrison v. Harrison, supra. As stated in Grant v. Corbitt, supra:
"[T]his court cannot, in any type of case, overturn the decision of a Chancellor made in the exercise of his judicial discretion in the absence of a clear showing of an abuse thereof; and, in a child custody case, the opportunity of the Chancellor to observe the demeanor and personalities of the parties and their witnesses and to feel forces, powers and influences that cannot be discerned by merely reading the record, assumes a new importance because of the many intangibles that must be evaluated in deciding the delicate question of child custody." 95 So.2d 25, p. 28.
Were this Court to sit as a trier of fact and hear all the evidence, we might have reached a conclusion different from that of the trial judge. However, neither this Court nor the District Court can substitute its judgment for that of the trier of fact, absent a finding of an abuse of discretion, which requires a lack of competent substantial evidence to sustain the findings of the trial judge.
In the case at bar, the trial judge heard extensive testimony and reached the conclusion that the child's welfare would be best served by awarding custody to the petitioner. Without even finding an abuse of discretion, the District Court substituted its opinion for that of the trial judge as to which parent would best satisfy the welfare of the child. Absent a showing of abuse of discretion, which was not shown before the District Court or this Court, the order of the trial judge was not reversible.
Accordingly, the decision sub judice is quashed and the cause is remanded to the District Court with instructions to reinstate that part of the order of the trial court awarding custody of the minor child to the petitioner.
It is so ordered.
ROBERTS, OVERTON and ENGLAND, JJ., DREW, Ret. J., and HENSLEY, Circuit Judge, concur.
