
567 F.3d 1003 (2009)
UNITED STATES of America, Plaintiff,
State of Missouri, Plaintiff-Appellant,
v.
METROPOLITAN ST. LOUIS SEWER DISTRICT, Defendant-Appellee,
Missouri Coalition for the Environment Foundation; Missouri Industrial Energy Consumers, Intervenors. *1004 
Metropolitan St. Louis Sewer District, Counter Claimant-Appellee,
v.
State of Missouri, Counter Defendant-Appellant.
No. 08-3399.
United States Court of Appeals, Eighth Circuit.
Submitted: May 14, 2009.
Filed: June 9, 2009.
*1005 John K. McManus, AAG, argued, Matthew Barton Briesacher, AAG, Joseph P. Bendbeutel, Senior Chief Counsel, Office of Attorney General, on the brief, Jefferson City, MO, for appellant.
Thomas J. Grever, argued, Kansas City, MO, Terry J. Satterlee and David R, Erickson, Kansas City, MO; Robert F. Murray and John Gianoulakis, St. Louis, MO, on the brief, for appellee.
Before WOLLMAN, JOHN R. GIBSON, and MURPHY, Circuit Judges.
MURPHY, Circuit Judge.
The United States and the State of Missouri filed this enforcement action against the Metropolitan St. Louis Sewer District (District) under the Clean Water Act (Act), 33 U.S.C. § 1251 et seq. (2009). They seek federal civil penalties and injunctive relief to limit discharges of untreated wastewater and sewage by the District. The District raised several affirmative defenses claiming financial inability to comply with the Act's requirements and filed two counterclaims. The State then moved to strike the District's affirmative defenses and to dismiss its counterclaims, arguing that they were barred by sovereign immunity and the Eleventh Amendment. The district court[1] denied the motion and Missouri *1006 appeals, arguing that it did not waive its sovereign immunity by filing this action since the Act requires its participation. We affirm.
The District is responsible for wastewater and stormwater management for approximately 1.4 million residential and commercial users in the St. Louis, Missouri area. On June 11, 2007, the United States and Missouri filed this enforcement action under federal law, alleging that from 2000 to 2005 the District allowed discharges of raw sewage from its sewer system in violation of the permits issued by the Missouri Department of Natural Resources. The complaint alleges that these discharges resulted from inadequate flow capacity in the collection system, poor maintenance, and improper connections between the sanitary sewer and stormwater systems.
Critical to this appeal is § 309(e) of the Clean Water Act, 33 U.S.C. § 1319(e), which states:
Whenever a municipality is a party to a civil action brought by the United States under this section, the State in which such municipality is located shall be joined as a party. Such State shall be liable for payment of any judgment, or any expenses incurred as a result of complying with any judgment, entered against the municipality in such action to the extent that the laws of that state prevent the municipality from raising revenues needed to comply with such judgment.
The District argues that the Missouri Constitution limits its authority as a political subdivision to levy taxes and otherwise raise the revenues that it would need to comply with any judgment in this case. See Mo. Const. art. X, §§ 16-24. In its first counterclaim the District alleges that Missouri must indemnify it under § 309(e) for the costs of complying with any adverse judgment. The District's second counterclaim seeks essentially the same relief on equitable rather than statutory grounds.
The State moved to dismiss the District's counterclaims and strike the related affirmative defenses, arguing that both were barred by its sovereign immunity. The State contends that it did not waive its immunity by joining the federal action because it was compelled to do so by § 309(e). It pointed out that it had not added any state law claims to the complaint. The district court concluded that the State had waived its sovereign immunity by initiating the action as one of the plaintiffs and denied the motion to dismiss. A district court's decision denying sovereign immunity is immediately appealable, see Murphy v. Arkansas, 127 F.3d 750, 754 (8th Cir.1997), and our review is de novo, Skelton v. Henry, 390 F.3d 614, 617 (8th Cir.2004).
The Eleventh Amendment[2] provides states with immunity from suit by private citizens in federal court seeking "retroactive relief for violations of federal law that would require payment of funds from a state treasury." Id. The amendment does not automatically divest the federal court of original jurisdiction  a state must raise the defense. Wisc. Dep't of Corr. v. Schacht, 524 U.S. 381, 389, 118 S.Ct. 2047, 141 L.Ed.2d 364 (1998). Conversely, a state can waive the defense by voluntarily invoking federal jurisdiction. See Gunter v. Atl. Coast Line R. Co., 200 *1007 U.S. 273, 284, 26 S.Ct. 252, 50 L.Ed. 477 (1906); Clark v. Barnard, 108 U.S. 436, 447, 2 S.Ct. 878, 27 L.Ed. 780 (1883).
In Lapides v. Board of Regents of University System of Georgia, 535 U.S. 613, 620, 122 S.Ct. 1640, 152 L.Ed.2d 806 (2002), the Supreme Court concluded that a state defendant had voluntarily invoked federal jurisdiction by participating in a removal action and therefore waived its Eleventh Amendment protection. The Court explained that the defense of sovereign immunity must be waivable in litigation because of the "judicial need to avoid inconsistency, anomaly, and unfairness" that would arise if states could selectively invoke immunity to obtain litigation advantages. Id. When determining whether a state has clearly indicated its intent to waive immunity, a court should focus on the "litigation act the State takes that creates the waiver," not its motives for those acts. Id.
In addition to joining in the removal of a case to federal court, a state can also waive its immunity by filing a federal complaint, Skelton, 390 F.3d at 618, or a proof of claim in a bankruptcy action. Ga. Dep't of Rev. v. Burke, 146 F.3d 1313, 1319-20 (11th Cir.1998). In contrast, a state does not waive its immunity by entering a general appearance or by defending a case in federal court so long as it asserts its Eleventh Amendment sovereign immunity defense in a timely manner. Union Elec. Co. v. Mo. Dep't of Conservation, 366 F.3d 655, 659-60 (8th Cir.2004). A state may even file a counterclaim and third party complaint at the same time it asserts sovereign immunity without waiving the defense. Skelton, 390 F.3d at 618.
Missouri contends that § 309(e) compels it to become a party by providing that it be joined in any action in which one of its municipalities is a party. Its decision to align as a plaintiff should therefore not be seen as a voluntary waiver of sovereign immunity. The State also argues that it has not taken any other litigation actions to date that affirmatively invoke the court's jurisdiction. The parties do not cite, and we have not found, any other decision addressing the effect of § 309(e) on a state's sovereign immunity. Section 309(e) holds the state liable if it is found that its laws impair the ability of a municipality to comply with the Clean Water Act, but it compels the state to become a party regardless of its potential liability and does not specify how a state should be aligned. In United States v. Metropolitan St. Louis Sewer District, 952 F.2d 1040, 1043-44 (8th Cir.1992), we noted that while the state may normally be named as a defendant, the statute does not require that. See also United States v. City of Joliet, No. 86-2512, 1986 WL 6908, 1986 U.S. Dist. LEXIS 24546 (N.D. Ill. June 5, 1986) (McGarr, J.) (based on its interest in enforcing clean water laws Illinois could realign as a plaintiff even though the United States joined it as a defendant).
We conclude that by choosing to proceed in this action as a plaintiff the State of Missouri waived its immunity. The filing of a complaint in a federal district court is the quintessential means of invoking its jurisdiction. There is no indication in the record that Missouri was reluctant to proceed as coplaintiff since it participated in filing the original complaint with the United States rather than being forcibly joined in the litigation at a later time. The complaint states that Missouri filed the enforcement action "at the request and on behalf of the Missouri Department of Natural Resources," the state agency responsible for enforcement of state laws that implement the Act. The asserted interest in enforcement suggests that the State was not participating as a plaintiff solely to pay any judgment that might be entered under § 309(e) against the District. Moreover, the State has also participated in the development *1008 of a joint proposed scheduling plan for the litigants. That plan has allocated 50 interrogatories and 15 depositions to the State and preserved its ability to call expert witnesses if it chooses. This scheduling plan suggests that the State anticipates an active role as coplaintiff rather than passively waiting for the United States to seek indemnification from it under § 309(e).
Though Missouri did not add any state law claims to those brought by the United States, the fact is that it affirmatively joined in asserting the federal claims. As a result the State will be entitled to participate in negotiating and enforcing any judgment or consent decree entered against the District. Were the State to assert the defense of sovereign immunity against the District's counterclaims while exercising the rights of a plaintiff, we would be condoning the selective invocation of immunity that the Supreme Court recognized as unfair in Lapides. See also Skelton, 390 F.3d at 618.
Section 309(e) undoubtedly compels a state to become a party in federal court, but it does not compel the state to take any action that would waive its sovereign immunity. A state required to join a federal enforcement action under § 309(e) can preserve its potential sovereign immunity defense by aligning as a defendant and taking no other actions inconsistent with the assertion of sovereign immunity. It is well established that defendants may take certain litigation actions such as filing a counterclaim or third party complaint and defending a suit on the merits without waiving sovereign immunity so long as that defense is asserted. See Skelton, 390 F.3d at 618.
Missouri asserts that requiring it to join as a defendant to preserve its sovereign immunity defense is inconsistent with the Eleventh Amendment's purpose of preserving the dignity of states as sovereign entities. See Fed. Mar. Comm'n v. S.C. State Ports Auth., 535 U.S. 743, 760, 122 S.Ct. 1864, 152 L.Ed.2d 962 (2002). The State explains that it chose the party designation of plaintiff to avoid the ignominy of being named as a defendant when it is not responsible for the District's alleged Clean Water Act violations.[3] While the Eleventh Amendment addresses the particular indignity that is suffered when the state is "summoned as defendant[ ] to answer the complaints of private persons," id. (quoting Alden v. Maine, 527 U.S. 706, 748, 119 S.Ct. 2240, 144 L.Ed.2d 636 (1999)), it does not protect states against any indignity caused by appearing as a defendant in an enforcement action brought by the United States. Missouri's concern about being "tarred with the same brush" as the District if it were joined as a defendant may have some validity in the public eye, but a state's motive for taking certain litigation actions "cannot make [a] critical difference" because "[m]otives are difficult to evaluate, while jurisdictional rules should be clear." Lapides, 535 U.S. at 621, 122 S.Ct. 1640.
Should the District prevail on its counterclaims, the financial impact on the State is unlikely to exceed its liability to the United States under § 309(e). The District's counterclaims seek to hold the state liable for the costs of complying with any judgment entered in this case. They essentially mirror the language in § 309(e) defining the scope of liability. The counterclaims also track the requirement in § 309(e) that Missouri is liable only if its *1009 laws are found to have prevented the District from raising sufficient funds for compliance. Compare 33 U.S.C. § 1319(e) with Def.'s Answer, Countercl. ¶¶ 13, 16. In sum, we agree with the district court that the State of Missouri waived its Eleventh Amendment immunity by filing an enforcement action alongside the United States in federal district court.
Accordingly, the district court's order denying the motion of the State of Missouri to strike the District's affirmative defenses and dismiss its counterclaims is affirmed.
NOTES
[1]  The Honorable Carol E. Jackson, Chief Judge, United States District Court for the Eastern District of Missouri.
[2]  "The Judicial power of the United States shall not be construed to extend to any suit in law or equity, commenced or prosecuted against one of the United States by Citizens of another State, or by Citizens or Subjects of any Foreign State." U.S. Const. amend. XI.
[3]  At oral argument, the State explained that concerns about public perception alone influenced its choice to join as a plaintiff. It conceded that joining as a defendant would not have any different financial consequences than would joining as a plaintiff.
