Balla v. Idaho

FOR PUBLICATION UNITED STATES COURT OF APPEALS FOR THE NINTH CIRCUIT WALTER D. BALLA,  Plaintiff-Appellee, No. 10-35413 v.  D.C. No. 1:81-cv-01165-BLW STATE OF IDAHO; IDAHO STATE BOARD OF CORRECTION, OPINION Defendants-Appellants.  Appeal from the United States District Court for the District of Idaho B. Lynn Winmill, Chief District Judge, Presiding Argued and Submitted April 13, 2011—Seattle, Washington Filed April 17, 2012 Before: Andrew J. Kleinfeld, Barry G. Silverman, and Kim McLane Wardlaw,* Circuit Judges. Opinion by Judge Kleinfeld *The original panel consisted of Judge Beezer, Judge Kleinfeld, and Judge Silverman. Judge Wardlaw was drawn to replace Judge Beezer, who is since deceased. Judge Wardlaw has read the briefs, reviewed the record, and listened to tape of the oral argument. 4217 4220 BALLA v. STATE OF IDAHO COUNSEL Mark A. Kubinski, Deputy Attorney General, Boise, Idaho, for the appellants. Jason E. Prince, Stoel Rives LLP, Boise, Idaho, for the appel- lee. OPINION KLEINFELD, Senior Circuit Judge: We address an attorneys’ fees award in a class action under the Prisoner Litigation Reform Act. Facts This is a class action, more than a quarter century old, by Idaho state prisoners at the Idaho State Correctional Institu- tion (ISCI). The district court initially “was not successful in obtaining attorney representation”1 for the prisoners, so they litigated pro se. They went to trial and won their case. The court found, in 1984, that because of deliberate indifference, without any connection to a legitimate penological purpose, the inmates were subjected to needless pain and suffering, on account of inadequate medical and psychiatric care.2 That, plus overcrowding, and inadequate attention to housing and security, contributed to stabbings, assaults, gang rape, and sexual slavery.3 Close custody (the classification for espe- cially dangerous or vulnerable prisoners) was so badly man- aged that “[v]irtually every young man assigned to that 1 Balla v. Idaho State Bd. of Corr., 595 F. Supp. 1558, 1561 (D. Idaho 1984) (“Balla I”). 2 Id. at 1568. 3 Id. at 1570. BALLA v. STATE OF IDAHO 4221 custody level was brutally raped.”4 The court issued an injunction to remedy the constitutional violations.5 Subsequently the court held hearings on compliance.6 The prisoners were still pro se.7 In 1987, the district court ruled that overcrowding had worsened, to the point where it amounted to “the unnecessary and wanton infliction of pain.”8 The court now made the injunction more precise and specific to each housing unit of the prison.9 The court specifically lim- ited double-celling—that is, two inmates in one cell—for some classifications, and also limited the number of prisoners housed in some units.10 The court expressed particular con- cern about housing “close custody inmates,” who “are often volatile, violent and predatory,” with others upon whom these prisoners preyed.11 The injunction remained in effect in 2008 and 2009, when the facts giving rise to this case occurred. The injunction pro- hibited, among other things: (1) putting “close custody” pris- oners two in a cell instead of one in a cell, or housing more than 78 inmates in Unit 9; (2) housing more than 108 inmates in Units 10 or 11; and (3) housing more than 144 inmates in Unit 13.12 The State was further enjoined from using “any other vehicle, scheme or mechanism designed to undermine the spirit and letter” of the injunction.13 No question has been raised in this case regarding the continuing validity of the injunction. 4 Id. at 1579. 5 Id. at 1583. 6 Balla v. Bd. of Corr., 656 F. Supp. 1108 (D. Idaho 1987) (“Balla II”). 7 Id. at 1109. 8 Id. at 1115. 9 Id. at 1119-20. 10 Id. 11 Id. at 1117. 12 Id. at 1119-20. 13 Id. at 1119. 4222 BALLA v. STATE OF IDAHO The State of Idaho moved in 2007 to terminate the twenty- year-old injunction. The district court noted that it had previ- ously appointed the Portland law firm, Stoel Rives LLP, to represent the prisoner class, “and the law firm worked on the litigation for almost two years without being paid for its work.” The firm subsequently was awarded a portion of the fees it had earned, and withdrew as counsel. Because of the State’s motion, the court determined that counsel was again necessary and gave notice that “the Court will attempt to locate counsel for Plaintiffs.” In April 2007, the State withdrew its motion to terminate the injunction. Evidently the injunction was still required to rectify constitutional violations, despite the injunction’s decades-long duration. The district court concluded that it “must appoint counsel to represent the interests of the class members because the inmates cannot proceed pro se.” After a lack of success finding anyone else, and considering Stoel Rives’s experience and competence at representing the inmates, the court reappointed the firm. Stoel Rives submitted several interim bills. After considering objections to particular charges, the court ordered payment of amounts it calculated to be due. Those interim awards have not been appealed. This appeal arises out of a crisis at the end of 2008 and the beginning of 2009. Idaho had been housing 650 of its prison- ers in private prisons in Texas and Oklahoma. Idaho decided to terminate contracts with the private prison operators in those states, both out of a desire to save money and because of concerns about staff shortages at the private prisons. In October 2008, the State terminated the Texas contract and notified the Texas prison operator that it would remove the prisoners by January 5. But Idaho did not then have facilities in which to house the Texas prisoners. By late November, with the return date less than two months away, the Depart- ment of Correction had decided that it would convert a ware- house on the prison grounds, formerly used as an upholstery shop, into a new housing unit, to be called “Unit 24.” The BALLA v. STATE OF IDAHO 4223 plan was to have a big open area housing all the prisoners in bunk beds. Inmates would use toilet facilities in two trailers outside the building. Stoel Rives learned of the upholstery warehouse plan from the newspapers. On December 11, the firm wrote the deputy attorney general handling the case that the plan would appear to violate the prohibition in the injunction against double- celling and against housing inmates on “nondesigned cell areas,” that is, areas not originally intended to be used as cells. Counsel asked the State for an explanation in hopes of avoiding litigation. The State responded that it would make the project manager available for a meeting, though “due to the holidays, the time for such a meeting is somewhat limit- ed,” to December 22, 23, 28 or 29. A December 22 meeting left a number of issues unresolved. In a January 2 email, the State advised Stoel Rives that 200 inmates would live in the converted warehouse, construction was progressing but incomplete, and that the two planned outbuildings for bath- room facilities were not yet ready. The State arranged to bring the prisoners back from Texas before the modifications to the warehouse and the toilet facili- ties could be completed. Before the Texas prisoners arrived, it moved 200 prisoners from other units of the Idaho prison into the warehouse, since it planned to house some of the Texas prisoners in preexisting units. The conversion project was behind schedule, but the State did not reschedule the return of the Texas prisoners. Only one of the two planned outdoor bathroom trailers was on-site, and it was not function- ing. Because the bathroom outbuildings were not yet ready, the 200 inmates already moved into the warehouse would have to share 4 toilets, 3 urinals, and 4 sinks already built into the warehouse, and would have to be transported to other units for showers. The inmates who were moved into the warehouse were notified only about 45 minutes in advance that they would be moving. Correctional officers confiscated valuable electronic items for storage elsewhere. There was a 4224 BALLA v. STATE OF IDAHO shortage of plastic totes in which the prisoners were to store their personal effects. The bunk beds in the warehouse were lower quality than those in the other units. The district court found that many prisoners “were upset about their new living conditions.” The State’s plan failed immediately, even before the pris- oners returning from Texas arrived. On January 2, after the lights were turned down for the night and within a few hours of being moved to the warehouse, the 200 inmates rioted. The prison lost control. The riot “tore the place apart.” Only two guards were in the warehouse unit. They retreated to a plexiglass-shielded control room, a protective structure in the partially converted upholstery shop. The inmates were unable to break through the plexiglass shield to get at the guards. But, “[u]ndaunted, inmates climbed onto the roof of the room and began to stomp a hole through the plywood.” Fortunately, before the inmates succeeded, the two guards broke a window with a shovel and escaped from the rioting prisoners. The inmates then broke through into the control room, set a small fire, and rushed through the exterior doors and out of the building. The State now had an already overcrowded prison and a destroyed warehouse it had intended to use to accommodate the 300 returning Texas prisoners. They were still not back. Despite the now unusable converted warehouse facility, the state went ahead with flying 300 inmates back from Texas, there being no better alternative. The Texas facility had arranged to cease operating when the Idaho prisoners left, and the local jails in Idaho could not hold the incoming prisoners from Texas. When Stoel Rives had met with State officials and the district judge, the director of the Department of Cor- rection said they would do “everything possible” to end the double-celling within 60 days. The director did not give an assurance of a date when the State would bring itself into compliance with the existing injunction, just an aspiration. BALLA v. STATE OF IDAHO 4225 Because the upholstery shop had not been a subject of the injunction, the housing conditions there did not violate its express terms, though the conditions might have violated the “spirit and letter” catch-all clause. But because the riot had made it unusable, and the State had brought back the Texas inmates anyway, it violated the letter of the injunction by double-celling inmates in the preexisting units. The State acknowledged that it had violated the population limits in let- ters to both Stoel Rives and the Court on January 5, 2009, though it noted this was because the upholstery warehouse had been destroyed. Stoel Rives responded with letters and telephone calls to try to work out a plan to bring the State into compliance. The State responded that it intended to end pro- hibited double-celling by March 1, but that plans for the ware- house had not been finalized. When Stoel Rives complained of the lack of a firm commitment to any date and a lack of any explanation of why roughly two months was necessary, the State responded that in its view that amount of time was “rea- sonable” and “realistic” considering “the realities of prison management.” Stoel Rives moved, on January 16, for an order to show cause why the defendants should not be held in contempt, and for an order requiring the State to quit violating the double- celling prohibition in the injunction by February 4, to pay $5,000 per day for each day of violation of the injunction, and to remove by March 1 one of the two beds and one of the two lockers from each cell where double-celling was prohibited. The State responded on January 30, a week before the hearing set for the motion, that as of the day before, “all 151 beds” violating the injunction “have been vacated.” Evidently, what was “realistic” considering “the realities of prison manage- ment” changed when the state received the contempt motion. Thus by the time the contempt motion was heard on February 18, the State had complied. The district court held two days of hearings, and, the viola- tion of the injunction having been rectified, declined to hold 4226 BALLA v. STATE OF IDAHO the defendants in contempt. The court noted that to the extent the motion sought deadlines for compliance with the double- celling limitations, it was moot, because the State had brought itself into compliance. The court found that the defendants’ preparation for the influx of 300 inmates from Texas was flawed, stating that it was “difficult to understand how Defen- dants believed they were going to retrofit a warehouse with the necessary facilities to contain a large group of prisoners in a little over four weeks.” But the three-and-a-half week period during which the double-celling injunction provision was violated would have been considerably shorter, had the inmates not rioted. The riot created a “true exigency” in which “no good choices were open” to the State, other than the double-celling. Therefore, despite the “obvious missteps” in preparation of Unit 24, the court did not find that the State “intended to exceed the population caps before the riot occurred.” The court concluded that the State’s inability to comply with the double-celling provisions on account of the riot, combined with innocent intent, was a defense to con- tempt. The court noted that, had the State “remained noncom- mittal about setting a firm deadline,” instead of quickly bringing itself into compliance after the contempt motion was filed, the motion for contempt “would have had much more force.” The court expressed a concern that, since the State had brought itself into compliance, sanctions might be punitive rather than remedial in nature, importing the criminal rather than the civil standard. The court accordingly denied the motion to hold defendants in contempt and declined to impose sanctions for the temporary violation of the injunction. Subsequently, Stoel Rives moved for an award of $77,608.20 in attorneys’ fees, $2,249.20 in costs and expenses, plus $269.10 in postage and office supplies for the class representative. The motion was not just for the imbro- glio arising out of the return of the Texas prisoners, but rather for a year and a half of monitoring, from December 11, 2007 through June 22, 2009. The State did not dispute that monitor- ing fees would be awardable, but disputed amounts and BALLA v. STATE OF IDAHO 4227 whether some of the work was necessary, and objected that awarding anything for the contempt motion would be errone- ous, because plaintiffs had not prevailed on that motion. The district court carefully analyzed the issues and the amounts claimed, and granted in part and denied in part. The court noted that it was undisputed that plaintiffs were the pre- vailing party in all three Balla cases, and reasoned that under the Prisoner Litigation Reform Act and our decision in Webb v. Ada County,14 “attorneys’ fees can be awarded for post- judgment work in enforcing and monitoring the court’s prior judgments,” without proof of a new constitutional violation. Addressing defendants’ argument that counsel should not be compensated for any work on the contempt motion, the court found that even though it had denied the motion, plaintiffs’ counsel “played a key role in monitoring and working with the IDOC to resolve the overcrowding issue.” The court also explained that it had appointed Stoel Rives “for the specific purpose of monitoring” the injunctive relief, and that the firm’s services were “inextricably intertwined” with monitor- ing compliance with the injunction on which plaintiffs had prevailed. “[T]he legal services were directly and reasonably incurred in monitoring the Balla injunctions.” The court awarded a slightly reduced amount: $76,185.60 in attorney’s fees, $1,249.20 in costs and $46.94 in postage and office sup- ply costs for the class representative. The State appeals the award of attorneys’ fees and costs in connection with the prisoners’ contempt motion. Analysis Periodic fee awards for monitoring compliance with a final judgment are appealable if the award disposes of the attor- neys’ fee issue for the work performed during the time period 14 Webb v. Ada County, 285 F.3d 829 (9th Cir. 2002). 4228 BALLA v. STATE OF IDAHO covered by the award.15 We therefore have jurisdiction under 28 U.S.C. § 1291. [1] Defendants argue that because the prisoners lost on their motion to hold defendants in contempt of court, the dis- trict court erred in awarding attorneys’ fees. We review attor- neys’ fee awards for abuse of discretion16 and matters of law de novo.17 The central legal question is whether, where a party previously prevailed and won a judgment, fees of a court- appointed monitor are barred for efforts leading to a motion that was denied. We conclude that the answer is maybe, in the appropriate exercise of discretion by the district court. We reject defendants’ suggestion that fee awards are necessarily barred, and we conclude that the district judge acted within his discretion in awarding fees in this case. Here are the parameters of this case. First, the prisoners were and are a prevailing party in the lawsuit. They went to trial and won a judgment. Second, their subsequently appointed counsel filed a motion to hold the defendants in contempt for violating the injunction the prisoners had won, and, because the State would not commit itself to obeying the injunction by any set date, it was reasonable to file it. Third, their filing of the motion was what the Supreme Court has called in another context18 a “catalyst” spurring the defendants to conform quickly to the injunction. Fourth, the prisoners’ motion was denied. And fifth, a major reason why the motion was denied is that before it was heard, the defendants brought themselves into conformity with the injunction. 15 See Madrid v. Gomez, 190 F.3d 990, 994 n.4 (9th Cir. 1999); Gates v. Rowland, 39 F.3d 1439, 1450 (9th Cir. 1994). 16 Richard S. v. Dep’t of Dev. Servs., 317 F.3d 1080, 1085 (9th Cir. 2003). 17 Webb v. Ada County, 285 F.3d 829, 834 (9th Cir. 2002). 18 Buckhannon Bd. & Care Home, Inc. v. W. Va. Dep’t of Health & Human Servs., 532 U.S. 598, 601 (2001). BALLA v. STATE OF IDAHO 4229 Defendants argue that Buckhannon Board & Care Home, Inc. v. West Virginia Department of Health & Human Services,19 and the Seventh Circuit’s analysis in Alliance To End Repres- sion v. City of Chicago,20 categorically prohibit an attorneys’ fee award for filing and losing a contempt motion. Defendants do not quarrel with the proposition that the motion was a cata- lyst speeding their conduct to conform to the injunction, but they read Buckhannon to mean that being a catalyst alone does not suffice for an award of attorneys’ fees. That is too broad a reading of Buckhannon. A. Monitoring fees after Buckhannon [2] We have already decided in Prison Legal News v. Sch- warzenegger that monitoring fees not resulting in additional relief are allowable after Buckhannon.21 Two out of three of our sister circuits to have ruled on the matter have agreed.22 The Seventh Circuit concluded otherwise, in Alliance, holding that if monitoring efforts do not produce a judgment or order, then under Buckhannon such legal work is not compensable.23 19 Id. 20 356 F.3d 767 (7th Cir. 2004). 21 Prison Legal News v. Schwarzenegger, 608 F.3d 446, 452 (9th Cir. 2010) (“We therefore hold that PLN may recover attorneys’ fees under § 1988 for monitoring the state officials’ compliance with the parties’ set- tlement agreement.”). 22 Cody v. Hillard, 304 F.3d 767, 773 (8th Cir. 2002) (“[A prior court- ordered consent decree] was clearly a ‘judicially sanctioned change’ in the parties’ relationship that conferred prevailing party status on the class under Buckhannon.”); Johnson v. City of Tulsa, 489 F.3d 1089, 1108 (10th Cir. 2007) (“The Decree itself was such a change [resulting in a judicially sanctioned change in the parties’ legal relationship], and attorney fees incurred for reasonable efforts to enforce that change—that is, protect the fruits of the Decree—are compensable.”). 23 Alliance To End Repression v. City of Chicago, 356 F.3d 767, 771 (7th Cir. 2004) (“Monitoring may reduce the incidence of violations of a decree, but if it does not produce a judgment or order, then under the rule of Buckhannon it is not compensable.”). 4230 BALLA v. STATE OF IDAHO Alliance emphasized that the fees in that case were incurred by lawyers with no duty to monitor the court-ordered relief,24 and that the huge amount of time they put into the case, far from being a catalyst bringing about conformity with the decree, was work “down the drain.”25 For these reasons, we might agree with the Seventh Circuit on the result in that case, and it might limit Alliance were they faced with our case. The Seventh Circuit rule is phrased categorically—no fees without additional judicially ordered relief—so it is worth explaining why we reject such a categorical rule. The compelling reason why a categorical rule as cited in Alliance is mistaken is that Buckhannon did not overrule Pennsylvania v. Delaware Valley Citizens’ Council for Clean Air.26 Delaware Valley involved a different statute, the Clean Air Act, which allows fees “whenever the court determines such award is appropriate.”27 But the Court did not uphold fees for post-judgment work because of the greater liberality of the statute. Instead, it applied the same standard as that for civil rights cases under the “prevailing party” provision of 42 U.S.C. § 1988(b).28 That makes Delaware Valley applicable to the “prevailing party” issue in this case. The Court noted that several circuits had held that “postjudgment monitoring of a consent decree is a compensable activity for which counsel is entitled to a reasonable fee,”29 and concluded that participa- 24 Id. at 772 (“Neither the original nor the modified decree imposes on these lawyers any duty of operating the compliance machinery.”). 25 Id. at 770. 26 478 U.S. 546 (1986). 27 Sec. 304(d) of the Clean Air Act, 42 U.S.C. § 7604(d). 28 Delaware Valley, 478 U.S. at 560 (“Given the common purpose of both § 304(d) and § 1988 to promote citizen enforcement of important fed- eral policies, we find no reason not to interpret both provisions governing attorney’s fees in the same manner.”). 29 Id. at 559. BALLA v. STATE OF IDAHO 4231 tion in the postjudgment proceedings at issue was compensa- ble.30 Buckhannon did not cite or purport in any way to overrule Delaware Valley, and the cases are easily reconciled. In Buck- hannon, the Supreme Court held that “prevailing party” fees could not be awarded to a party “that has failed to secure a judgment on the merits or a court-ordered consent decree,” even though its efforts had “achieved the desired result because the lawsuit brought about a voluntary change in the defendant’s conduct.”31 The Court concluded that, to be a “prevailing party” for purposes of § 1988(b), a party must secure some material alteration in the legal relationship between the parties, and that being a “catalyst” for change does not suffice.32 [3] Before Buckhannon came down, we had held in Keith v. Volpe that under Delaware Valley attorneys’ fees for post- judgment monitoring of a consent decree were awardable in civil rights cases, even in the absence of a contempt finding or other subsequent judicial relief.33 In Prison Legal News we addressed whether Keith was still good law, and reconciled Delaware Valley and Buckhannon. We held that “prevailing party” status has been obtained and remains in effect when a party has obtained an enforceable settlement agreement or consent decree.34 We rejected the Seventh Circuit’s view in Alliance that only monitoring that produces a judgment or 30 Id. at 560. 31 Buckhannon, 532 U.S. at 600. 32 Id. at 605. 33 Keith v. Volpe, 833 F.2d 850, 857 (9th Cir. 1987) (“We hold that a finding of contempt or obstruction of implementation is not a prerequisite to an award of attorney fees for reasonable post-judgment monitoring of a consent decree.”). 34 Prison Legal News, 608 F.3d at 451 (affirming Keith’s holding that “a plaintiff who obtains a legally enforceable settlement agreement qualifies as a ‘prevailing party’ ”). 4232 BALLA v. STATE OF IDAHO order is enforceable.35 We reasoned that Keith v. Volpe was not overruled by Buckhannon, because Buckhannon “did not mention, much less overrule,” Delaware Valley.36 [4] Our precedents compel the conclusion that Stoel Rives’s compliance monitoring was compensable. In Johnson v. City of Tulsa, the Tenth Circuit similarly rejected Alliance, because Alliance had erroneously treated Buckhannon as though it had overruled Delaware Valley.37 Buckhannon speaks to the case where there never has been judicially ordered relief. Delaware Valley speaks to the case where there has been judicial relief, though the monitoring work is subse- quent to the judicial order and produces no new order. This distinction makes practical sense for two reasons. First, injunctions do not always work effectively, without lawyers to see that the enjoined parties do what they were told to do. Second, in most cases, no orders are needed after the first, because just as night watchmen deter burglary, monitors deter violations of injunctions. B. Compensation for a motion that was denied The novel twist in this case is that the district court awarded what might be characterized as fees for losing. The motion for an order to show cause why the defendants should not be held in contempt was denied, because the defendants had brought themselves into conformity with the injunction between the time the motion was filed and the time it was heard, and because the State did not intentionally violate the Balla injunction. There are two aspects requiring our consid- eration. First, did denial of the contempt motion require denial of fees as a matter of law? And second, was the award of fees an abuse of discretion? We conclude that the answer to both questions is “No.” 35 Id. 36 Id. at 452. 37 Johnson v. City of Tulsa, 489 F.3d 1089, 1108 (10th Cir. 2007). BALLA v. STATE OF IDAHO 4233 [5] The Prisoner Litigation Reform Act controls the attor- neys’ fees award in this case.38 In actions by prisoners, it is not enough that fees are authorized under the Civil Rights Attorney’s Fees Award Act of 1976.39 Under the Prisoner Liti- gation Reform Act, fees “shall not be awarded, except to the extent that” the fee was directly and reasonably incurred in proving a violation of the plaintiff ’s rights, and either the amount is proportionate to the relief ordered, or alternatively, the fee is “directly and reasonably incurred in enforcing the relief.”40 The statute provides in relevant part: In any action brought by a prisoner who is confined to any jail, prison, or other correctional facility, in which attorney’s fees are authorized under section 1988 of this title, such fees shall not be awarded except to the extent that— (A) the fee was directly and reasonably incurred in proving an actual violation of the plaintiff ’s rights protected by a statute pursuant to which a fee may be awarded under section 1988 of this title; and 38 See 42 U.S.C. § 1997e. 39 42 U.S.C. § 1988(b) provides: In any action or proceeding to enforce a provision of sections 1981, 1981a, 1982, 1983, 1985, and 1986 of this title, title IX of Public Law 92-318, the Religious Freedom Restoration Act of 1993, the Religious Land Use and Institutionalized Persons Act of 2000, title VI of the Civil Rights Act of 1964, or section 13981 of this title, the court, in its discretion, may allow the prevailing party, other than the United States, a reasonable attorney’s fee as part of the costs . . . . 40 42 U.S.C. § 1997e(d)(1). 4234 BALLA v. STATE OF IDAHO (B)(i) the amount of the fee is proportionately related to the court ordered relief for the violation; or (ii) the fee was directly and reasonably incurred in enforc- ing the relief ordered for the violation.41 This statutory language allows for an argument that no fees can be awarded for any work that does not “prov[e] an actual violation,” because subsection (A) is a condition for both (B)(i) and (B)(ii). We considered and rejected that argument in Webb v. Ada County.42 We held in Webb that that reading had to be mistaken because if it were correct, it “would render the language of subsection (B)(ii) superfluous.”43 That lan- guage creates an exception to the exclusion of attorneys’ fees where “the fee was directly and reasonably incurred in enforc- ing the relief ordered for the violation.”44 The Webb court continued: If a postjudgment fee request could only be granted if the attorney’s services were directly linked to a discrete constitutional violation, fees incurred “in enforcing the relief” that the court had ordered because of demonstrated previous constitutional vio- lations, could not be awarded.45 By expressly providing for fee awards for “enforcing” relief ordered, Webb held, Congress can only have meant that law- yers’ enforcement work after the order providing relief be compensable, even though that monitoring does not result in a second judgment or order. That construction of § 1997e(d)(1) makes more sense of the reconciliation of Dela- 41 Id. (emphasis added). 42 285 F.3d 829 (9th Cir. 2002). 43 Id. at 834. 44 42 U.S.C. § 1997e(d)(1)(B)(ii). 45 Webb, 285 F.3d at 834. BALLA v. STATE OF IDAHO 4235 ware Valley and Buckhannon than an alternative reading, because, with well-behaved defendants, “enforcing relief” is achieved by monitoring alone, and there are no subsequent judgments or orders. Under Webb, the Prisoner Litigation Reform Act’s “prov[e] an actual violation” requirement is sat- isfied when the prisoners have previously won an injunction. [6] That is not to say that once an injunction has been obtained, attorneys’ fees are unrestricted. The statutory scheme should be read, under Delaware Valley, Buckhannon, Prisoners Legal News, and Webb, to mean that if prisoners file an action but do not win an order or judgment establishing that they have proved a violation of their rights, no fees may be awarded. Once they have proved a violation, as by an injunction, the subsection (A) requirement has been satisfied. Then fees may be awarded proportionally to the relief granted, under subsection (B)(i). Or alternatively, for monitor- ing, the limitation of subsection (B)(ii) applies: the fee is allowable only if and to the extent that it is “directly and rea- sonably incurred in enforcing the relief ordered” in the injunc- tion. That reading conforms both to the statutory text and to the cases. The requirement that the court exercise discretion means it must assure that the case is not being milked by a monitor after the injunction has been obtained, for fees that are unreasonable in amount, for work not reasonably per- formed to enforce the relief, or for work not directly related to enforcing the relief. [7] The prisoners in this case had long ago won their injunction, so subsection (A) was satisfied, and they did not have to win further judicial relief to get paid for their lawyers’ work. But the prisoners not only did not win anything else, they lost, on their contempt motion. Can a fee be “directly and reasonably incurred in enforcing the relief” when the work was on a motion that was denied? Here, we conclude it can. The answer might surprise one inexperienced in litigation, but such losing motions as the one at issue here are a common and effective tool for bringing about conformity to the law. 4236 BALLA v. STATE OF IDAHO Such motions might be seen as the opposite of a Pyrrhic vic- tory. Despite losing the battle over the contempt motion, the prisoners nevertheless won the war by inducing the State’s prompt return to compliance with the injunction. [8] The district court found that even though the contempt motion was denied, Stoel Rives’s efforts, including the denied motion, “played a key role” in resolving the overcrowding issue at the prison, and that such motions are appropriate “to ensure the injunctive relief is being complied with.” The facts amply support the finding. Before the motion, on January 12, the best the State claimed to be able to do was use its best efforts, without any assurance of success, to conform to the injunction by the beginning of March. Stoel Rives filed the contempt motion on January 16. Thirteen days later, on Janu- ary 29, more than a month earlier than its earlier anticipated date of March 1, the State was back in compliance with the injunction. This was, significantly, before the scheduled hear- ing on the contempt motion. The immediacy of the prison riot after the move to the warehouse shows the value of forcing the State to speed up. The best defense against an action or motion to compel compliance with a legal obligation is compliance. Unlike the work in Alliance, a motion that brings about compliance is not work “down the drain.” The object of the motion was to obtain compliance, not to win an order hopefully leading to compliance. The object was attained. If in a battle to take a hill, the adversary flees instead of fighting to a bloody defeat, the taking of the hill makes the battle a victory. Probably the most common example of motions to compel compliance that are denied, but which are nevertheless suc- cessful as a practical matter, is in civil discovery. Frequently, interrogatories are not answered in 30 days as required by Fed. R. of Civ. P. 33(b)(2), and requests for production are not satisfied within 30 days as required by Rule 34. Because in matters of any complexity, the time limits are very short, BALLA v. STATE OF IDAHO 4237 a lawyer typically will call a noncompliant adversary a couple of weeks after the deadline, followed by a letter a few weeks after the call. If the party still has not received its discovery or an adequate assurance, the lawyer will move for an order compelling disclosure or discovery under Rule 37(a). Rule 37(a)(5)(A) requires the court to award attorneys fees in most circumstances where “the disclosure or requested discovery is provided after the motion was filed,” even though in such a circumstance, there would be no order compelling the party to do what it has already done. The victory sought is getting the answers or documents, not getting an order to produce them. Thus there is nothing unusual about awarding fees for losing, when the loss is caused by the effectiveness of the legal work in bringing about performance of a legal obliga- tion. [9] In this case, the judge had discretion to consider whether Stoel Rives’s work on the motion to compel confor- mity to the injunction was “directly and reasonably incurred in enforcing the relief.” The district court acted within the bounds of its discretion in awarding fees in a reasonable amount for bringing about that conformity with the injunc- tion. To decide whether a lawyer’s bills were “reasonably incurred,” a judge properly looks at whether what the lawyer did was reasonable when he did it, and compensates for time reasonably spent. Here, Stoel Rives’s work was what one would expect of a lawyer working for a client that could afford its efforts but that was not indifferent to the cost. The firm showed no evidence of milking the case, and the fees were “directly and reasonably incurred.” AFFIRMED.