
    LAWRENCE COUNTY, SOUTH DAKOTA, a Political Subdivision of the State of South Dakota; Robert Schultz, Boyd Larson, William G. Sleep, Gerald Apa and Roland Island, as Commissioners of Lawrence County, South Dakota; and Sherryl Flanagan as Auditor of Lawrence County, South Dakota, on behalf of themselves and all other counties similarly situated, Appellees, v. STATE OF SOUTH DAKOTA, Spearfish School District 40-2; Lead-Deadwood School District 40-1, Appellant. Meade School District 46-1; Black Hills Conservancy Subdistrict and Lawrence County Fire Protection District.
    No. 81-1619.
    United States Court of Appeals, Eighth Circuit.
    Submitted Dec. 14, 1981.
    Decided Jan. 20, 1982.
    
      John J. Delaney, A. P. Fuller, Amundson & Fuller, Lead, S.D., for appellant.
    Craig D. Grotenhouse, argued, Grotenhouse & Johnson, Spearfish, S.D., for appellees.
    Before GIBSON, Senior Circuit Judge, BRIGHT, Circuit Judge, and LARSON, Senior District Judge.
    
      
       EARL LARSON, United States Senior District Judge, District of Minnesota; sitting by designation.
    
   BRIGHT, Circuit Judge.

The precedential value of this case lies in its message to the practicing bar. Parties and their counsel should not bring cases to the federal courts without first making sure of the existence of federal jurisdiction. After careful examination, we find federal jurisdiction lacking in this ease and regretfully order dismissal of the action.

Lawrence County, South Dakota, received funds ($128,012) from the United States during 1979-1980 for federal “entitlement lands” located within that county. See 31 U.S.C. §§ 1601-1607 (1976 & Supp. II 1978). Under federal statute such funds “may be used * * * for any governmental purpose.” 31 U.S.C. § 1601 (1976). A South Dakota state statute, however, limits the expenditure of such funds by directing that “[t]he county auditor shalf distribute federal and state payments in lieu of tax proceeds in the same manner as taxes are distributed.” S.D. Codified Laws Ann. § 5-11-6 (1980) (effective July 1, 1979). South Dakota law requires distribution of approximately sixty percent of county tax receipts to school districts and other special purpose districts.

Lawrence County brought this declaratory judgment action against the school districts and special districts in which the federal entitlement lands lie, seeking a determination that the federal statute overrides the restrictions imposed by state law under the supremacy clause of the Constitution. U.S.Const. art. VI, cl. 2. The United States District Court, granted declaratory relief to Lawrence County on summary judgment, 513 F.Supp. 1040 (D.S.D.1981). Based on the legislative history of the federal enactment, the district court concluded

that Congress intended to provide monies under § 1601 to the counties for them to use for their particular needs. If the counties wish to distribute some of the money to school and other special purpose districts, they certainly may. See Kendall v. Towns County, 146 Ga.App. 760, 247 S.E.2d 577 (1978). However, they are not compelled to do so. [513 F.Supp. at 1042.]

In bringing this appeal, the Lead-Deadwood School District does not question jurisdiction but joins Lawrence County in requesting our determination on the merits. This court raised the jurisdictional question on its own motion and requested supplemental briefs from the parties prior to oral argument.

The parties and this court recognize that federal courts operate within jurisdictional constraints and that parties by their consent cannot confer subject matter jurisdiction upon the federal courts. After careful examination of the complaint and relevant statutes, we reluctantly conclude that we must dismiss this case without reaching the merits.

In its complaint, Lawrence County alleged that

[¡jurisdiction is founded on the alleged existance [sic] of a federal question concerning the supremacy clause and questions arising under various federal and state statutes. This action arises under the Constitution of the United States, Article VI, Clause 2, Public Law 94-565; and the Constitution of the State of South Dakota, Article VI, Section 26; and South Dakota Codified Laws 5-11-6 as amended.
This is an action for declaratory judgment pursuant to 28 U.S.Code, Section 2201, for the purpose of determining a question of actual controversy between the parties above listed as said controversy does now exist between SDCL 5-11-6 and Public Law 94-565.

Section 1331 of 28 U.S.C. confers original subject matter jurisdiction in the federal district courts for all civil actions “arising under the Constitution, laws, or treaties of the United States.” 28 U.S.C.A. § 1331 (West Supp.1981). The federal question, however, must appear, on the face of a well-pleaded complaint for a federal court to exercise that jurisdiction. See Oneida Indian Nation v. County of Oneida, 414 U.S. 661, 676, 94 S.Ct. 772, 781-82, 39 L.Ed.2d 73 (1974).

Lawrence County brought this action under the Declaratory Judgment Act, 28 U.S.C. § 2201 (1976), which authorizes a federal court to declare the rights of parties “[i]n a case of actual controversy within its jurisdiction * * *.” Id. (emphasis added). The operation of the Declaratory Judgment Act is procedural only. It creates a remedy in addition to actions seeking damages or injunctive relief, but does not provide an additional right of entry into federal courts. In Skelly Oil Co. v. Phillips Petroleum Co., 339 U.S. 667, 70 S.Ct. 876, 94 L.Ed. 1194 (1950), the Supreme Court said:

“[T]he operation of the Declaratory Judgment Act is procedural only.” Aetna Life Ins. Co. v. Haworth, 300 U.S. 227, 240 [57 S.Ct. 461, 463, 81 L.Ed. 617], Congress enlarged the range of remedies available in the federal courts biit did not extend their jurisdiction. When concerned as we are with the power of the inferior federal courts to entertain litigation within the restricted area to which the Constitution and Acts of Congress confine them, “jurisdiction” means the kinds of issues which give right of entrance to federal courts. Jurisdiction in this sense was not altered by the Declaratory Judgment Act. Prior to that Act, a federal court would entertain a suit on a contract only if the plaintiff asked for an immediately enforceable remedy like money damages or an injunction, but such relief could only be given if the requisites of jurisdiction, in the sense of a federal right or diversity, provided foundation for resort to the federal courts. The Declaratory Judgment Act allowed relief to be given by way of recognizing the plaintiff’s right even though no immediate enforcement of it was asked. But the requirements of jurisdiction — the limited subject matters which alone Congress had authorized the District Courts to adjudicate — were not impliedly repealed or modified. [Id. at 671-72, 70 S.Ct. at 879 (emphasis added).]

Thus, when a party seeks access to federal court in a declaratory judgment action, the court must examine the realistic position of the parties. The court may realign the parties, if necessary, to determine whether the declaratory plaintiff affirmatively asserts a federal claim, or seeks in effect, to establish a defense against a cause of action which the declaratory defendant might assert in state court. See Public Service Commission v. Wycoff Co., 344 U.S. 237, 73 S.Ct. 236, 97 L.Ed. 291 (1952). The Supreme Court in Wycoff observed:

In this case,' as in many actions for declaratory judgment, the realistic position of the parties is reversed. The plaintiff is seeking to establish a defense against a cause of action which the declaratory defendant may assert in the Utah courts. * * * Where the complaint in an action for declaratory judgment seeks in essence to assert a defense to an impending or threatened state court action, it is the character of the threatened action, and not of the defense, which will determine whether there is federal-question jurisdiction in the District Court. If the cause of action, which the declaratory defendant threatens to assert, does not itself involve a claim under federal law, it is doubtful if a federal court may entertain an action for a declaratory judgment establishing a defense to that claim. This is dubious even though the declaratory complaint sets forth a claim of federal right, if that right is in' reality in the nature of a defense to a threatened cause of action. [Id. at 248, 73 S.Ct. at 242 (footnote omitted).]

The late Judge Talbot Smith, writing for this court, applied an analysis similar to that of the Wycoff Court in Home Federal Savings & Loan Association v. Insurance Department of Iowa, 571 F.2d 423 (8th Cir. 1978). The Iowa Insurance Commissioner had initiated state proceedings against Home Federal, a federally chartered savings and loan association. Home Federal then filed a declaratory judgment action in federal court, seeking to establish its immunity from state regulation on the ground that the Home Owners’ Loan Act of 1933, 12 U.S.C. §§ 1461-1468, had preempted state regulation of federal savings and loan institutions. Although the basis claimed for federal jurisdiction — federal preemption — appeared on the face of Home Federal’s complaint, this court dismissed for want of jurisdiction. In examining the realistic position of the parties under the analysis suggested in Wycoff, this court observed:

[T]he Commissioner’s proceeding against Home Federal was based solely upon alleged violations of Iowa’s insurance law and raised no federal question. Home Federal’s allegations of preemption and failure to engage in the “business of insurance,” asserted in its federal petition, actually are in the nature of defenses to the Commissioner’s charges. Hence they will not suffice for federal question jurisdiction here. The case is basically simply an alleged violation of state law. It is not a federal case and is not converted to one by Home Federal’s defenses to the state’s basic allegations. [571 F.2d at 427.]

We make a comparable analysis of the complaint in the present appeal. Lawrence County received the funds in question from the United States. The county had previously expended similar funds without restriction until the state enacted an amendment to S.D. Codified Laws Ann. § 5-11-6, effective July 1, 1979. The county maintains that the state’s effort to channel the county’s use of those federal funds is void under the supremacy clause. In effect, the county’s complaint asserts a defense against a potential claim to the funds by the school districts and special districts. A realistic alignment of the parties would cast the declaratory defendants as claimants of a portion of the funds to which state law entitles them. The school district’s claim would be based solely upon violation of the state statute. Lawrence County could then raise its supremacy clause claim defensively. This defensive assertion of the preemption doctrine, however, cannot convert the action into one arising under federal law within the meaning of 28 U.S.C. § 1331. See Public Service Commission v. Wycoff Co., supra; Home Federal Savings and Loan Association v. Insurance Department of Iowa, supra; see generally C. Wright, Handbook of the Law of Federal Courts 71 (3d ed. 1976).

Lawrence County bases its argument in support of federal jurisdiction on cases dealing with removal of actions from state to federal courts. Generally, a defendant may remove to federal court a suit brought in state court if the action could have been brought in federal court initially. Some courts have also permitted removal when the defendant asserts a defense of federal preemption to a state claim. Lawrence County maintains that South Dakota amended S.D. Codified Laws Ann. § 5-11-6 in response to the federal enactment, 31 U.S.C. §§ 1601-1607 (1976 & Supp. II 1978), and that they conflict directly. Therefore, Lawrence County contends that if the appellant school districts had initiated an action in state court for release of the federal funds, the county could have removed the case to federal district court on the ground of federal preemption.

Although this case did not actually arise in that posture, Lawrence County maintains that considerations of judicial economy support federal jurisdiction in this declaratory judgment action. Lawrence County argues that the question of the validity of the state statute will ultimately wind up in federal court, and, therefore, a dismissal by this court at this time will prolong the litigation by forcing the parties to go through the proper sequence of steps leading to removal.

This argument carries some logical appeal. It hinges, however, on the premise that an assertion of federal preemption as a defense to a state claim provides an adequate basis for federal question jurisdiction. This court, however, has squarely rejected this theory. First National Bank of Aberdeen v. Aberdeen National Bank, 627 F.2d 843 (8th Cir. 1980) (en banc).

In Aberdeen, the defendant removed to federal court a state action for unfair competition, on the ground that section 30 of the National Bank Act, 12 U.S.C. § 30, preempted the state law claim. The federal district court refused to remand the case to state court, and dismissed the unfair competition claim on the ground of preemption. Plaintiffs appealed.

This court, on appeal, noted a split of authority on whether a defensive assertion of federal preemption provides the basis for removal. This court, en banc, reversed and directed remand to the state court. We specifically rejected the rationale of the cases on which Lawrence County now relies, see First National Bank of Aberdeen v. Aberdeen National Bank, supra, 627 F.2d at 850-52; and note 2 supra, and concluded that neither the assertion nor the fact of preemption of plaintiff’s state law claim provided a basis for federal jurisdiction. See First National Bank of Aberdeen v. Aberdeen National Bank, supra, 627 F.2d at 848 n.12. The Supreme Court’s reasoning and language in Gully v. First National Bank in Meridian, 299 U.S. 109, 57 S.Ct. 96, 81 L.Ed. 70 (1936), dictated this court’s conclusion in Aberdeen. We said:

[I]n the [Gully] opinion, the Court stated:
By unimpeachable authority, a suit brought upon a state statute does not arise under an act of Congress or the Constitution of the United States because prohibited thereby.
Id. at 116, 57 S.Ct. at 99 (emphasis added) (citing Louisville & Nashville R. R. v. Mottley, 211 U.S. 149, 29 S.Ct. 42, 53 L.Ed. 126 (1908)). Th[is] quoted passage[ ] clearly suggests] that the Gully Court believed a defensive assertion of preemption did not give rise to federal question jurisdiction. [First National Bank of Aberdeen v. Aberdeen National Bank, supra, 627 F.2d at 852.]

Our holding in Aberdeen, therefore, requires this court to reject Lawrence County’s contention that an assertion of federal preemption provides the basis for federal jurisdiction.

Additionally, Lawrence County attempts to bolster its argument for federal jurisdiction by asking this court for leave to amend its complaint to assert the property clause of the federal Constitution as an additional basis for declaring S.D. Codified Laws Ann. § 5-11-6 unconstitutional. This additional argument for declaring the statute unconstitutional, however, does not alter the defensive nature of Lawrence County’s claim. Thus, the motion to amend the complaint is not well taken and must be denied. See 28 U.S.C. § 1653 (1976).

Accordingly, we vacate the judgment herein and remand with directions to dismiss the action for want of federal jurisdiction. 
      
      . Similar analysis is required whenever the federal plaintiff alleges in the complaint matters beyond the plaintiff’s own cause of action or anticipates a federal defense, in an effort to establish federal question jurisdiction. Phillips Petroleum Co. v. Texaco, Inc., 415 U.S. 125, 94 S.Ct. 1002, 39 L.Ed.2d 209 (1974); Gully v. First National Bank in Meridian, 299 U.S. 109, 57 S.Ct. 96, 81 L.Ed. 70 (1936); Louisville & Nashville R.R. Co. v. Mottley, 211 U.S. 149, 29 S.Ct. 42, 53 L.Ed.2d 126 (1908); Chandler v. O’Bryan, 445 F.2d 1045 (10th Cir. 1971), cert. denied, 405 U.S. 964, 92 S.Ct. 1176, 31 L.Ed.2d 241 (1972).
     
      
      . In its supplemental brief in support of federal jurisdiction Lawrence County cited a number of cases in which an action instituted in state court was removed to federal court on the basis of a federal preemption defense. See North Davis Bank v. First Nat’l Bank of Layton, 457 F.2d 820 (10th Cir. 1972); Avco Corp. v. Aero Lodge No. 735, Int’l Ass’n of Machinists & Aerospace Workers, 376 F.2d 337 (6th Cir. 1967), aff’d, 390 U.S. 557, 88 S.Ct. 1235, 20 L.Ed.2d 126 (1968); Johnson v. England, 356 F.2d 44 (9th Cir.), cert. denied, 384 U.S. 961, 86 S.Ct. 1587, 16 L.Ed.2d 673; Bailey v. First Federal Savings & Loan Ass’n of Ottawa, 467 F.Supp. 1139 (C.D.Ill.1979); Rettig v. Arlington Heights Federal Savings & Loan Ass’n, 405 F.Supp. 819 (N.D.Ill.1975); Hayes v. C. Schmidt & Sons, Inc., 374 F.Supp. 442 (E.D.Pa.1974).
     