
666 So.2d 170 (1995)
Michael Wayne ALLAN, Appellant,
v.
Kelley E. ALLAN, Appellee.
No. 94-04027.
District Court of Appeal of Florida, Second District.
November 15, 1995.
Rehearing Denied January 8, 1996.
Daniel P. Rock, New Port Richey, for Appellant.
Michael S. Edenfield of Michael S. Edenfield, P.A., Brandon, for Appellee.
PER CURIAM.
Michael Allan challenges a final order denying his petition for modification of custody of his minor child. We reverse because the trial court applied the wrong test in determining whether modification should be granted.
On February 25, 1992, the mother was designated the primary residential parent of the minor child pursuant to a marital settlement agreement, the terms of which were incorporated into the final judgment of dissolution. Approximately one month later the parties verbally agreed that the father would keep the child for six months. However, it was approximately one year later before the mother requested that the child be returned.
The father filed a petition for modification of the final judgment in January 1993, seeking primary residential custody of the child. On March 31, 1993, the trial court entered a temporary order continuing the physical residence with the father. The final hearing on the father's petition was held July 19, 1994. The trial court denied the father's petition and directed that the child be returned to the mother no later than September 2, 1994. By this time, the child had reached the age of four and had resided with the father for approximately two and one-half years.
The trial court erred by focusing primarily on the mother and whether it would be detrimental to return the child to the mother. The function of the trial judge in a child custody proceeding is to determine what is in the best interests of the child. § 61.13(2)(b)1., Fla. Stat. (1993). The general *171 rule is that a parent seeking a modification of custody bears the extraordinary burden to prove that a substantial and material change of circumstances has occurred since the final judgment and that a change in custody is in the child's best interest. Jablon v. Jablon, 579 So.2d 902 (Fla. 2d DCA 1991). The question to be addressed was not whether the child would suffer irreparable harm if physical custody was returned to the mother. Thus, the father had no burden to prove that the mother's environment would be detrimental to the child. The question was whether the father proved a substantial change in circumstances since entry of the final judgment to justify a modification of the custody order and whether granting a modification would be in the child's best interest. The father met his burden. On the record before us, we conclude that the evidence presented by the father proved a substantial change in circumstances and showed that modification of custody would be in the child's best interest. Therefore, the trial court abused its discretion by denying the petition for modification of custody.
Reversed and remanded for proceedings consistent with this opinion.
CAMPBELL, A.C.J., and PATTERSON and FULMER, JJ., concur.
