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”).
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.
DISCUSSION
The primary issue on appeal is whether the district court lacked removal jurisdiction over this action. See Mitchell v. Maurer,
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,
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,
On the other hand, jurisdiction must be determined by reference to the “well-pleaded” complaint. Franchise Tax Bd.,
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.
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,
In both Salveson and Sullivan, this court looked to Federated Dep’t Stores, Inc. v. Moitie,
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.,
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,
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,
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
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.
Notes
. 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 ac
. 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,
. Two other recent cases from this circuit describe the holding in Sullivan in broader, more problematic, ways. See Ethridge v. Harbor House Restaurant,
