
803 So.2d 744 (2001)
Carol BASSETTE, Appellant,
v.
STANDARD FIRE INSURANCE COMPANY, Appellee.
No. 2D00-2836.
District Court of Appeal of Florida, Second District.
July 6, 2001.
Rehearing Denied August 27, 2001.
George A. Vaka of Vaka, Larson & Johnson, P.L., Tampa, for Appellant.
Kelly Kathleen Gray of Law Offices of Charles E. McKeon, P.A., Tampa, for Appellee.
SCHEB, JOHN M., (Senior) Judge.
The appellant, Carol Bassette, sued the appellee, Standard Fire Insurance Company, claiming uninsured motorist benefits under two policies. During the litigation a dispute arose between them as to whether Ms. Bassette was required to execute broad authorizations for Standard Fire to secure her medical records. The matter was resolved in Ms. Bassette's favor in a declaratory judgment action. However, *745 the trial court denied her motion to require Standard Fire to pay her attorney's fees in that action. Because the insurer, Standard Fire, engendered a dispute concerning Ms. Bassette's uninsured motorist benefits in which it threatened a denial of coverage, we hold that Ms. Bassette, the insured, is entitled to recover attorney's fees. We reverse the trial court's order to the contrary.
In March 1995 Ms. Bassette suffered injuries as a result of an auto accident when a vehicle owned by William Miles and operated by his wife, Alice Miles, struck the vehicle in which Ms. Bassette was a passenger. In February 1999 Ms. Bassette filed suit to recover damages for her personal injuries. She joined Standard Fire, seeking to recover uninsured motorist benefits under two policies. Before and during the litigation, Standard Fire requested Ms. Bassette to produce medical records from her numerous prior health care providers and to execute medical authorizations allowing Standard Fire to obtain her medical records and confer with her present health care providers. When Standard Fire advised that the terms of the insurance policies required Ms. Bassette to sign the authorizations, she filed timely objections and took the position that the requested authorizations would allow Standard Fire to have ex parte communications with her treating psychiatrists, psychologists, and other health care providers. Standard Fire continued to insist that Ms. Bassette sign the requested authorizations, warning her counsel that her failure to cooperate as requested "may result in a denial of coverage" under the auto insurance policies it issued.
The issue reached an impasse. On July 9, 1999, Ms. Bassette filed suit against Standard Fire, seeking a declaratory judgment. She posited that during litigation she could not be compelled to execute any authorization that would lead to ex parte contact by Standard Fire with her health care providers. She contended that once she filed suit, she was not required to execute the requested medical authorizations because the Florida Rules of Civil Procedure concerning discovery, not the terms of the insurance contracts, governed. She also sought to recover attorney's fees and costs.
In seeking a stay, Standard Fire acknowledged that Ms. Bassette's complaint involved a "declaration directly involving issues of coverage under the uninsured/underinsured portion of the policy." In its response to her complaint, Standard Fire filed a memorandum stating that its attorney had sent letters to Ms. Bassette's lawyer attempting to clarify that the requests which it made were pursuant to policy requirements and that compliance with those requests was a condition of coverage. It argued that the cooperation clause in its policies was valid and enforceable and required an insured to execute the requested authorizations. Of significance, Standard Fire contended that initiation of the suit for uninsured motorist benefits under the policies did not bar it from obtaining the medical records it requested. Finally, Standard Fire pointed out that although it was not asserting a coverage defense at the time, it would not waive its right to assert a coverage defense in the future.
The trial court consolidated Ms. Bassette's complaint for a declaratory judgment with her underlying personal injury/uninsured motorist coverage suit. The court subsequently granted Ms. Bassette's motion for summary judgment solely on the ground that the Florida Rules of Civil Procedure governed any discovery in the uninsured motorist action postsuit. The court awarded Ms. Bassette costs as the *746 prevailing party in the litigation. Standard Fire did not appeal this judgment.
Ms. Bassette timely moved to recover attorney's fees, asserting an entitlement under sections 627.428(1) and 627.727(8), Florida Statutes (1999). Standard Fire opposed the motion on the ground that it had not denied coverage under its policies. Although the trial court recognized that Standard Fire did dispute the insured's duty under the cooperation clause of the policies, the trial court denied the motion for attorney's fees, finding that there was no evidence that Standard Fire had denied coverage.
We focus on the issue of whether the dispute that culminated in a declaratory judgment was sufficient to entitle Ms. Bassette to attorney's fees under sections 627.428(1) and 627.727(8).
Section 627.428(1) provides, in part:
Upon the rendition of a judgment or decree by any of the courts of this state against an insurer and in favor of any named or omnibus insured or the named beneficiary under a policy or contract executed by the insurer, the trial court or, in the event of an appeal in which the insured or beneficiary prevails, the appellate court shall adjudge or decree against the insurer and in favor of the insured or beneficiary a reasonable sum as fees or compensation for the insured's or beneficiary's attorney prosecuting the suit in which the recovery is had.
If a dispute is within the scope of section 627.428 and an insured must enforce rights under a contract and a judgment is rendered against the insurer, the insurer is required to pay attorney's fees to the insured or beneficiary. Bell v. U.S.B. Acquisition Co., 734 So.2d 403 (Fla. 1999). This applies when an insured prevails in a declaratory judgment action regarding coverage. Aetna Cas. & Sur. Co. v. Mills, 192 So.2d 59 (Fla. 3d DCA 1966). As we observed in Sanchez v. American Ambassador Casualty Co., 559 So.2d 344 (Fla. 2d DCA 1990), the purpose of section 627.428 is to penalize an insurance company for wrongfully causing its insured to resort to litigation in order to resolve a conflict with its insurer when it was within the company's power to resolve it.
Standard Fire obviously recognized that a dispute existed as it neither sought to dismiss the declaratory action nor appealed the trial court's judgment that the Florida Rules of Civil Procedure and Florida Statutes, not the policy provisions, control the discovery in litigation in uninsured motorist cases. Standard Fire, however, relies on section 627.727(8), which states: "The provisions of s. 627.428 do not apply to any action brought pursuant to this section against the uninsured motorist insurer unless there is a dispute over whether the policy provides coverage for an uninsured motorist proven to be liable for the accident."
Standard Fire characterizes the present litigation as a discovery dispute, not a dispute over coverage. In view of section 627.727(8), Ms. Bassette's right to recover attorney's fees for representation by her counsel in the declaratory action devolves into the issue of whether such a dispute involving coverage existed. True, Standard Fire did not actually deny coverage under the policies; however, Standard Fire informed Ms. Bassette that coverage could be denied if she refused to execute the required authorizations. Thus, we conclude that the declaratory action involved a dispute as to whether Ms. Bassette would be covered by the policya dispute that was finally resolved in Ms. Bassette's favor by the trial court's declaration that the Florida Rules of Civil Procedure, not the provisions of Standard Fire's policies, governed. At that point, *747 Ms. Bassette no longer suffered the looming threat that her failure to comply with Standard Fire's requests could place her coverage in jeopardy. We hold, therefore, that Ms. Bassette is entitled to recover her attorney's fees in the declaratory judgment action. We note that Ms. Bassette is entitled to attorney's fees only for that period of time during which coverage was at issue. See Moore v. Allstate Ins. Co., 570 So.2d 291 (Fla.1990).
Reversed and remanded for proceedings consistent with this opinion.
PATTERSON, A.C.J., and NORTHCUTT, J., Concur.
