In this appeal we are asked to decide whether the exercise of an option to extend the term of a gas sales agreement is a “rollover contract” within the meaning of § 2(12) of the Natural Gas Policy Act, § 15 U.S.C. § 3301(12). Because we conclude that the district court was without subject-matter jurisdiction, we must decline the invitation. We vacate the judgment below and dismiss for want of jurisdiction.
On November 1, 1954, Superior Oil Co. and Pioneer Natural Gas Co., the predecessor of Pioneer Corp., contracted for the sale of natural gas. Pioneer agreed to buy from Superior its natural gas available at the outlet of a gas processing plant in the West Seminole Field, Gaines County, Texas. The duration of the agreement was as follows:
This Agreement shall be effective as of November 1, 1954, and shall continue in effect for a term of twenty-five (25) years from and after such date, provided that the primary term may be extended at the option of Buyer for an additional period equivalent to the period gas is used for injection purposes in the West Seminole Field, or the period which is necessary to enable Buyer to receive the quantity of gas not made available to it because of such injection operations, whichever is the shorter.
Because the gas was not “dedicated” to interstate commerce, the sale was not then subject to federal regulation. In 1978 Congress adopted the Natural Gas Policy Act, 15 U.S.C. §§ 3301-3432, which regulated intrastate as well as interstate sales of natural gas. On October 17, 1979, after the passage of the Act, but before the expiration of the twenty-five-year term, Pioneer *605 notified Superior that it was exercising its option to extend the term of the agreement.
On August 28, 1980, Superior filed this suit to recover the price of gas sold to Pioneer under the agreement as extended by the exercise of the option. Superior alleged that Pioneer had refused to pay for the gas delivered since November 1, 1979. It alleged that the extension was an “existing contract” within the meaning of § 2(13) of the NGPA, 15 U.S.C. § 3301(13), and that the ceiling price was the lower of the price under the extended agreement and the maximum lawful price for “new” natural gas. See 15 U.S.C. § 3315(b). Alternatively, and only if its first contention were rejected, Superior alleged that the extension was a “rollover contract” as defined by § 2(12) of the NGPA, 15 U.S.C. § 3301(12), and that the ceiling price was the maximum price under the original agreement plus an inflation adjustment factor. See 15 U.S.C. § 3316(b)(1). Superior’s complaint stated a single claim “for breach of contract” with jurisdiction predicated on 28 U.S.C. § 1331, the general federal-question jurisdiction statute. In its prayer for relief, Superior sought damages and injunctive and declaratory relief, including a declaration that the agreement as extended was an “existing contract” within the meaning of the NGPA.
Both parties moved for partial summary judgment, with Pioneer conceding that it had exercised the option but seeking a determination that the option so exercised was a “rollover contract.” The district court granted Pioneer’s motion.
At the outset we are confronted with the question of subject-matter jurisdiction. Although neither party has raised the issue either here or below, it is our duty to do so. Because both Superior and Pioneer are Texas corporations for purposes of ■ diversity jurisdiction, any jurisdiction must be under 28 U.S.C. § 1331.
There have been innumerable interpretations of § 1331’s requirement that a case “arise[] under the Constitution, laws, or treaties of the United States.” It is an old puzzlement that has drawn the attention of the notable jurists and scholars. The general consensus among courts and commentators today seems to be that federal law .must ordinarily provide a right that the plaintiff is asserting, and perhaps the plaintiff’s claim. Chief Justice Marshall’s formula, whether the federal question “forms an original ingredient” of the cause,
Osborn v. Bank of the United States,
9 Wheat (22 U.S.) 738, 824,
The practical difference between the Holmes and Cardozo formulations is not great: one who is asserting a federal right will almost invariably be asserting a federal claim. Both Holmes and Cardozo recognized that the mere presence of a federal issue, specifically the anticipation of a federal defense, would not permit invocation of federal-question, jurisdiction.
American Well Works Co. v. Layne & Bowler Co.,
Our recent cases are consistent with this received learning. In
Cox v. International Union of Operating Engineers,
For original federal jurisdiction to obtain, the complaint must raise ‘a substantial claim founded “directly” upon federal law.’ ... It does not suffice that the answer raises a federal question.... Neither is it enough that the dispute is in some way connected with a federal matter. The nature of the cause of action asserted determines jurisdiction....
Id.
at 422-23 (citations omitted). Similarly, in
Maxwell
v.
First National Bank of Mon-roeville,
We have held that for a case to ‘arise under’ federal law, a right or immunity created by that law must be an essential element of the plaintiff’s claim. The federal right or immunity that forms the basis of the claim must be such that it will be supported if the federal law is given one construction or effect and defeated if it is given another.... In order to determine whether the claim arises under the Constitution or laws of the United States, we must look to the plaintiff’s complaint unaided by anticipated defenses and with due regard to the real nature of the claim....
Id. at 35 (citations omitted).
We think these paths lead to only one destination: the district court should not have entertained Superior’s lawsuit. Like the claim whose dismissal we upheld in
Epps v. Bexar-Medina-Atacosa Counties Water Improvement Dist. No. 1,
Superior’s allegations that the extension is an “existing contract” rather than a “rollover” do not fortify its jurisdictional cause. Superior is anticipating a defense, namely that the NGPA does not permit charges over the maximum price under the original agreement as adjusted for inflation. 15 U.S.C. § 3316(b)(1). Consistent with the notion that the lawsuit must proceed on a federal right, an anticipated defense may not be the basis for federal-question jurisdiction.
Epps v. Bexar-Medina-Atacosa Counties Water Improvement Dist. No. 1,
The Supreme Court’s decision in
Phillips Petroleum v. Texaco, Inc.,
Similarly, Superior’s action here is in effect for breach of contract. The asserted role of the NGPA in this case corresponds to that of the Helium Act in Phillips Petroleum: it deprives the other party of a defense. Just as the Natural Gas Act and the Helium Act established no right to recover for constitutent helium, so the NGPA establishes no right to recover for intrastate natural gas. State law propels both lawsuits. 1
Undoubtedly, the dispute between Superior and Pioneer pivots on an issue of federal law. But that was equally true in many of the other cases we have discussed. “[T]he federal issue must appear on the face of the complaint... ”
Epps v. Bexar-Medina-Atacosa Counties Water Improvement Dist. No. 1,
Nor do we believe that Superior’s request in its prayer for relief for a declaration that the agreement is an “existing contract” enhances its prospects for federal jurisdiction. An action for declaratory relief may be used to obtain a judgment that another party does not have a federal right. C. Wright, The Law of Federal Courts 101; 10A C. Wright, A. Miller & M. Kane, Federal Practice and Procedure § 2767 (2d ed. 1983). In this sense, the declaratory judgment remedy, 28 U.S.C. § 2201, expands federal jurisdiction. It enables a party to bring a federal action corresponding to the one that the opposing party might have brought. C. Wright, The Law of Federal Courts 101; 10A C. Wright, A. Miller & M. Kane, Federal Practice and Procedure § 2767.
Our survey of Superior’s pleadings, however, discloses no federal right of Pioneer’s. Superior does not even allege that Pioneer is claiming that the agreement is a “rollover contract.” Assuming such an allegation were present, Pioneer would still have no federal right on which it could sue, given Superior’s allegation that it failed to pay for the gas delivered. Although the declaratory judgment remedy permits a party to bootstrap its way into federal court by alleging the imminence of another party’s federal action against it, Superior simply has not done this. That Superior has included a request for a declaratory judgment in its prayer for relief does not alter the fact that its complaint states only a state-law claim for breach of contract.
We realize that the parties and the district court have devoted a considerable amount of time to this case. We are loathe to vacate a- carefully considered judgment with the deft explanation of “sorry, wrong court.” Could we honestly read the question of subject-matter jurisdiction to be close, we might take hold of Professor Wright’s sage advice that where “there is a debatable issue about federal question jurisdiction, pragmatic considerations must be taken into account.” C. Wright, The Law of Federal Courts 96. But the question of *608 federal-question jurisdiction here is not close. The district court lacked subject-matter jurisdiction over Superior’s claim; we must vacate the judgment, and dismiss the claim.
VACATED and DISMISSED.
Notes
. We note that
Clark v. Gulf Oil Corp.,
