
    ULTRAMAR AMERICA LIMITED, a Delaware Corporation, Plaintiff-Appellant, v. Thomas W. DWELLE, individually and as Trustee of the Walter B. Allen, Jr. Trust and the Marjorie Allen Dwelle Trust created under the Will of Ann Allen, et al., Defendants-Appellees. ULTRAMAR AMERICA LIMITED, Plaintiff-Appellant, and Loyd P. Derby, Real-Party-In-Interest-Appellant, v. Thomas W. DWELLE, individually and as Trustee of the Walter B. Allen, Jr. Trust and the Marjorie Allen Dwelle Trust created under the Will of Ann Allen, et al., Defendants-Appellees.
    Nos. 87-6373, 87-6473.
    United States Court of Appeals, Ninth Circuit.
    Argued and Submitted Aug. 3, 1988.
    Decided April 16, 1990.
    Loyd P. Derby, Morgan, Lewis & Bocki-us, Los Angeles, Cal., for plaintiff-appellant.
    William M. Bitting, Arthur B. Cook, William A. White, Hill, Farrer, & Burrill, Los Angeles, Cal., for defendants-appellees.
    Before HALL and LEAVY, Circuit Judges, and GEORGE , District Judge.
    
      
       The Honorable Lloyd D. George, United States District Judge, District of Nevada, sitting by designation.
    
   GEORGE, District Judge:

Three issues are raised in these consolidated appeals, namely whether the district court erred in: (1) dismissing Ultramar America Limited’s (“Ultramar’s”) complaint; (2) sanctioning Ultramar’s counsel; and (3) awarding costs and attorney’s fees to the respondents, Thomas W. Dwelle, et al., (“Dwelle”). Because we determine that the district court lacked jurisdiction over this action, we reverse and remand with instructions to remand the matter to state court.

BACKGROUND

Ultramar purchased Beacon Oil Company (“Beacon”) from Dwelle in November 1981. Dwelle warranted that, to the best of its knowledge, Beacon had not violated any environmental laws as of the purchase date. The parties agreed to deposit $8,850,000 of the purchase price into an escrow account to secure any cognizable indemnity claims brought by Ultramar within five years of the closing date. The parties further agreed that if any disputes resulted in litigation, the prevailing party could recover reasonable costs and attorney’s fees.

Sometime prior to August 1986, Ultra-mar received notices from the California Regional Water Quality Control Board and the State Water Resources Control Board that the agencies would be assessing various dump sites for soil and groundwater contamination. The notices were distributed statewide to advise former and present operators and users of the sites that they might be liable for the costs of the investigation and any remedial measures taken. Ultramar subsequently sued Dwelle for indemnification for whatever liability Beacon might incur (“the escrow action”). Since Ultramar’s indemnification claim was not ripe for adjudication, however, the district court granted summary judgment in favor of Dwelle. This court affirmed the judgment.

While the escrow action was on appeal, Ultramar filed the instant action in the Superior Court of the State of California. The claims in this second suit were based upon the same misrepresentations alleged in the prior suit. Dwelle removed the matter to the United States District Court for the Central District of California, alleging federal question jurisdiction. Dwelle thereafter moved to dismiss the action on the bases of res judicata and failure to file a compulsory counterclaim. Ultramar opposed the motion and moved to remand the action to state court for lack of jurisdiction. Without deciding the jurisdiction question, the district court granted Dwelle’s motion to dismiss, awarded costs and attorney’s fees, and sanctioned Ultramar’s counsel pursuant to Rule 11 of the Federal Rules of Civil Procedure. Both Ultramar and its counsel appeal.

DISCUSSION

The primary issue on appeal is whether the district court lacked removal jurisdiction over this action. See Mitchell v. Maurer, 293 U.S. 237, 244, 55 S.Ct. 162, 165, 79 L.Ed. 338 (1934) (an appellate court must satisfy itself of jurisdiction in both the appellate and the district courts). Since diversity jurisdiction does not exist, Dwelle must establish that at least one claim alleged in the complaint “arises under” federal law. See 28 U.S.C. §§ 1441(b) (1982); id. § 1331; Salveson v. Western States Bankcard Ass’n, 731 F.2d 1423, 1426 (9th Cir.1984) (the party seeking removal bears the burden of establishing federal jurisdiction).

Dwelle contends that Ultramar’s right to relief turns upon construction of federal law, and therefore, although Ultramar couched its claims in terms of state law, the claims in fact “arise under” federal law. See Merrell Dow Pharmaceuticals, Inc. v. Thompson, 478 U.S. 804, 808, 106 S.Ct. 3229, 3232, 92 L.Ed.2d 650 (1986); Franchise Tax Bd. v. Construction Laborers Vacation Trust, 463 U.S. 1, 9, 13, 103 S.Ct. 2841, 2846, 2848, 77 L.Ed.2d 420 (1983). Dwelle further contends that since these claims involve the same parties and the same operative facts as those in the escrow action, the district court could assert jurisdiction to protect the prior federal judgment and prevent Ultramar from circumventing its preclusive effect, citing Sullivan v. First Affiliated Sec., Inc., 813 F.2d 1368, 1375-76 (9th Cir.), cert. denied, 484 U.S. 850, 108 S.Ct. 150, 98 L.Ed.2d 106 (1987), and Salveson, 731 F.2d at 1427.

A. Claims “Arising Under” Federal Law

Ordinarily, the existence of federal question jurisdiction is determined from the face of the complaint. Whether the complaint states a claim “arising under” federal law must “ ‘be ascertained by the legal construction of [the plaintiffs] allegations, and not by the effect attributed to those allegations by the adverse party.’ ” Tennessee v. Union & Planters’ Bank, 152 U.S. 454, 460, 14 S.Ct. 654, 656, 38 L.Ed. 511 (1894) (quoting Central R.R. v. Mills, 113 U.S. 249, 257, 5 S.Ct. 456, 459, 28 L.Ed. 949 (1985)). The plaintiff is the “master” of his complaint; where he may pursue state and federal claims, he is free to pursue either or both, so long as fraud is not involved. Salveson, 731 F.2d at 1426-27.

On the other hand, jurisdiction must be determined by reference to the “well-pleaded” complaint. Franchise Tax Bd., 463 U.S. at 9-10, 103 S.Ct. at 2846. Claims brought under state law may “arise under” federal law if vindication of the state right necessarily turns upon construction of a substantial question of federal law, i.e., if federal law is a necessary element of one of the well-pleaded claims. Id. at 13, 27-28, 103 S.Ct. at 2848, 2855-56; see also Merrell Dow Pharmaceuticals, 478 U.S. at 808, 106 S.Ct. at 3232.

Construing Ultramar’s well-pleaded complaint, this court cannot say that Ultra-mar’s right to relief necessarily depends upon construction of a substantial question of any federal environmental law. Although Beacon may have violated federal environmental laws prior to its acquisition by Ultramar, in which case Ultramar might be entitled to relief, for every stated cause of action, an alternative theory of relief, one dependent solely upon construction of state law, might also entitle Ultramar to relief. The fact that an alternative theory of relief exists for each claim alleged in the complaint, one not dependent upon federal law, is itself grounds to defeat federal question jurisdiction. See Christianson v. Colt Indus. Operating Corp., 486 U.S. 800, 810, 108 S.Ct. 2166, 2174, 100 L.Ed.2d 811 (1988).

B. Res Judicata Basis for Removal Jurisdiction

Dwelle contends that even if Ultramar did not allege a federal claim in the second suit, the district court nevertheless had removal jurisdiction based upon the preclu-sive effect of the prior federal judgment, citing Salveson, 731 F.2d at 1432, and Sullivan, 813 F.2d at 1376. However, for the reasons articulated below, we find that Dwelle’s reliance on Salveson and Sullivan is misplaced.

In both Salveson and Sullivan, this court looked to Federated Dep’t Stores, Inc. v. Moitie, 452 U.S. 394, 101 S.Ct. 2424, 69 L.Ed.2d 103 (1981), and concluded that where a plaintiff files state claims after a federal judgment has been entered against him on essentially the same claims, the district court may invoke the artful pleading doctrine as a basis for federal jurisdiction and dismiss the claims under the principles of res judicata. Salveson, 731 F.2d at 1429; Sullivan, 813 F.2d at 1375-76. In Sullivan, we noted that such an application of the artful pleading doctrine was unique; traditionally, the doctrine has applied only when the conduct complained of is governed exclusively by federal law. Sullivan, 813 F.2d at 1372. We could not ignore the Supreme Court’s apparent approval of this extraordinary application of the doctrine in Moitie, however, much less our application of the doctrine when confronted with parallel facts in Salveson. See Moi-tie, 452 U.S. at 397 n. 2,101 S.Ct. at 2427 n. 2; Salveson, 731 F.2d at 1429. Accordingly, we recognized in those decisions a new basis fo.r invoking the artful pleading doctrine. Sullivan, 813 F.2d at 1373, 1375.

Sullivan states that the source of the “federal character” of the purported state claims in Moitie was “federal res judicata.” Id. at 1375. The opinion continues: “Moitie can thus be construed as permitting removal only of state claims filed to circumvent the res judicata impact of a federal judgment.” Id. at 1376. Considered in isolation, these statements appear to support Dwelle’s contention that the only force driving Moitie removal is the existence of a prior final federal court judgment sufficient to render a later state court proceeding barred by res judicata, without regard for whether that prior federal court sat in diversity or decided federal law. But other language in Sullivan indicates that the source of the original federal court’s subject-matter jurisdiction is crucial:

But as in the case of federal preemption coupled with a federal remedy, we can recharacterize a state claim barred by the res judicata effect of a federal judgment as an artfully pleaded federal claim. The federal judgment would ordinarily preclude the plaintiff from relit-igating any federal or state claim arising out of the same operative facts. A purported state claim based on those facts would be in effect the same federal claim against which the judgment had been entered. The removing court could thus recharacterize the state claim as an artfully pleaded federal claim filed to circumvent the res judicata effect of the federal judgment.

Id. (emphasis added) (citation omitted). This passage indicates that the Sullivan court assumed that recharacterization of purported state-law claims into federal claims was essential before removal could occur. For the reasons that follow, rechar-acterization is only possible when the prior federal judgment resolved questions of federal law.

An artfully pleaded claim is one that in reality arises under federal law and thus must be recharacterized as such despite the fact that it purports to rely solely on state law. See, e.g., Olguin v. Inspiration Consol. Copper Co., 740 F.2d 1468, 1472 (9th Cir.1984) (citing Franchise Tax Bd., 463 U.S. at 22, 103 S.Ct. at 2852). One example, cited by the Sullivan court in the passage above, is that of federal preemption coupled with a federal remedy. When the defense of preemption is absolute, any purported state-law claim in actuality arises under whatever federal law preempts the state law. Franchise Tax Bd., 463 U.S. at 23-24, 103 S.Ct. at 2853-54. The preemption defense allows for recharacterization of the state-law claim into a federal one. It would be inaccurate to say, however, that the concept of preemption itself is the federal claim. One cannot sue in federal court on a mere claim of “preemption.” Similarly, in Moitie removal, the defense of federal res judicata cannot by itself be a “federal claim”: one cannot sue in federal court on a claim of federal res judicata. Recharacterization must occur. When the prior federal judgment sounded in federal law, new purported state claims can be recharacterized as the old federal claims in disguise. But when the prior federal judgment was based on state law, new purported state claims can be “recharacterized” only as the old state claims from the first suit. In such a situation, there is not a federal claim in sight, and removal is impermissible even though res judicata probably bars the suit. The situation is directly analogous to that where federal law preempts state law yet fails to provide its own cause of action. In such a situation, although federal law is a perfectly valid defense to a state claim, that claim cannot be said to actually be a federal claim, for no federal right of action exists on point. See, e.g., Garibaldi v. Lucky Food Stores, Inc., 726 F.2d 1367, 1370 n. 5 (9th Cir.1984) (excellent discussion of difference “between an artfully pled complaint and one that is preempted, but not removable”), cert. denied, 471 U.S. 1099, 105 S.Ct. 2319, 85 L.Ed.2d 839 (1985); see also Franchise Tax Bd., 463 U.S. at 24, 103 S.Ct. at 2854 (“[I]f a federal cause of action completely preempts a state cause of action any complaint that comes within the scope of the federal cause of action necessarily ‘arises under’ federal law.”) (emphasis added).

The Sullivan court’s discussion of re-characterization reveals that this concept still retains vitality in the artful pleading context. Thus, when the court states that the source of the “federal character” of the state claims in Moitie was “federal res judicata principles,” the court actually and implicitly means federal res judicata such that the state claims can successfully be recharacterized into federal claims. See Sullivan, 813 F.2d at 1375; see also People of the State of Cal. v. Chevron Corp., 872 F.2d 1410, 1415 (9th Cir.1989).

Any reading of Sullivan that focuses solely on the court’s statement that Moitie is “limited to the removal of state claims precluded by a federal judgment,” Sullivan, 813 F.2d at 1376, in effect advances the view that Sullivan worked a fundamental change in artful pleading analysis— and hence, in the well-pleaded complaint rule and “arising under” jurisdiction generally — by abrogating the requirement of re-characterization. Without an explicit holding to that effect, we doubt that Sullivan meant to rework the law of federal question removal so fundamentally.

Moreover, we do not read Sullivan as conflicting with the result we reach today. Indeed, we think that Sullivan’s res judica-ta defense discussion only meant to underscore that the prior federal claim must be one that has been finally adjudicated. After all, the issue before the Sullivan court was whether removal was proper where parallel state and federal actions are brought but no final judgment on the federal action has been rendered. Additionally, Sullivan’s conclusion that removal was improper without a final federal judgment makes perfect sense given the rationale for Moitie removal.

The Moitie doctrine seems based on a court divining a litigant’s motives for bringing suit. When a litigant has suffered a final defeat on a federal claim yet thereafter files a similar-although-not-preempted state claim in state court, the sequence of events gives rise to an inference that the litigant is not interested in the state cause of action per se, but is instead attempting to circumvent the effects of the federal question judgment. In this limited instance, removal is allowed. But when there has not yet been a final judgment on the federal cause of action, as was the case in Sullivan, no such circumventing motive can properly be inferred: after all, the litigant still might prevail on the federal claim.

To sum, the Sullivan court did not face the situation which now confronts us. The situation where a prior federal judgment was grounded in state law has never been reached. We hold that when the prior federal judgment was grounded in state law, the state claims contained in a subsequent action filed in state court cannot be rechar-acterized as federal for purposes of removal.

CONCLUSION

The district court lacked jurisdiction over Ultramar’s state claims and should have remanded the matter to state court. We therefore need not decide the remaining issues on appeal. The orders of the district court are reversed and the case is remanded with instructions to remand to state court.

REVERSED and REMANDED. 
      
      . Both Ultramar and Dwelle filed suit in the United States District Court for the Central District of California, and the actions were consolidated. Jurisdiction was based upon diversity of citizenship. The parties settled all but the indemnification claim.
     
      
      . See Memorandum Disposition, Nos. 87-5731, 87-5867, as amended July 21, 1988.
     
      
      . Dwelle did not allege diversity jurisdiction in the second suit and counsel conceded at oral argument that diversity jurisdiction was defeated prior to the filing of this suit.
     
      
      .Section 1441(b) provides in pertinent part: "Any civil action of which the district courts have original jurisdiction founded on a claim or right arising under the Constitution, treaties or laws of the United States shall be removable without regard to the citizenship or residence of the parties." 28 U.S.C. § 1441(b).
      Section 1331 provides: "The district courts shall have original jurisdiction of all civil actions arising under the Constitution, laws, or treaties of the United States.” 28 U.S.C. § 1331.
     
      
      . Dwelle asserts that Ultramar could not be entitled to relief unless it established that Beacon violated either the Resource Conservation and Recovery Act of 1976, 42 U.S.C. § 6901 et seq., or the Comprehensive Environmental Response, Compensation, and Liability Act of 1980, 42 U.S.C. § 9601 et seq. However, Ultramar might also establish Dwelle's liability if Beacon violated certain provisions of the California Water Code, § 13000 et seq. In its complaint, Ultra-mar merely alleged that Beacon had violated "environmental laws.”
     
      
      . Indeed, res judicata is typically used as a defense. See generally Fed.R.Civ.P. 8(c) (describing res judicata as an affirmative defense). Even when collateral estoppel is used offensively by a plaintiff, the cause of action sued upon is still some independent, substantive ground. See, e.g., Parklane Hosiery Co. v. Shore, 439 U.S. 322, 324, 331-33, 99 S.Ct. 645, 648, 651-52, 58 L.Ed.2d 552 (1979) (approving use of offensive collateral estoppel in suit alleging violations of federal securities laws and SEC regulations).
     
      
      . Two other recent cases from this circuit describe the holding in Sullivan in broader, more problematic, ways. See Ethridge v. Harbor House Restaurant, 861 F.2d 1389, 1403 (9th Cir.1988) ("[W]e concluded in Sullivan that a plaintiffs state law complaint is ‘artfully pleaded' when it is drafted to avoid stating allegations or claims already resolved against the plaintiff by a prior federal judgment,”); Price v. PSA, Inc., 829 F.2d 871, 876 n. 4 (9th Cir.1987) (describing Sullivan as limiting the artful pleading doctrine to cases "where a plaintiff is seeking to circumvent the res judicata impact of a federal judgment"), cert. denied, 486 U.S. 1006, 108 S.Ct. 1732, 100 L.Ed.2d 196 (1988). Yet both cases involved vastly different factual situations from the one that confronts us, and in both cases artful pleading removal was held inapplicable. In Ethridge the prior judgment had been based on the existence of a federal question, not, as here, diversity of citizenship. See Ethridge, 861 F.2d at 1390. Moreover, this court specifically found that judgment to have been entered without jurisdiction. See id. at 1401-03. Consequently, the Ethridge court declined to apply Sullivan even though it described the case. Id. at 1403-04. In Price, no prior federal judgment even existed, and the court only described Sullivan to stress that this fact rendered application of artful pleading inappropriate. See Price, 829 F.2d at 872-73, 876 n. 4. We do not read these two cases as in any way preventing our holding today.
     