*537In a child custody proceeding pursuant to Family Court Act article 6, the maternal grandmother appeals from an order of the Family Court, Suffolk County (Hinrichs J.), entered November 14, 2002, which denied her petition for custody of the subject child.
Ordered that the order is affirmed, without costs or disbursements.
“The determination of custody is a matter entrusted to the sound discretion of the trial court, which is in the most advantageous position to evaluate the testimony, character, and sincerity of the parties” (Vinciguerra v Vinciguerra, 294 AD2d 565, 566 [2002]; see Santoro v Santoro, 224 AD2d 510 [1996]). A determination of custody should not be set aside unless it lacks a sound and substantial basis in the record (see Vinciguerra v Vinciguerra, supra; Eschbach v Eschbach, 56 NY2d 167, 171 [1982]). It is well settled that a court, in considering questions of child custody, must determine “what is for the best interest of the child” (Domestic Relations Law § 70; see Eschbach v Eschbach, supra).
The Family Court providently exercised its discretion in determining that it was in the child’s best interests to remain in the custody of the Department of Social Services and to be available for adoption by the foster parents (see Matter of Violetta K. v Mary K., 306 AD2d 480, 481 [2003]). Since the foster parents are the only parents the child has ever known, it is in her best interests to continue that stable relationship (see Matter of David B., 2 AD3d 725 [2003]; Domestic Relations Law § 70 [a]), rather than be removed to the custody of her maternal grandmother. We note in this regard that “[a] nonparent relative takes no precedence for custody over the adoptive parents selected by an authorized agency” (Matter of Ella J. v Iva J., 4 AD3d 527 [2004]). Santucci, J.P., S. Miller, Schmidt and Townes, JJ., concur.