
388 So.2d 1268 (1980)
DOLPHIN TOWERS CONDOMINIUM ASSOCIATION, INC., a Florida Corporation Not for a Profit, Appellant,
v.
Donald J. DEL BENE and Virginia Del Bene, Appellees.
No. 80-1070.
District Court of Appeal of Florida, Second District.
September 17, 1980.
Rehearing Denied October 21, 1980.
Wayne C. Hall of Dickinson, O'Riorden, Gibbons, Quale, Shields & Carlton, Venice, for appellant.
Robert P. Rosin of Rosin, Abel, Band, Brown & Russell, Sarasota, for appellees.
HOBSON, Acting Chief Judge.
The issue of this appeal is whether, on voluntary dismissal of a unit owner's action against a condominium association, the condominium association becomes the prevailing party for purposes of an award of attorney fees under Section 718.303, Florida Statutes (1979). We answer in the affirmative, and reverse the circuit court's order denying the condominium association/defendant's motion for attorney fees.
Appellees, the Del Benes, are owners of a condominium unit in the Dolphin Towers Condominium. Appellant is the condominium association. Appellees sought declaratory relief and a mandatory injunction requiring *1269 the association to remove a redwood trellis and six trees from the recreational area of the condominium. The condominium association raised the affirmative defense of failure to join as an indispensable party the owner of the improvements that the Del Benes wished removed. It also counterclaimed for a reasonable attorney fee in the event that it was determined to be the prevailing party. The case proceeded to nonjury trial, which was continued because of insufficient time to complete the presentation of evidence. Subsequently the Del Benes voluntarily dismissed the action pursuant to Florida Rule of Civil Procedure 1.420(a)(1). The condominium association moved for an award of attorney fees as the prevailing party under Section 718.303(1). Following a hearing, the lower court denied the motion. The following day, the Del Benes filed a new action against the condominium association, which was the same as the first action except that the owners of the improvements were joined as party defendants.
Section 718.303(1), Florida Statutes (1979), provides that in an action by or against a condominium association, "the prevailing party is entitled to recover reasonable attorney's fees." The condominium association, defendant in the lower court, contends that when the Del Benes voluntarily dismissed their action, the association became the "prevailing party" within the meaning of Section 718.303(1) and was therefore entitled to an award of attorney fees. We agree.
Although there has been no judicial interpretation of the term "prevailing party" as used in Section 718.303(1), Florida courts have construed Section 713.29, Florida Statutes (1979), an analogous provision in the Mechanics' Lien Statute. That section provides in pertinent part:
In any action brought to enforce a lien, ... the prevailing party shall be entitled to recover a reasonable fee for the services of his attorney....
All courts which have construed the above section under facts similar to the instant case have held that where a mechanics' lien claim is voluntarily dismissed, the party against whom the claim was brought is the "prevailing party" and is entitled to recover attorney fees. Gordon v. Warren Heating & Air Conditioning, 340 So.2d 1234 (Fla. 4th DCA 1976); Marden Kitchen Cabinets, Inc. v. Bruns, 312 So.2d 769 (Fla. 3d DCA 1975); Jackson v. Hatch, 288 So.2d 564 (Fla. 2d DCA 1974); Lion Oil Company, Inc. v. Tamarac Lakes, Inc., 232 So.2d 20 (Fla. 4th DCA 1970). We hold that the term "prevailing party" in Section 718.303(1) of the Condominium Act should likewise be construed to include a defendant against whom a voluntary dismissal is taken.
Further, the fact that the Del Benes filed a new suit stating the same cause of action does not affect the condominium association's entitlement to attorney fees. The association incurred attorney fees in asserting what proved to be a meritorious affirmative defense, in preparing for trial, and in participation in a trial before the Del Benes voluntarily dismissed the suit. We believe that the legislature must have had this situation in mind, as well as those in which a defendant might prevail on the merits, when it provided for the allowance of attorney fees to the prevailing party.
Accordingly, the order appealed is reversed and the cause remanded for the purpose of holding a hearing directed to the award of attorney fees to the condominium association.
GRIMES and CAMPBELL, JJ., concur.
