In a child custody proceeding pursuant to Family Court Act article 6, the mother appeals, as limited by her brief, from so much of an order of the Family Court, Suffolk County (Kelley, R.), dated August 12, 2005, as, without a hearing, granted the father’s motion for summary judgment on the petition and awarded him custody of the parties’ child.
Ordered that the order is reversed insofar as appealed from, on the law, without costs or disbursements, the motion is denied, and the matter is remitted to the Family Court, Suffolk County, *757for a hearing to determine the best interests of the child and a new determination on the petition thereafter.
The Family Court incorrectly granted the father’s motion for summary judgment on his petition seeking an initial determination of custody of the parties’ child. The Family Court erroneously determined that the mother was precluded from having legal custody of the child, as a matter of law, merely because of the existence of an order in a prior neglect proceeding which limited her to supervised visitation with the child.
In making a custody determination, the court, after reviewing the totality of the circumstances, must consider what is in the best interests of the child (see Eschbach v Eschbach, 56 NY2d 167, 171 [1982]; Friederwitzer v Friederwitzer, 55 NY2d 89, 93; Matter of Johnson v Cole, 287 AD2d 632 [2001]). Since the Family Court did not consider the best interests of the child in granting the father’s motion for summary judgment and awarding him custody of the child, we remit the matter to the Family Court for a hearing to determine the best interests of the child, and a new determination on the petition thereafter. Miller, J.E, Adams, Skelos and Covello, JJ., concur.