D removed X.X.G., then four years old, and N.R.G., then four months old, from their home based on allegations of abandonment and neglect. The Department contacted F.G. (P), a licensed foster caregiver, and asked him to accept the children on a temporary basis until a more permanent placement could be found. P was an experienced foster parent who had previously served as a foster parent for seven other children. The children were in bad shape. The children thrived in P's household. In 2006, the natural parents' parental rights were terminated. X.X.G. and N.R.G. became available for adoption. P applied to adopt the children. An independent expert determined that P's home presented a suitable environment and that he met all the criteria required to adopt the two boys. That expert recommended against the application, because P is a homosexual and is prohibited from adopting children under subsection 63.042(3), Florida Statutes. D denied the application on that basis. D acknowledged that it would have approved the application if it had not been for the statute. P filed a petition in the circuit court to adopt the children. P claimed that subsection 63.042(3) is unconstitutional because it violates his rights to equal protection, privacy, and due process. Independent counsel acting on behalf of the children asserted that the children's rights to equal protection and due process had also been violated. D filed a motion to dismiss, but the court only dismissed the privacy claim. The trial court rendered a 53-page judgment declaring subsection 63.042(3) unconstitutional and granting the petition for adoption. D appealed.