
    In re NATIONAL ENVIRONMENTAL WASTE CORP., a California corporation, Debtor. NATIONAL ENVIRONMENTAL WASTE CORP., a California corporation, Appellant, v. CITY OF RIVERSIDE, a political subdivision of the State of California, Appellee. In re NATIONAL ENVIRONMENTAL WASTE CORP., a California corporation, Debtor. CITY OF RIVERSIDE, a political subdivision of the State of California, Appellant, v. NATIONAL ENVIRONMENTAL WASTE CORP., a California corporation, Appellee.
    Nos. 96-55825, 96-55852.
    United States Court of Appeals, Ninth Circuit.
    Argued and Submitted Oct. 8, 1997.
    Decided Nov. 10, 1997.
    
      William M. Burd, Burd & Naylor, Santa Ana, CA, for appellant in No. 96-55825 and appellee in No. 96-55852.
    J. Scott Williams, Rus, Miliband, Williams & Smith, Irvine, CA, for appellee in No. 96-55825 and appellant in No. 96-55852.
    Before: REINHARDT and TASHIMA, Circuit Judges, and SHADUR, District Judge.
    
    
      
       The Honorable Milton I. Shadur, Senior United States District Judge for the Northern District of Illinois, sitting by designation.
    
   TASHIMA, Circuit Judge:

Debtor National Environmental Waste Corporation (“Newco”) appeals the district court’s affirmance of the bankruptcy court’s retroactive annulment of the automatic stay. Because of the unusual circumstances of this case, we conclude that the bankruptcy court did not abuse its discretion in granting retroactive relief from the stay.

I. BACKGROUND

Newco has provided waste hauling services in a portion of the City of Riverside (“City”) since 1972. Since 1991, the City has been divided into five areas for purposes of solid waste handling services, retaining four different solid waste enterprises to service those areas. In 1991, Newco entered into a contract with the City to provide waste handling services. It was an “evergreen” contract, meaning it was automatically renewed from year to year, subject to the City’s right to cancel without cause upon eight years’ notice. The City’s contracts with the other three solid waste enterprises were also evergreen contracts.

On March 11, 1993, the City’s Utility Services/Land Use/ Energy Development Committee, at the request of the Riverside City Council, reviewed the four evergreen contracts. The Committee concluded that the eight-year notice requirement did not allow the City to provide best for its constituents. It thus recommended that the eight-year termination notices be given. The Committee stressed that its recommendation was not due to poor performance by the waste haulers, but was based on its conclusion “that it is simply good public policy to review the contracts periodically to ensure competition, innovation and the best possible service to the City’s businesses and residents.”

On May 4, 1993, Newco filed a Chapter 11 petition in bankruptcy. On May 11, 1993, at a meeting in which representatives of Newco and the other waste haulers participated, the City Council approved the Committee’s recommendation to terminate the evergreen contracts. On May 18, 1993, the City gave notice of termination to all four solid waste enterprises serving the City, including New-co. Newco’s Plan of Reorganization was confirmed in 1994. On April 10, 1995, Newco informed the City that it considered the notice of termination to be void as a violation of the automatic stay imposed by 11 U.S.C. § 362(a).

The City moved for an order determining that its actions fell under 11 U.S.C. § 362(b)(4), the police and regulatory power exception to the automatic stay or, in the alternative, for an order retroactively annulling the automatic stay. The bankruptcy court denied the motion to determine that the police and regulatory power exception applied to the City’s actions, but granted the motion to annul the automatic stay with respect to the City’s termination of the contract. In re National Envtl. Waste Corp., 191 B.R. 832 (Bankr.C.D.Cal.1996). The district court affirmed the order annulling the automatic stay and dismissed the City’s appeal from the portion of the order denying its motion to determine that its actions fell within the police and regulatory power exception to the automatic stay.

II. JURISDICTION AND STANDARDS OF REVIEW

In No. 96-55825, Newco appeals the district court’s affirmance of the order annulling the automatic stay. In No. 96-55852, the City appeals the district court’s order dismissing its appeal as moot. Orders granting or denying relief from the automatic stay are deemed to be final orders. Benedor Corp. v. Conejo Enters., Inc. (In re Conejo Enters., Inc.), 96 F.3d 346, 351 (9th Cir.1996). As these appeals are from such final orders, we have jurisdiction under 28 U.S.C. § 158(d). The decision of the bankruptcy court is reviewed de novo, without deference to the district court’s determinations. Robertson v. Peters (In re Weisman), 5 F.3d 417, 419 (9th Cir.1993). A decision retroactively to lift the automatic stay is reviewed for an abuse of discretion. Mataya v. Kissinger (in re Kissinger), 72 F.3d 107, 108 (9th Cir.1995). Finally, because it presents a question of law, we review the district court’s mootness decision de novo. Arnold & Baker Farms v. United States (In re Arnold & Baker Farms), 85 F.3d 1415, 1419 (9th Cir.1996), cert. denied, — U.S. -, 117 S.Ct. 681, 136 L.Ed.2d 607 (1997).

III. DISCUSSION

Pursuant to 11 U.S.C. § 362, a petition in bankruptcy operates as a stay against acts that may affect property of the bankruptcy estate. The automatic stay is designed to “protect debtors from all collection efforts while they attempt to regain their financial footing.” Schwartz v. United States (In re Schwartz), 954 F.2d 569, 571 (9th Cir.1992). It is also designed to protect creditors from the “race of diligence,” in which those who acted first would receive payment “in preference to and to the detriment of other creditors.” H.R.Rep. No. 95-595, at 340 (1978), reprinted in 1978 U.S.C.C.A.N. 5963, 6297. Actions taken in violation of the stay are void. Schwartz, 954 F.2d at 571-72. However, section 362(d) “gives the bankruptcy court wide latitude in crafting relief from the automatic stay, including the power to grant retroactive relief from the stay.” Id. at 572.

Many courts have focused on two factors in determining whether cause exists to grant relief from the stay: (1) whether the creditor was aware of the bankruptcy petition; and (2) whether the debtor engaged in unreasonable or inequitable conduct, or prejudice would result to the creditor. See, e.g., Easley v. Pettibone Mich. Corp., 990 F.2d 905, 911 (6th Cir.1993) (suggesting that the stay does not apply “where the debtor unreasonably withholds notice of the stay and the creditor would be prejudiced if the debtor is able to raise the stay as a defense, or where the debtor is attempting to use the stay unfairly as a shield to avoid an unfavorable result”); In re Confidential Investigative Consultants, Inc., 178 B.R. 739, 752 (Bankr.N.D.Ill.1995) (“Although there is no bright line rule, the general trend has been to evaluate two key factors: whether the creditor had notice of the bankruptcy, and how long the debtor delayed in asserting the automatic stay as a defense.”).

Newco asserts that the City’s knowledge of the bankruptcy and its own innocence of egregious conduct should be dispositive in this case. However, we have never held these two factors to be dispositive; instead, we have engaged in a case by case analysis. See Christensen v. Tucson Estates, Inc. (In re Tucson Estates, Inc.), 912 F.2d 1162, 1166 (9th Cir.1990) (“ ‘Cause’ has no clear definition and is determined on a case by case basis.”). Thus, this court, similar to others, balances the equities in order to determine whether retroactive annulment is justified. See, e.g., Albany Partners, Ltd. v. Westbrook (In re Albany Partners, Ltd.), 749 F.2d 670, 675-76 (11th Cir.1984) (weighing the facts to find that retroactive relief was reasonable); In re Murray, 193 B.R. 20, 22 (Bankr.E.D.Cal.1996) (“Balancing the equities here,” the court denied retroactive relief because the creditor “nonchalantly and continuously acted in violation of the stay”); In re Siverling, 179 B.R. 909, 912 (Bankr.E.D.Cal.1995) (“equity directs the court to grant ... retroactive relief from stay”).

Although the conduct of neither party was exemplary, “either ... not recognizing] the problem or recognizing] it and proceeding] ... without doing anything about it,” we find that the bankruptcy court did not abuse its discretion in weighing the equities in favor of the City. In re Confidential Investigative Consultants, Inc., 178 B.R. at 743. The City is represented by counsel and, if it knew of the bankruptcy, it must have or should have known about the automatic stay. However, Newco is also represented by counsel and knew enough to warn the City about an unrelated act being a potential violation of the stay, yet it failed to object to the City’s termination of the contract as such a violation. Newco even confirmed its reorganization plan in reliance on the termination of the contract, raising the issue only after confirmation. Further, the City terminated its evergreen contracts with all of its waste haulers, not just Newco, because of the eight-year notice requirement. These unusual circumstances support the bankruptcy court’s decision.

Other factors the court considered include the length of the required notice period in the contract (eight years); prejudice to the City by giving Newco exclusive rights in serving the City for three additional years; Neweo’s “reinforcement” of the perception that the termination was valid by failing to challenge it either at the May 11, 1993, City Council meeting or in its reorganization plan; possible prejudice to other parties who confirmed the plan m rehance on the eight-year termination notice; and lack of prejudice to Newco if the stay were annulled. The court’s reliance on the fact that it would have granted the relief had the City applied beforehand is also a valid factor on which to rely in granting retroactive relief. See Kissinger, 72 F.3d at 109.

We conclude, in light of all of the factors involved, that the bankruptcy court did not abuse its discretion in granting the City retroactive annulment of the automatic stay.

In its own appeal, the City addresses only the merits and not the district court’s dismissal of its appeal as moot. However, its motion in the bankruptcy court was in the alternative, suggesting that if the City prevailed on either part of its motion, it would obtain all of the relief that was necessary. We agree with the district court that affirming the bankruptcy court’s grant to the City of retroactive relief from the automatic stay for purposes of the City’s termination of the evergreen contract has rendered moot the question presented in the City’s appeal of whether the termination was an exercise of the City’s police and regulatory power.

IV. CONCLUSION

In No. 96-55825, the order of the district court affirming the bankruptcy court is AFFIRMED. In No. 96-55852, the order of the district court dismissing the City’s appeal as moot is AFFIRMED. Because the latter appeal was a “protective” appeal, the City shall recover its costs on both appeals. 
      
      . As discussed below, the Plan assumed that Newco’s contract with the City would terminate in accordance with the notice given in 1993.
     
      
      . Section 362(d)(1) provides in relevant part, "On request of a party in interest and after notice and a hearing, the court shall grant relief from the stay ... such as by terminating, annulling, modifying, or conditioning such stay-for cause....”
     
      
      . Although it is not entirely clear from the record, the bankruptcy court found that the City had actual knowledge of the bankruptcy. We defer to this finding of fact, as it is not clearly erroneous. See Weisman, 5 F.3d at 419.
     
      
      . On May 28, 1993, Newco informed the City that any attempt to recover excess dump fees would be a violation of the automatic stay.
     
      
      . The debtor’s awareness of his or her rights has been considered by one court in the analysis of whether to annul the stay. In Scrima v. John DeVries Agency, Inc., 103 B.R. 128 (W.D.Mich.1989), on which Newco relies, the fact that the debtor was unaware of his rights under the automatic stay was important to the court’s conclusion. Id. at 134. In contrast, Newco has been represented by counsel throughout.
     
      
      .Newco analogizes its conduct to the debtors’ three-year delay in Schwartz. However, in Schwartz, the sole issue was whether such violations of the stay are void or voidable. 954 F.2d at 570-71. We stated that a court has power to ratify retroactively a violation of the stay, but did not address the issue of retroactive annulment in that case. Id. at 573.
     