
788 So.2d 161 (2000)
Ex parte The UNIVERSITY OF SOUTH ALABAMA FOUNDATION et al.
(Re Franklin Primary Health Center, Inc. v. PrimeHealth, Inc., et al.)
1992108.
Supreme Court of Alabama.
December 15, 2000.
David A. McDonald, Mobile; and Vincent F. Kilborn III of Kilborn & Roebuck, Mobile, for petitioners.
Sidney W. Jackson III and Stephen L. Klimjack of Jackson, Taylor, Martino & Hedge, P.C., Mobile, for respondent.
MADDOX, Justice.
This petition for the writ of mandamus presents a single question: Did the trial court err in failing to dismiss, or to stay proceedings on, a claim, based on the ground that a case pending in a federal *162 district court presented the same cause of action against the same party? Section 6-5-440, Ala.Code 1975, provides, in part, that "[n]o plaintiff is entitled to prosecute two actions in the courts of this state at the same time for the same cause and against the same party." We conclude that the trial court should have stayed proceedings in the pending action; therefore, the petition for the writ of mandamus is granted, and the trial court is directed to stay the proceedings.

Facts
PrimeHealth, Inc., The University of South Alabama Foundation (the "Foundation"), and Frederick P. Whiddon (collectively, the "petitioners"), are defendants in an action pending in the Mobile Circuit Court.[1] PrimeHealth and the Foundation are also plaintiffs in a related action pending in the United States District Court for the Middle District of Alabama. See University of South Alabama Found. et al. v. W. Dale Walley et al. (No. 99-D-1287-N) (M.D.Ala.2000). The petitioners seek a writ of mandamus directing Mobile Circuit Judge James C. Wood to dismiss the action pending in the Mobile Circuit Court, on the ground that its prosecution violates the provisions of § 6-5-440. Alternatively, they seek to compel the trial court to stay proceedings in that action until the action in the federal district court is concluded.
The Foundation is a nonprofit corporation created to provide support for the University of South Alabama. Prime-Health is a wholly owned subsidiary of the Foundation and is also a nonprofit corporation. Franklin Primary Health Center, Inc. ("Franklin"), is a Federally Qualified Health Center ("FQHC") that provides medical treatment and care to Medicaid patients and other underprivileged patients.
In January 1997, PrimeHealth entered into an agreement (the "BAY Health Plan") with The Alabama Medicaid Agency ("The Agency") whereby PrimeHealth acted as a Health Maintenance Organization ("HMO") for The Agency relating to all physicians and FQHC's in Mobile County. On November 1, 1997, Franklin and PrimeHealth entered into a provider agreement whereby Franklin operated under the BAY Health Plan as an FQHC and provided services to Medicaid patients in Mobile County. Under the provider agreement and the BAY Health Plan, Franklin provided medical services and then submitted claims directly to PrimeHealth for payment or reimbursement for those services. In turn, PrimeHealth submitted copies of the claims directly to The Agency.
On September 29, 1999, the Foundation and PrimeHealth filed an action in the Montgomery Circuit Court against W. Dale Walley, in his official capacity as acting commissioner of The Agency; The Agency; and the Federal Insurance Company, alleging a breach of the BAY Health Plan and seeking a declaratory judgment. That action was subsequently removed to the United States District Court for the Middle District of Alabama, by The Agency, pursuant to the procedures set forth in 28 U.S.C. § 1141(b). The Agency asserted federal-question jurisdiction under 28 U.S.C. § 1331 because the Foundation and PrimeHealth's complaint alleged violations of Title XIX of the Social Security Act (42 U.S.C. § 1396(a)).
Franklin sought to intervene, under Rule 24(a)(2), Ala.R. Civ.P., as a defendant *163 in that action, stating in its motion to intervene:
"1. That [Franklin] is owed payment in the form of reimbursement for outstanding claims not paid to it by PrimeHealth, Inc. as they operate under the product name BAY Health Plan in Mobile County, Alabama.
"2. [Franklin] is entitled to payment from PrimeHealth, Inc. as it serves as a primary care provider for Medicaid patients and BAY Health Plan patients in Mobile County, Alabama.
"3. That [Franklin] is entitled to reimbursement from any bond money paid to Plaintiffs, PrimeHealth, Inc. and The University of South Alabama Foundation, for the amount of claims submitted prior to this action for services and medical treatment provided by Petitioner.
"4. That [Franklin] is entitled under the terms of its contract with PrimeHealth, Inc. through [the] BAY Health Plan to terminate such contract effective October 1, 1999.
". . . .
"6. That [Franklin] desires to actively participate in the trial of this cause."
The Foundation and PrimeHealth consented to Franklin's intervention, and the federal district court granted Franklin leave to intervene.
On January 7, 2000, PrimeHealth, acting pursuant to § 6-6-220 et seq., Ala.Code 1975, filed what it styled a "counterclaim" for a declaratory judgment against Franklin, asking the court to determine all the rights, duties, and obligations between PrimeHealth and Franklin arising from their provider agreement. Franklin later moved to dismiss its petition for intervention, but the federal district court denied that motion because PrimeHealth's "counterclaim" had already been filed against Franklin. See Rule 41(a)(2) and (c), Fed. R.Civ.P.
Approximately two months after Franklin had intervened in the action pending in the federal district court, Franklin filed this action in the Mobile Circuit Court against the petitioners and various fictitiously named defendants. Franklin asserted claims alleging breach of the BAY Health Plan and provider agreement, fraud, and defamation; alleging civil RICO liability; and alleging conspiracy. In response, the petitioners filed a "Motion to Dismiss Based on a Prior Suit Pending." See § 6-5-440, Ala.Code 1975. The trial court denied that motion. The mandamus petition asks this Court to direct the Mobile Circuit Court to dismiss the action, based on § 6-5-440, or, alternatively, to order a stay of proceedings until the case in the federal district court is concluded.

Analysis
We first set out the law that governs our review of the petition. The writ of mandamus is an extraordinary remedy, and one seeking it must show (1) a clear legal right to the order sought; (2) an imperative duty upon the respondent to perform, accompanied by a refusal to do so; (3) the lack of another remedy; and (4) properly invoked jurisdiction of the court. Ex parte Compass Bank, 686 So.2d 1135, 1137 (Ala.1996). A writ of mandamus will issue only to compel the exercise of a trial court's discretion; it will not issue to control or to review a court's exercise of its discretion unless an abuse of discretion is shown. Ex parte Breman Lake View Resort, L.P., 729 So.2d 849, 851 (Ala.1999), citing Ex parte Auto-Owners Ins. Co., 548 So.2d 1029 (Ala.1989).
The petitioners argue that they have a clear legal right to have the Mobile Circuit Court action dismissed, or, at least, to have proceedings in that action stayed until the action pending in the federal district court is concluded. They point out *164 that § 6-5-440 prohibits a party from maintaining "two actions in the courts of this state at the same time for the same cause and against the same party."
On the other hand, Franklin contends that its claims in the action pending in the federal district court are simply claims to recover a portion of money due from The Agency and that its claims in the state action are "more inclusive [than those presented in the federal action] and seek recovery [based on] additional claims and [additional] parties." Based on this argument, Franklin asserts that its claims in the circuit-court action are not prohibited by the provisions of § 6-5-440i.e., it argues that the state-court action and the federal-court action present different causes of action.
The petitioners counter by arguing that although the state-court action involves an additional defendant (Dr. Whiddon) and additional claims for relief (fraud, fraudulent suppression, defamation, and conspiracy), it is still based on the same BAY Health Plan and provider agreement as the claims in University of South Alabama Foundation et al. v. W. Dale Walley et al., supra, pending in the federal district court; therefore, the petitioners argue, to allow Franklin to maintain this action in the Mobile Circuit Court violates § 6-5-440.
This Court has given this construction of § 6-5-440:
"The phrase `courts of this state,' as used in § 6-5-440, includes all federal courts located in Alabama. This Court has consistently refused to allow a person to prosecute an action in a state court while another action on the same cause and against the same parties is pending in a federal court in this State. That principle has been applied where, as in the instant case, the separate actions involved both common law theories of recovery and theories of recovery peculiar to federal law. The rationale behind the application of the prohibition against splitting a cause of action in such cases is based on the recognition that federal law theories and state law theories are often parallel grounds for relief as to the same wrongful acts or disputes."
Weaver v. Hood, 577 So.2d 440, 442 (Ala. 1991) (citations omitted). Furthermore, in Ex Parte Breman Lake View Resort, L.P., 729 So.2d 849 (Ala.1999), this Court explained:
"This Court has held that the obligation imposed on a defendant under Rule 13(a), Ala.R.Civ.P., to assert compulsory counterclaims, when read in conjunction with § 6-5-440, Ala.Code 1975, which prohibits a party from prosecuting two actions for the same cause and against the same party, is tantamount to making the defendant with a compulsory counterclaim in the first action a `plaintiff in that action (for purposes of § 6-5-440) as of the time of its commencement. Thus, the defendant subject to the counterclaim rule who commences another action has violated the prohibition in § 6-5-440 against maintaining two actions for the same cause. We affirm the general rule in these cases; to do otherwise would invite waste of scarce judicial resources and promote piecemeal litigation."
729 So.2d at 851. (Citations omitted.) We conclude that the principles discussed in Weaver and Breman apply to the situation presented by this petition.
In its "counterclaim" filed against Franklin in the action pending in the federal district court, PrimeHealth seeks a declaratory judgment regarding the rights, duties, and obligations of the parties under their provider agreement. Franklin's claims against the petitioners in this statecourt action are based on the same provider *165 agreement and involve the same fact situation as PrimeHealth's "counterclaim" against Franklin in the action pending in the federal district court. Although Dr. Whiddon is not a party to the action pending in the federal district court, we note that he is being sued by Franklin in this action in his official capacity as the managing director of the Foundation. Therefore, the parties in the two actions are the same, for purposes of applying the provisions of § 6-5-440. Cf. Ex parte Butts, 775 So.2d 173, 177 (Ala.2000) ("A complaint seeking money damages against a State employee in his or her official capacity is considered a complaint against the State...."). Consequently, Franklin's claims against the petitioners in this action are subject to the counterclaim rule explained in Breman. See Ex Parte Parsons & Whittemore Alabama Pine Constr. Corp., 658 So.2d 414 (Ala.1995) (holding that the plaintiff's prosecution in a subsequent action of claims that had been compulsory counterclaims in the previous declaratoryjudgment action violated § 6-5-440). Because Franklin is subject to the counterclaim rule, and because Franklin has commenced another action in a state court, it has violated the prohibition in § 6-5-440 against maintaining two actions for the same cause in two different courts.
Although we have held that Franklin's filing of this action in the Mobile Circuit Court violates the prohibition set out in § 6-6-440, we must determine if Franklin may nevertheless pursue this action based on the limited exception to the rule of § 6-5-440, set out by this Court in Terrell v. City of Bessemer, 406 So.2d 337 (Ala.1981).
In Terrell, this Court recognized a limited exception to the general rule against prosecuting the same cause of action in two different courts, noting that where a single wrongful act gives rise to both a state cause of action and a federal cause of action, the plaintiff may include his statelaw claim with his federal claim and request the court to exercise its power of pendent jurisdiction to hear both claims. Terrell, 406 So.2d at 339-40. The plaintiff in Terrell included his state-law claims with his federal-law claims; however, the federal district court refused to exercise its discretionary power of pendent jurisdiction. This Court concluded that in a situation where the plaintiff has combined state-law claims with federal claims in an action filed in a federal court and the federal court declines to exercise its discretionary power of pendent jurisdiction over the state-law claims, the plaintiff "should be afforded an opportunity to pursue his alleged common law theories of recovery in state court." 406 So.2d at 339.
Based on the foregoing, and specifically on the authority of Terrell, Franklin would be entitled to pursue its common-law claims in this action only if the federal district court has refused or refuses to exercise its pendent jurisdiction over those claims. Because Franklin has not asserted its common-law claims in the action pending in the federal district court, thereby allowing the federal district court an opportunity to exercise its pendent jurisdiction, the Mobile Circuit Court abused its discretion in refusing either to dismiss this action or to stay proceedings in it until the federal district court has had an opportunity to exercise its pendent jurisdiction.
We are presented with two options: (1) to direct the Mobile Circuit Court to dismiss Franklin's action or (2) to direct it to stay proceedings in the state-court action in order to allow Franklin to assert its common-law claims in the federal district court. We believe this second option is more appropriate under the circumstances.
Based on the circumstances of this case and given its procedural posture, we grant the petition for the writ of mandamus. *166 The Mobile Circuit Court is directed to stay proceedings in the pending state action and to allow Franklin to assert its common-law claims in the action pending in the federal district court. If the federal district court declines to exercise its pendent jurisdiction over Franklin's common-law claims, then the Mobile Circuit Court will be authorized to lift the stay and allow the action to proceed.
PETITION GRANTED; WRIT ISSUED.
HOOPER, C.J., and COOK, LYONS, and JOHNSTONE, JJ., concur.
NOTES
[1]  Frederick P. Whiddon is being sued in his official capacity as the managing director of The University of South Alabama Foundation.
