
639 So.2d 82 (1994)
STOUT JEWELERS, INC., Appellant,
v.
Milton H. CORSON, Jr., as Trustee of the Milton H. Corson Land Trust a/k/a The Corson Land Trust, Appellee.
Milton H. CORSON, Jr., as Trustee of the Milton H. Corson Land Trust a/k/a The Corson Land Trust, Appellant,
v.
STOUT JEWELERS, INC., Appellee.
Nos. 93-02328, 93-03328.
District Court of Appeal of Florida, Second District.
June 3, 1994.
Rehearing Denied July 21, 1994.
*83 Frederick A. Higham, Jr., of Devito & Higham, P.A., St. Petersburg, for Stout Jewelers, Inc.
Denis A. Cohrs and Terrence S. Buchert of Cohrs, McQueen & Ford, P.A., St. Petersburg, for Milton H. Corson, Jr.
LAZZARA, Judge.
In these consolidated appeals, both parties challenge the trial court's orders with regard to their motions for attorney's fees. We find merit only in the contention of Stout Jewelers, Inc., that the trial court erred in denying its motion. Accordingly, we reverse on that issue and remand for further proceedings.
Milton H. Corson, Jr., as trustee of the Corson Land Trust, leased commercial space to Stout. During the term of the lease, Stout sent written notification that it was terminating the lease and vacating the premises because of Corson's failure to provide it with a landlord lien waiver for financing purposes as required by the lease. After Stout left the premises, Corson sued it for non-payment of rent and abandonment and requested attorney's fees and costs.
Stout responded with an answer, affirmative defenses, and a counter-claim. The affirmative defenses and counter-claim were based on Corson's alleged breach of the lien waiver provision of the lease. Stout also requested attorney's fees and costs.
After a one-year period of non-record activity, Stout filed a motion to dismiss for failure to prosecute. Fla.R.Civ.P. 1.420(e). Corson responded with a statement of good cause why the case should remain pending. The trial court granted the motion and entered an order stating that "this case is dismissed for failure to prosecute."
Corson later filed a motion to dismiss the counter-claim for failure to prosecute. The trial court denied the motion as moot but in doing so clarified its earlier order of dismissal by noting that both the complaint and counter-claim were dismissed for failure to prosecute. Corson's motion, as well as the order of clarification, were unnecessary since the original order dismissing the case also dismissed the counter-claim. Hanson v. Poteet, 556 So.2d 828, 830 (Fla. 2d DCA 1990) (Rule 1.420(e) "authorizes the dismissal of an entire `action,' not the dismissal of specific claims or affirmative defenses.")
Both Corson and Stout filed motions for attorney's fees pursuant to the lease provision that states "[i]t is agreed that in the event one party to the lease brings suit against the other, the losing party will reimburse the prevailing party for reasonable and typical legal fees associated with said litigation." The trial court denied both motions without explanation.
The issue we confront is whether a defendant that has filed a counter-claim in a contract action, in which it then obtains an involuntary dismissal of the entire action for failure to prosecute, is a prevailing party entitled to an award of fees under rule 1.420(d) where the parties' contract provides for such an award. We hold that under these circumstances the defendant is entitled to an award of fees.
Rule 1.420(d) provides in pertinent part that "[c]osts in any action dismissed under this rule shall be assessed and judgment for costs entered in that action." In the context *84 of a plaintiff's voluntary dismissal of a case, Florida courts have consistently interpreted the rule as authorizing a trial court to award attorney's fees as costs to a defendant as the prevailing party when such an award is provided for either by statute or a contract between the parties. E.g., Stuart Plaza, Ltd. v. Atlantic Coast Dev. Corp. of Martin County, 493 So.2d 1136 (Fla. 4th DCA 1986). Since rule 1.420(d) contemplates both voluntary and involuntary dismissals, we see no reason why this interpretation should not be applied to a situation involving an involuntary dismissal of a plaintiff's case. Thus, based on the fee provision in the parties' lease, Stout was entitled to an award of fees as costs for successfully obtaining an involuntary dismissal of the case if it was the prevailing party.
We conclude that Stout was the prevailing party even though it did not succeed on its counter-claim. Florida recognizes the general rule that when there is a dismissal of a complaint and a counter-claim, the defendant is the prevailing party for purposes of an award of attorney's fees. Scutti v. Daniel E. Adache & Assoc. Architects, P.A., 515 So.2d 1023 (Fla. 4th DCA 1987), review denied, 528 So.2d 1183 (Fla. 1988). See also Winnie v. Buckhalter, 362 So.2d 1014 (Fla 1st DCA 1978) (defendant who successfully resisted mechanics' lien action but did not prevail on counter-claim entitled to an award of fees under mechanics' lien statute for services rendered incident to mechanics' lien aspect of case). As one court so aptly expressed, even if a plaintiff prevails on the counter-claim, "at most [it] will clearly win only a battle while still losing the war." McKelvey v. Kismet, Inc., 430 So.2d 919, 922 (Fla. 3d DCA), review denied, 440 So.2d 352 (Fla. 1983).
We, therefore, reverse the trial court's denial of Stout's motion for attorney's fees. However, consistent with Winnie, we conclude that Stout is only entitled to attorney's fees for the services rendered incident to Corson's claim for damages. Accordingly, we remand for a determination by the trial court of a reasonable fee for services rendered by Stout's attorney in connection with Corson's claim.
Affirmed in part, reversed in part, and remanded with directions.
SCHOONOVER, A.C.J., and QUINCE, J., concur.
