
530 So.2d 301 (1988)
HOLDING ELECTRIC, INC., Petitioner,
v.
Linda M. ROBERTS, Respondent.
No. 71387.
Supreme Court of Florida.
September 8, 1988.
John W. Conlin, Marathon, for petitioner.
W. Wyndham Geyer, Jr. of Ruden, Barnett, McClosky, Smith, Schuster & Russell, Fort Lauderdale, for respondent.
Ronald P. Gossett of Bossett, McDonald, Gossett & Crawford, P.A., Hollywood, amicus curiae for American Subcontractors Ass'n of Florida, Inc.
OVERTON, Justice.
This is a petition to review Holding Electric, Inc. v. Roberts, 512 So.2d 1112 (Fla. 3d DCA 1987), in which the district court certified direct conflict with McMahan Construction Co. v. Carol's Care Center, Inc., 460 So.2d 1001 (Fla. 5th DCA 1984). We have jurisdiction. Art. V, § 3(b)(4), Fla. Const.
The issue concerns a contractor's failure to serve an affidavit stating that all bills have been paid, in accordance with the *302 provisions of section 713.06(3). Florida Statutes (1985), prior to commencing a mechanic's lien foreclosure action. We must resolve whether the failure to deliver the affidavit is a fatal jurisdictional defect, or whether the failure may be corrected by delivering the affidavit prior to filing an amended complaint. For the reasons expressed, we hold that an amended complaint may be filed to show delivery of the contractor's affidavit, provided the statute of limitations has not run prior to the filing of the amended complaint.
The pertinent facts reflect that petitioner, Holding Electric, Inc., entered into a standard form owner-contractor agreement with Bonefish Yacht Club to install electrical systems in a condominium complex owned and developed by Bonefish. On July 1, 1985, following a payment dispute, the petitioner filed a lien in the public records against the development property for $9,500, the balance due under the contract. To correct an inadequate legal description, the petitioner filed a second lien on August 29, 1985.
In December, 1985, the petitioner filed a complaint seeking to foreclose the mechanic's lien. Bonefish moved to dismiss, alleging that petitioner failed to comply with section 713.06(3)(d)1, Florida Statutes (1985), which states:
(d) When the final payment under a direct contract becomes due the contractor:
1. The contractor shall give to the owner an affidavit stating, if that be the fact, that all lienors under his direct contract have been paid in full or, if the fact be otherwise, showing the name of each lienor who has not been paid in full and the amount due or to become due each for labor, services, or materials furnished. The contractor shall have no lien or right of action against the owner for labor, services, or materials furnished under the direct contract while in default for not giving the owner the affidavit. The contractor shall execute the affidavit and deliver it to the owner at least 5 days before instituting an action as a prerequisite to the institution of any action to enforce his lien under this chapter, even if the final payment has not become due because the contract is terminated for a reason other than completion and regardless of whether the contractor has any lienors working under him or not.
In response, the petitioner, on January 23, 1986, moved to amend the complaint, claiming that through inadvertence the affidavit had not been filed, but asserting in the motion that an affidavit had been delivered to the Bonefish Yacht Club on January 20, 1986, stating that "all persons, laborers, materialmen and other possible lienholders under its contract or supervision have been paid in full." The trial court, on February 6, 1986, granted, in the words of the order, petitioner's "Motion to Amend a Complaint for Foreclosure of Mechanic's Lien filed by the Plaintiff so as to allow the Plaintiff to plead delivery of an Affidavit of Contractor." On June 26, 1986, petitioner moved to amend the complaint to add the respondent, Linda Roberts, as an indispensable and necessary party since she had purchased a condominium unit on November 8, 1985, from Bonefish Yacht Club. That motion was granted on June 30, 1986, which was within the limitation period of one year from the recording of the first claim of lien. § 713.22(1), Fla. Stat. (1985). The respondent, Roberts, in October, 1986, moved to dismiss the complaint on grounds that the petitioner had failed to deliver a contractor's affidavit at least five days before instituting the action to foreclose the mechanic's lien. The trial court granted the motion with prejudice.
On appeal, the Third District Court of Appeal affirmed, concluding it was bound by its prior decision in Mardan Kitchen Cabinets, Inc. v. Burns, 312 So.2d 769 (Fla. 3d DCA 1975). In Mardan, the contractor recorded a lien on the owner's property and filed a complaint for foreclosure. The owner answered and the matter proceeded to trial. Three days before the final hearing, the contractor mailed to the owner, for the first time, the affidavits showing the amounts owed to unpaid lienors and payment to all other lienors. The owner then moved to dismiss the complaint for noncompliance with section 713.06(3)(d)1. *303 The trial court denied the contractor's motion to amend and granted the owner's motion to dismiss. The district court affirmed, holding the trial court "was correct in denying the motion to amend and in dismissing the complaint without prejudice since neither the complaint alone nor with the amendment added to it, could present a valid action for mechanic's lien foreclosure." Id. at 770. Continuing, the court stated, the "proposed amendment to add the allegation that an affidavit had been supplied was futile since the affidavit was not timely." Id.
In McMahan Construction Co. v. Carol's Care Center, Inc., 460 So.2d 1001 (Fla. 5th DCA 1984), the Fifth District Court of Appeal, in a similar situation, refused to apply the Mardan decision and held that "the filing of the affidavit belatedly was not fatal to the mechanic lien foreclosure." Id. at 1004. In so holding, the Fifth District followed its own decision in Askew v. County of Volusia, 450 So.2d 233 (Fla. 5th DCA 1984), which held that the statutory notice required by the sovereign immunity statute could be given after the suit was filed.
In the instant case, the trial court dismissed the second amended complaint without leave to amend after previously expressly allowing the petitioner to amend the complaint to plead delivery of the affidavit. This ruling had a substantial adverse effect on the petitioner since, had the motion to amend been denied in January, 1986, petitioner would have had sufficient time to file a new complaint within the statute of limitations period. Further, petitioner argues the amendment did not prejudice the respondent, and that delivery of the affidavit five days prior to filing the first amended complaint, clearly within the statute of limitations period, cured the original defect. On the other hand, the respondent contends that failure to serve the contractor's affidavit prior to filing suit, as required by the statute, is a jurisdictional defect which mandates dismissal of the action.
Under these circumstances, we find the petitioner should be allowed to continue the action. We hold that delivery of the contractor's affidavit is not jurisdictional, although it is a prerequisite to maintaining the action and must be completed within the statutory limitation period. Our holding is consistent with the Fifth District Court of Appeal's decision in McMahon Construction Co. and in accordance with the principles set forth in Commercial Carrier Corp. v. Indian River County, 371 So.2d 1010 (Fla. 1979). In Commercial Carrier, we addressed the plaintiff's failure to give timely notice to the Florida Department of Insurance and the trial court's dismissal of the pleadings with prejudice because of that failure. We allowed plaintiff to correct the defect with an amended complaint, characterizing compliance with the notice provision as "clearly a condition precedent to maintaining a suit," but concluded that the trial judge should have granted the parties leave to amend. Id. at 1022-23. The Fifth District followed that decision in Askew v. County of Volusia.
The clear purpose of section 713.06(3)(d)1 is to protect the owner against the risk of having to pay for the same services or materials more than once, and to allow the owner an opportunity to make proper payment before suit is filed. We note that a contractor who fails to give the required affidavit prior to instituting the lien foreclosure suit should be subject to attorney's fees for that portion of the action attributable to his failure to comply with the statute, irrespective of what occurs in the rest of the lawsuit. Prior to Roberts' becoming a party defendant in this action by reason of her subsequent purchase of a condominium from Bonefish Yacht Club, proper affidavits had been given and were part of the proceedings. We note that when respondent purchased the property, she had constructive notice of the two recorded liens filed by the petitioner. Although the statute is a condition precedent to maintaining a lien foreclosure suit, it is not jurisdictional, and the trial court has the authority to allow a plaintiff to amend provided the notice is given within the appropriate statute of limitations period.
Accordingly, we quash the decision of the Third District in the instant case, with directions to the district court to remand *304 for further proceedings consistent with this opinion. We approve the Fifth District Court of Appeal's decision in McMahan Construction Co., but decline to expressly disapprove the result in Mardan because the factual circumstances are distinguishable from those presented in the instant case.
It is so ordered.
McDONALD, SHAW, BARKETT, GRIMES and KOGAN, JJ., concur.
EHRLICH, C.J., concurs in part and dissents in part with an opinion.
EHRLICH, Chief Justice, concurring in part and dissenting in part.
While I agree with the result reached in the Court's opinion, I take exception to that portion of the Court's opinion which states, "We note that a contractor who fails to give the required affidavit prior to instituting the lien foreclosure suit should be subject to attorney's fees for that portion of the action attributable to his failure to comply with the statute, irrespective of what occurs in the rest of the law suit."
We are dealing with a statutory cause of action and the statute does not provide for the awarding of an attorney's fee under the facts of the case. In my opinion, this is judicial legislation. While the awarding of an attorney's fee under these circumstances may well be in order, that decision rests with the legislature.
