268 F.3d 891 (9th Cir. 2001)
PEOPLE OF THE STATE OF CALIFORNIA; CITY OF LODI, PLAINTIFFS-APPELLEES,v.RANDTRON, A DISSOLVED CALIFORNIA CORPORATION, DEFENDANT-APPELLANT.PEOPLE OF THE STATE OF CALIFORNIA; CITY OF LODI, PLAINTIFFS-APPELLEES,ANDAMERICAN STORES PROPERTIES, INC.; LUCKY STORES, INC.; HOLZ RUBBER COMPANY, INC., INTERVENORS-APPELLEES,v.RANDTRON, A DISSOLVED CALIFORNIA CORPORATION, DEFENDANT-APPELLANT,ANDOLDCO HOLZ, A SUSPENDED BANKRUPT AND DEFUNCT CALIFORNIA CORPORATION, DEFENDANT.
Nos. 99-17572, 00-16236
UNITED STATES COURT OF APPEALS FOR THE NINTH CIRCUIT
Argued and Submitted April 10, 2001Filed October 2, 2001Amended March 19, 2002

[Copyrighted Material Omitted]
Kimberly S. McGovern and Jonathan K. Tycko, Gibson, Dunn & Crutcher LLP, Washington, D.C., for the defendant-appellant.
Randall A. Hays, City Attorney, Michael C. Donovan and Susan J. King, Attorney General, San Francisco, California, for the plaintiffs-appellees.
Appeal from the United States District Court for the Eastern District of California; David F. Levi, District Judge, Presiding. D.C. No. CV-98-00620DFL/DAD
Before: Schroeder, Chief Judge, D.W. Nelson and Rawlinson, Circuit Judges.
OPINION
Rawlinson, Circuit Judge:


1
Two issues are presented in this appeal: 1) Whether the Anti-Injunction Act barred the district court from issuing a declaratory judgment precluding the California Superior Court from considering Randtron's res judicata defense; and 2) whether the district court erred in ruling that the Consent Decree barred Randtron from asserting a counterclaim for contribution against Lodi in a separate state court lawsuit in which Lodi attempted to impose liability on Randtron above and beyond the liability asserted and settled in the federal court lawsuit.

BACKGROUND

2
In April 1998, the State of California and Lodi, a California municipality (collectively referred to as "Lodi"), brought a federal environmental cause of action against Randtron, a dissolved California corporation,1 for soil and groundwater contamination. The complaint alleged causes of action under the Resource Conservation and Recovery Act, the Comprehensive Environmental Response, Compensation and Liability Act and the Lodi Comprehensive Municipal Environmental Response and Liability Ordinance ("MERLO"). When Randtron was an operating business, it had insurance policies with at least two companies Employers Insurance of Wausau ("Wausau") and Granite State Insurance Company ("Granite State"). Randtron (represented by counsel hired by Wausau) and Lodi negotiated a proposed settlement agreement and consent decree.


3
On April 10, 1998, the court signed an order allowing notice of the proposed settlement and consent decree. Numerous interested parties commented, and Lucky Stores and Holz Rubber Company were permitted to intervene. The court held hearings on the proposed consent decree on July 27, 1998 and September 28, 1998. Additionally, the court considered briefs from the parties and intervenors after the hearings. On December 4, 1998, the court issued an order addressing the objections and specifying the required amendments to the decree. On April 1, 1999, the settlement agreement was memorialized by the federal district court in a final Consent Decree.


4
The settlement agreement released all claims against Randtron's officers and shareholders not covered by other insurance policies and from any claims against Randtron covered by the two Wausau insurance policies. Specifically, the agreement stated:


5
As to the Corporate Defendants, this settlement is intended to effectuate settlement of only those Matters Covered for which the Corporate Defendants were protected from liability by the limits of liability coverage provided by the general liability provisions of the combined single limits endorsements of policy numbers 0624-03-033933 and 0626-00-037304 issued by Employers Insurance of Wausau A Mutual Company. As to the Individual Defendants, this settlement is intended to release them from all liability from which they are not actually protected by insurance (which release specifically includes all liability to respond with other than insurance assets or proceeds) for the Matters Covered by this Settlement.


6
The district court's express retention of jurisdiction over the settlement agreement provided: "The Court shall retain full jurisdiction over the Settling Parties, Wausau, the Trust, and this Consent Decree for purposes of ensuring compliance with its terms and provisions and adjudicating, either directly or by Order of Reference, any and all disputes arising hereunder."


7
On December 24, 1998, Lodi filed a complaint in state court to enforce an administrative order requiring Randtron to prepare a comprehensive plan for the remediation of the polluted areas pursuant to MERLO and to recover unexhausted insurance assets.2,3 Randtron, now represented by counsel retained by Granite State,4 filed a demurrer in state court based on res judicata. Lodi filed a motion for declaratory relief, and an injunction in federal district court to prevent Randtron from asserting a res judicata defense in the state court action. The state court stayed Randtron's state action pending the federal district court's resolution of Lodi's motion.


8
In its October 12, 1999 decision, the district court determined that Lodi was not attempting to circumvent the terms of the Consent Decree. Rather, Lodi was attempting to comply with its terms. See California v. Randtron , 69 F. Supp. 2d 1264 (E.D. Cal. 1999). The court stated, "Lodi's present federal court action reasonably can be viewed, then, as an action to stop Randtron from breaching the terms of the Consent Decree." Id. at 1269. The court held that it had subject matter jurisdiction on the basis of the Consent Decree and under the All Writs Act to issue the injunction.


9
Id. at 1268-69. The court also held that the relitigation exception applied, and described Granite's effort to use res judicata with regard to Randtron as a "fiction." Id. at 1271. The court issued the injunction, holding:


10
the Consent Decree releases Lodi's claims against Randtron only to the extent those claims were covered by the two Wausau policies specified in the Decree. The Decree does not bar Lodi from asserting the same substantive claims against Randtron to the extent it possesses other insurance assets.


11
Id. at 1274.


12
In the interim, Randtron filed a cross-complaint5 in state court against Lodi for contribution, asserting that Lodi was partially responsible for the environmental contamination at issue. In response, on March 30, 2000, Lodi filed an application in federal court for an order to show cause why Randtron should not be held in contempt and sanctioned for violating the Consent Decree by filing its cross-complaint. On April 21, 2000, Lodi moved for a preliminary injunction in federal court requiring Randtron to dismiss its cross-claims. On the same day, Randtron filed a motion in federal court for a temporary stay of proceedings in federal court pending the state court's decision.


13
The district court held a hearing on the motions on May 19, 2000. Lodi's motion for preliminary injunction was granted. Lodi's motion to show cause and Randtron's motion for a stay were both denied.


14
Because the district court properly applied the Anti-Injunction Act, and Randtron had no enforceable contribution claim against Lodi, we affirm.

STANDARD OF REVIEW

15
Whether an injunction may issue under the Anti-Injunction Act is a question of law reviewed de novo. Prudential Real Estate Affiliates v. PPR Realty, Inc., 204 F.3d 867, 879 (9th Cir. 2000). However, the decision to issue an injunction that comes within an exception to the Act is reviewed for an abuse of discretion. United States v. Alpine Land & Reservoir Co., 174 F.3d 1007, 1011 (9th Cir. 1999).


16
The district court's interpretation of a consent decree is reviewed de novo. Gates v. Gomez, 60 F.3d 525, 530 (9th Cir. 1995). "However, we give deference to the district court's interpretation based on the court's extensive oversight of the decree from the commencement of the litigation to the current appeal." Id.(citations and internal quotation marks omitted).

SUBJECT MATTER JURISDICTION

17
The district court had jurisdiction to enforce the settlement agreement because the district court incorporated the agreement into the Consent Decree. See Flanagan v. Arnaiz, 143 F.3d 540, 544 (9th Cir. 1998).


18
Additionally, the district court had jurisdiction under the All Writs Act, 28 U.S.C. &#167 1651, which provides that federal courts "may issue all writs necessary or appropriate in aid of their respective jurisdictions and agreeable to the usages and principles of law." 28 U.S.C. &#167 1651.


19
We have jurisdiction pursuant to 28 U.S.C. &#167 1291.

RES JUDICATA

20
The Anti-Injunction Act, 28 U.S.C.&#167 2283, prohibits federal courts from enjoining state court actions except in specific and narrow circumstances. Prudential, 204 F.3d at 878; Alpine, 174 F.3d at 1014. Federal courts may enjoin state court actions if one of three exceptions is met: 1) as expressly authorized by Congress, 2) where necessary in aid of the federal court's jurisdiction, or 3) to protect or effectuate the federal court's judgments. Alpine, 174 F.3d at 1014. This third exception is known as the "relitigation exception". Merle Norman Cosmetics, Inc. v. Victa, 936 F.2d 466, 468 (9th Cir. 1991).


21
The relitigation exception "allows federal courts to enjoin state court proceedings to protect the res judicata effect of their judgments." Golden v. Pacific Maritime Ass'n, 786 F.2d 1425, 1427 (9th Cir. 1986) (citation omitted). A relitigation injunction is proper where a federal litigant has prevailed on the merits, but is threatened with burdensome and repetitious relitigation of the same issues in subsequent actions. Id.


22
[3] The Anti-Injunction Act applies although the injunction would be directed at a litigant (here, Randtron) instead of the state court proceeding itself. See Quackenbush v. Allstate Ins. Co., 121 F.3d 1372, 1377-78 (9th Cir. 1997). The AntiInjunction Act also applies to declaratory judgments if those judgments have the same effect as an injunction. See Texas Employers Ins. Ass'n v. Jackson, 862 F.2d 491, 506 (5th Cir. 1988); Thiokol Chem. Corp. v. Burlington Indus., 448 F.2d 1328, 1332 (3d Cir. 1971).


23
The district court did not abuse its discretion in determining that the relitigation exception of the Anti-Injunction Act applies to bar Randtron from asserting its res judicata defense in state court.


24
It was contemplated at the time of the Consent Decree that other actions would lie against Randtron and its insurers to the extent not covered under the settlement agreement. See Kelly v. Merrill Lynch, Pierce, Fenner & Smith, Inc., 985 F.2d 1067, 1069 (11th Cir. 1993) (citing RESTATEMENT (SECOND) OF JUDGMENTS &#167 26 cmt. a.) ("A party can waive res judicata by consenting to split the claim into two suits."); see also United States ex rel. Barajas v. Northrop Corp., 147 F.3d 905, 911 (9th Cir. 1998) (citations omitted) ("A settlement can limit the scope of the preclusive effect of a dismissal with prejudice by its terms."). The Consent Decree only released future claims with regard to two insurance policies written by Wausau.6


25
In addition to the express terms of the Consent Decree, we are also persuaded by the district court's interpretation. The district court stated that it "would not have approved the Consent Decree or made a finding that the settlement was reached in good faith had the settlement freed Randtron and all of its insurers from any further liability upon the exhaustion of only the two Wausau policies." Randtron, 69 F.Supp.2d at 1269. We give deference to the district court's interpretation based on the court's extensive oversight of the decree from the commencement of the litigation to the current appeal. See Gates, 60 F.3d at 530.

RIGHT TO SEEK CONTRIBUTION

26
Randtron contends that the district court's second order barring Randtron's contribution claim is inconsistent with its first order barring Randtron's res judicata defense.7 According to Randtron, if the October 12, 1999 decision ("Randtron I") is affirmed, the May 25, 2000 ("Randtron II") decision must necessarily be reversed. In Randtron II, the district court considered Randtron's contribution argument and held:


27
the Consent Decree releases all of Randtron's claims against Lodi, specifically including contribution claims, whether or not known at the time of execution of the consent decree, which arise from or are related to the allegations of this action concerning hazardous substance contamination of soils and groundwater within the City of Lodi.


28
Randtron asserts that the reading and extension of Randtron I to its logical conclusion shows that Randtron did not release any claims for contribution that might arise beyond the $1 million payment made by Wausau under the terms of the Consent Decree. In other words, Randtron argues that it was precluded from asserting any contribution claims because its claims against the other responsible parties had not yet accrued.8


29
In order to evaluate Randtron's claim, we must review the applicable release provisions. Provision X.A. of the Consent Decree provides:


30
Mutual Releases. Upon entry of this Consent Decree, the Plaintiffs, the Settling Defendants and Wausau mutually release one another . . . , from all past, present and future claims, whether known or unknown, and whether direct or in contribution, which were brought or which could have been brought in this action and which arise from or are related to the allegations of this action . . . or any claims which could be brought against the City of Lodi relating to or arising out of the settled matters or actions to be taken pursuant to this Consent Decree.


31
While Randtron is prevented from asserting any future contribution actions, Lodi is not because the broad scope of the general release provision is narrowed by certain exceptions. The fourth exception states:


32
Matters Not Covered by Disclosed Insurance. Any claims or rights (including those asserted in this action) that the Plaintiffs, or either of them, may have now, or may in the future acquire, against Randtron or Oldco Holz to the extent Randtron or Oldco Holz are protected from the liability asserted in those claims by any insurance not exhausted by this Consent Decree (i.e., insurance other than the limits of liability coverage provided by the general liability provisions of the combined single limits endorsements of policy numbers 0624-03-033933 and 0626-00-037304 issued by Employers Insurance of Wasau A Mutual Company);


33
Consent Decree Provision X.B.4.  This provision allows the Plaintiffs, collectively or individually, to pursue an action for contribution against Randtron. Notably, this provision contains no language granting Randtron the same right. Under the terms of the Consent Decree, Randtron was not entitled to seek contribution from Lodi. Accordingly, the district court did not err in its rulings on this issue.

CONCLUSION

34
The district court properly granted Lodi's motion for declaratory judgment and injunction prohibiting Randtron from asserting a res judicata defense in state court. Moreover, the district court did not err in granting declaratory relief to Lodi, barring Randtron from asserting a cross-claim for contribution against Lodi.


35
The judgment of the district court is AFFIRMED.



Notes:


1
 Under California law, a dissolved corporation may be sued "to the extent of its undistributed assets, including, without limitation, any insurance assets held by the corporation." CAL. CORP. CODE &#167 2011(a)(1)(A).


2
 This complaint did not allege any federal claims; therefore, Randtron could not remove the action to federal court and seek consolidation with the federal case.


3
 The Enforcing Officer of the City of Lodi issued an initial Abatement Action Order against Randtron on March 16, 1998, prior to the filing of the federal complaint.


4
 Counsel for Granite State attended the hearing on the proposed consent decree, but voiced no objections. Nor did Granite State move to intervene.


5
 The parties refer to Randtron's claims as cross-claims. The district court, however, designated Randtron's claims against Lodi as counterclaims. In order to avoid confusion, we will adopt the parties' characterization of Randtron's claims.


6
 In further support of this contention, it should be noted that Lodi and Wausau were still negotiating with regard to nine policies that were not exhausted by the Consent Decree. See Randtron , 69 F. Supp. 2d at 1267 n.2.


7
 Randtron does not raise an Anti-Injunction Act challenge  to the May 25, 2000 order, recognizing that it falls within the relitigation exception.


8
 Relying on California statutes and caselaw, the district court determined that the only contribution rights Randtron assigned to Lodi were those derived from the two Wausau policies because the right of contribution accrues at the time of payment. Randtron, 69 F.Supp.2d at 1273 n.8 (citing Jackson v. Lacy, 100 P.2d 313 (Cal. Ct. App. 1940); Borba Farms, Inc. v. Acheson, 242 Cal. Rptr. 880, 882 (Cal. Ct. App. 1988); CAL. CODE CIV. P. 875 (c)).


