
916 So.2d 40 (2005)
John M. O'DANIEL and Theresa Hills, Appellants,
v.
BOARD OF COMMISSIONERS OF MONROE COUNTY, Appellee.
No. 3D05-583.
District Court of Appeal of Florida, Third District.
December 7, 2005.
James S. Mattson, Key Largo, for appellants.
Morgan & Hendrick and Derek V. Howard, Key West, for appellee.
Before GERSTEN and GREEN, JJ., and SCHWARTZ, Senior Judge.
PER CURIAM.
This is an appeal from an order denying the appellant's motion for attorney's fees *41 pursuant to section 57.105, Florida Statutes (2003). We affirm.
Appellants brought an action against Monroe County to establish their rights to a 1983 building permit, and to require the County to allow the appellants to complete the construction of a structure. Following a trial on the merits, final judgment was entered in appellants' favor. Thereafter, appellants moved for attorney's fees pursuant to section 57.105. Monroe County moved to strike the motion for fees on procedural grounds. The trial court granted the County's motion to strike and this appeal followed.
Section 57.105 provides, in pertinent part, that:
(1) Upon the court's initiative or motion of any party, the court shall award a reasonable attorney's fee to be paid to the prevailing party in equal amounts by the losing party and the losing party's attorney on any claim or defense at any time during a civil proceeding or action in which the court finds that the losing party or the losing party's attorney knew or should have known that a claim or defense when initially presented to the court or at any time before trial:

(a) Was not supported by the material facts necessary to establish the claim or defense; or
(b) Would not be supported by the application of then-existing law to those material facts.
However, the losing party's attorney is not personally responsible if he or she has acted in good faith, based on the representations of his or her client as to the existence of those material facts. If the court awards attorney's fees to a claimant pursuant to this subsection, the court shall also award prejudgment interest.
* * *
(4) 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.
§ 57.105(1), (4), Fla. Stat. (2003)(emphasis added). Subsection four of the statute illustrates the legislature's intent to give a party an opportunity to retract a frivolous "paper, claim, defense, contention, allegation, or denial" before the opposing party can file a motion for section 57.105 fees.
Here, the motion for fees was served and filed following the conclusion of the trial on the merits. Thus, the appellee was never given an opportunity to retract or amend its defenses. Therefore, the motion for attorney's fees was untimely and properly stricken.
Accordingly, we affirm the order of the trial court. See Chase v. Cowart, 102 So.2d 147, 150 (Fla.1958)(result in trial court must be affirmed if right, even if right for wrong reason).
Affirmed.
