Ordered that the order is affirmed, without costs or disbursements.
"[T]he determination of visitation is within the sound discretion of the hearing court based upon the best interests of the child . . ., and its determination will not be set aside unless it lacks a substantial basis in the record" ( Matter of Morales v Bruno, 29 AD3d 1001 [internal quotation marks omitted]; Matter of Marcial v Sullivan, 296 AD2d 551; see also Friederwitzer v Friederwitzer, 55 NY2d 89; see also Koppenhoefer v Koppenhoefer, 159 AD2d 113, 116). "While it is true that a parent's incarceration does not, by itself, render visitation inappropriate" ( Matter of Morales v Bruno, 29 AD3d at 1001; see Matter of Rodriguez v Van Putten, 309 AD2d 807; Matter of Marcial v Sullivan, 296 AD2d 551; Matter of Selca v Selca, 267 AD2d 314), visitation will be denied where there is substantial evidence that such visitation would be detrimental to the child ( see Matter of Morales v Bruno, 29 AD3d 1001; Matter of Marcial v Sullivan, 296 AD2d 551). Here, there is a sound and substantial basis in the record to establish that, under the circumstances, visitation with the father would not be in the children's best interests at this time ( see Matter of Morales v Bruno, 29 AD3d 1001; Matter of Rodriquez v Van Putten, 309 AD2d 807; Matter of Marcial v Sullivan, 296 AD2d 551; Matter of Selca v Selca, 267 AD2d 314).