
898 So.2d 980 (2005)
DEPARTMENT OF CHILDREN AND FAMILY SERVICES, Appellant,
v.
J.B., Mother of P.C., A Child, Appellee.
No. 5D04-2882.
District Court of Appeal of Florida, Fifth District.
March 4, 2005.
*981 Charles D. Peters, Orlando, for Appellant.
No Appearance for Appellee.
PLEUS, J.
During the course of dependency proceedings below, the court ordered the mother to begin unsupervised visitation with the child "subject to positive home study on the mother." Five weeks later, the mother's attorney filed a petition for order to show cause why the Department of Children and Family Services ("Department") should not be held in contempt for failing to complete a home study on the mother. The petition did not seek attorney's fees. At a hearing on the petition, the court found the Department in contempt and invited the mother's attorney to file a motion for attorney fees. The mother's attorney subsequently filed a motion for attorney's fees and attached an affidavit relating to the amount of fees expended. After a short hearing, the court reversed its previous finding of contempt, but awarded attorney's fees consistent with the affidavit.
We are certainly sympathetic to the court's attempt to send a much-needed message to the Department. The Department's failure to conduct a timely home study violated a court order, necessitated expending scarce judicial resources, and most importantly, unnecessarily delayed reunification between mother and child. However, we must reverse the fee order because the court failed to state a legal basis for awarding attorney's fees. Generally, a court may only award attorney's fees when such fees are "expressly provided for by statute, rule, or contract." Hubbel v. Aetna Cas. & Sur. Co., 758 So.2d 94, 97 (Fla.2000). Neither the mother nor the lower court cited any legal authority for awarding fees.
We note that attorney's fees may be awarded as a sanction under section 57.105, Florida Statutes, if the court makes appropriate findings. See, e.g., Dep't of Children and Family Services v. Carter, 851 So.2d 197 (Fla. 5th DCA 2003). A court may impose attorneys fees as a sanction for bad faith conduct upon making appropriate findings. See, e.g., Bitterman v. Bitterman, 714 So.2d 356, 365 (Fla.1998). A court may award attorney's fees as a sanction for civil contempt as long as proper procedure is followed. See Dep't of Children and Families v. D.T., 808 So.2d 1282 (Fla. 5th DCA 2002); Lamb v. Fowler, 574 So.2d 262 (Fla. 1st DCA 1991). A court may also award attorney's fees conditioned upon the granting of a continuance. See Dep't of Children and Families v. M.G., 838 So.2d 703 (Fla. 5th DCA 2003). We caution, however, that our holding in M.G. should not be construed as a broad grant of authority to award attorney's fees as a sanction in contexts other than those outlined above.
We decline to address the Department's arguments regarding the amount of fees as they were not properly preserved. We reject the Department's argument that the court lacked jurisdiction because the fee order was entered after the case was *982 closed. In Tobkin v. State, 777 So.2d 1160, 1163 (Fla. 4th DCA 2001), the court noted that closing a case does not prevent the court from determining "ancillary matters involved in the case such as outstanding and unresolved motions for attorney's fees and costs, and similar issues." Clearly, the court in this case orally awarded fees prior to closing the case and therefore retained jurisdiction to enter a written order consistent with its previous oral pronouncement.
Accordingly, we remand the matter back to the court to state a legal basis for the award, if any. See North County Co. v. Bologna, 816 So.2d 842 (Fla. 4th DCA 2002).
REVERSED AND REMANDED.
SHARP, W. and GRIFFIN, JJ., concur.
