A.D., the birth father of S.D., petitions this court for a writ of prohibition, or in the alternative a writ of certiorari, and requests that we quash a portion of the trial court’s order modifying custody to the father. Specifically, he objects to the portion of the order that gives the Pinellas County Sheriffs Office discretion to permit the maternal grandmother and the maternal great-grandmother to have unsupervised visitation with the minor child. We treat the petition for writ of prohibition as a petition for writ of certiorari. See Belair v. Drew, 770 So.2d 1164 (Fla.2000); T.M.M. v. H.M.C., 788 So.2d 1114 (Fla. 2d DCA 2001). We grant the petition and *40remand to the trial court to strike certain provisions from the order.
The attachments to the petition show that the child was removed from the mother’s custody and placed in the temporary custody of the Department of Children and Family Services (DCF) following allegations of present and prospective abuse and neglect. DCF filed an amended petition for dependency against the mother and also filed a petition for termination of the mother’s parental rights. DCF denied placement of the child with the maternal grandmother and great-grandmother and filed a motion to modify placement to the father. After a hearing, the trial court entered an order giving custody of the child to the father and abating his current child support obligation. This is the order under review. In the order, the trial court found that it was “appropriate to grant Pinellas County Sheriffs Office the discretion to permit the maternal grandmother and/or the maternal great-grandmother unsupervised visitation.”
In AS. v. Biddle, 829 So.2d 1004 (Fla. 2d DCA 2002), we granted A.S.’s petition for writ of prohibition1 and quashed the order for protective services entered by the trial court. The order required that the custodial parent deliver the children to the grandparents for overnight visitations and also make the children available to the grandparents to “permit the grandparents to assess the medical, dental, and educational ‘situations.’ ” 829 So.2d at 1005. In granting the petition, this court stated: “After deciding that the evidence did not warrant placing the children in shelter care, the trial judge could not legally order A.S. to perform any action with respect to the children absent a finding of dependency.” Id.
In this case, the trial court granted DCF’s motion to modify placement to the father and awarded custody of the child to the father, a non-offending parent. In granting the sheriffs office the authority to allow the maternal grandmother and the maternal great-grandmother to have unsupervised visitation with the child, the trial court was, in essence, ordering the father to provide visitation with the child to the maternal relatives should the sheriffs office determine such visitation appropriate. As in AS., the trial court in this case could not legally order the father to provide visitation to the maternal relatives. Generally, a grandparent is entitled to reasonable visitation with a grandchild who has been adjudicated dependent and taken from the physical custody of the parent. § 39.509, Fla. Stat. (2002). Here, however, the child was never adjudicated dependent as to the father,2 and the trial court’s order placed the child in the custody of the father. Thus, section 39.509 does not apply here.
The Florida Supreme Court recently declared section 61.13(2)(b)(2)(c), Florida Statutes (2001), unconstitutional as viola-tive of the constitutional right of privacy as *41articulated in article 1, section 23 of the Florida Constitution. In Sullivan v. Sapp, 866 So.2d 28, 37-38 (Fla.2004), the supreme court stated: “Clearly this Court has consistently held all statutes that have attempted to compel visitation or custody with a grandparent based solely on the best interest of the child standard, without the required showing of harm to the child, to be unconstitutional.” Any such statute, “which fails to require a showing of harm to the affected child, does not further a compelling state interest, and, therefore ... is facially unconstitutional as violative of a parent’s fundamental right of privacy.” Id. Thus, the supreme court has held that absent a showing of harm to the child, a custodial parent should not be compelled to provide visitation with the child to a grandparent.
Accordingly, we grant the petition for writ of certiorari, quash those portions of the trial court order that grant the sheriffs office discretion to permit unsupervised visitation with the maternal grandmother and great-grandmother, and remand to the trial court to strike those provisions from the order giving custody to the father.
ALTENBERND, C.J., and WHATLEY and VILLANTI, JJ., Concur.