
970 So.2d 855 (2007)
Craig DAVIDSON, Appellant,
v.
Abel RAMIREZ, Appellee.
No. 3D07-79.
District Court of Appeal of Florida, Third District.
November 14, 2007.
Welbaum, Guernsey, Hingston, Greenleaf, Gregory, Black, Rune & Thomas, L.L.P. and Solimar Santos, Miami, and Robert J. Black, Coral Gables, for appellant.
Levey, Airan, Shevin, Roen, Kelso, Corona, & Herrera, LLP and John R. Kelso, Miami, for appellee.
Before COPE and WELLS, JJ., and FLETCHER, Senior Judge.
COPE, J.
Craig Davidson appeals a final order of the trial court awarding attorney's fees to *856 Abel Ramirez under subsection 57.105(5), Florida Statutes (2005). We conclude that the motion should have been denied for noncompliance with the notice provision of the statute. See id. § 57.105(4).
Plaintiff-appellant Davidson sued defendant-appellee Ramirez alleging abuse of process, fraud, civil conspiracy, and malicious prosecution. The defendant responded to each pleading with a motion to dismiss. The various complaints and amended complaints were dismissed with leave to amend. After dismissal of the Third Amended Complaint, the plaintiff decided not to attempt any further amendment and the dismissal became final.
The defendant filed a motion for attorney's fees pursuant to subsection 57.105(5), Florida Statutes (2005), which, in substance, provides for an award of attorney's fees where a claim or defense was frivolous. The plaintiff opposed the motion, arguing that the defendant had failed to comply with the notice provision set forth in subsection 57.105(4), Florida Statutes (2005). The trial court acknowledged that this objection was meritorious, but decided that the court could award such attorney's fees on its own initiative. The court awarded attorney's fees to the defendant, and the plaintiff has appealed.
We conclude that the trial court's ruling was in error. The purpose of subsection (4) is to give a pleader a last clear chance to withdraw a frivolous claim. Burgos v. Burgos, 948 So.2d 918 (Fla. 4th DCA 2007); O'Daniel v. Bd. of Comm'rs, 916 So.2d 40 (Fla. 3d DCA 2005). Subsection 57.105(4) states:
A motion by a party seeking sanctions under this section must be served but may not be filed with or presented to the court unless, within 21 days after service of the motion, the challenged paper, claim, defense, contention, allegation, or denial is not withdrawn or appropriately corrected.
(Emphasis added).
"Subsection (4) does more than require the giving of notice. It creates an opportunity to avoid the sanction of attorney's fees by creating a safe period for withdrawal or amendment of meritless allegations and claims." Walker v. Cash Register Auto Ins. of Leon County, Inc., 946 So.2d 66, 71 (Fla. 1st DCA 2006). "Having the parties police themselves, instead of requiring judicial intervention on section 57.105 issues, promotes judicial economy and minimizes litigation costs." Vanderpol v. Frengut, 932 So.2d 1251, 1253 (Fla. 4th DCA 2006) (quoting Maxwell Bldg. Corp. v. Euro Concepts, LLC, 874 So.2d 709, 711 (Fla. 4th DCA 2004)).
In this case, as in O'Daniel, the defendant waited until the case was over to file the attorney's fee motion. 916 So.2d at 41. In O'Daniel, the motion for attorney's fees was stricken for noncompliance with subsection 57.105(4).
The trial court correctly recognized that the defendant had failed to comply with the notice requirement. However, the court noted that subsection 57.105(1) allows the court to impose attorney's fees on the court's own initiative. In essence the court adopted the defendant's motion as the court's own motion and awarded attorney's fees.
We conclude that this procedure is contrary to the intent of the statute. The legislative intent is to require the twenty-one-day notice whenever a subsection 57.105(5) motion is filed by a party. It would frustrate the legislative intent to avoid the twenty-one-day notice by allowing the court to adopt the party-filed motion as the court's own. Since this was a party-filed motion, the subsection 57.105(4) notice period had to be observed.
*857 Because the defendant failed to comply with the requirements of subsection 57.105(4), Florida Statutes (2005), the trial court erred in awarding attorney's fees under subsection 57.105(5). We therefore reverse the judgment and remand with the directions to enter judgment for the plaintiff on the attorney's fee motion.
Reversed and remanded.
