902 F.2d 1482
31 ERC 1687, 58 USLW 2668
V-1 OIL COMPANY, A Wyoming corporation, Plaintiff-Appellant,v.STATE OF WYOMING, DEPARTMENT OF ENVIRONMENTAL QUALITY;Steven P. Gerber, Defendants-Appellees.
Nos. 88-2691, 89-8011.
United States Court of Appeals,Tenth Circuit.
April 30, 1990.

F.M. Andrews, Jr., Andrews and Anderson, P.C., Riverton, Wyo., for plaintiff-appellant.
Steve C. Jones, and Karen A. Byrne, Sr. Asst. Attys. Gen.  (Joseph B. Meyer, Atty. Gen. with them on the briefs), Cheyenne, Wyo., for defendants-appellees.
Before HOLLOWAY, Chief Judge, ANDERSON and EBEL, Circuit Judges.
STEPHEN H. ANDERSON, Circuit Judge.


1
Plaintiff-appellant V-1 Oil Company ("V-1") appeals an adverse summary judgment and an award of attorneys' fees rendered by the district court.  We affirm.

BACKGROUND

2
The district court, V-1 Oil Co. v. Wyoming, 696 F.Supp. 578 (D.Wyo.1988), found the following undisputed facts:  Defendant-appellee Steven P. Gerber is an official of defendant-appellee the Wyoming Department of Environmental Quality ("DEQ"), an agency of defendant-appellee the State of Wyoming.  He was aware that previous investigations of the V-1 Oil Station in Lander, Wyoming revealed that it was a source of groundwater pollution.  On April 28, 1988, he noticed, while driving by, that the concrete above the station's underground storage tanks was being removed.  Twice he tried to find out what was being done, and twice he was refused permission to enter the property.  Informed of this, a senior assistant attorney general tried to obtain a court order allowing Gerber to inspect the premises, but no judge was available.  The attorney then advised Gerber that the Wyoming Environmental Quality Act ("the Act") authorized him to conduct a warrantless search.  That evening, Gerber, accompanied by a policeman and the Lander City Attorney, returned to the gas station, visually inspected the tanks, and took a soil sample from the exposed area.  Id. at 579-80.


3
On May 27, 1988, V-1 filed suit under 42 U.S.C. Sec. 1983, alleging that the search violated V-1's Fourth Amendment rights.  The district court granted summary judgment for each defendant.  DEQ and the State were dismissed because of their Eleventh Amendment immunity from suit in federal court.  Id. at 580.    V-1 does not appeal this holding.  Gerber was deemed entitled to judgment because the statute authorizes warrantless searches, id. at 581, such searches are constitutional, id. at 582, and Gerber's conduct fell within his qualified immunity because it violated no clearly established right, id. at 583.    The judgment in favor of Gerber is the subject of No. 88-2691.


4
The defendants then filed a motion for attorneys' fees under 42 U.S.C. Sec. 1988.  They documented the total time spent on the case, but did not state how many hours were spent on each particular issue.  See R. Vol. I at Tabs 23, 32, 35.  In an unpublished order, the court found that V-1's claims against the State and DEQ were frivolous and that for a time V-1 had relied upon an outdated version of the Act, and decided to award the defendants fees for time spent addressing those issues.  Order, Jan. 19, 1989, R. Vol. I at Tab 37, at 2-3.  V-1 does not appeal these conclusions.  The court then estimated that the defendants spent twenty-two hours responding to these claims, and awarded fees based upon that estimate.  Id. at 2.  Whether the court was entitled to estimate how much time was spent on the issues upon which it awarded attorneys' fees, or instead should have required that the movants' records be broken down by issue, is the subject of No. 89-8011.

DISCUSSION
I. WARRANTLESS SEARCH

5
A. Whether The Wyoming Environmental Quality Act Authorizes Warrantless Searches


6
Gerber claims that section nine of the Act authorizes warrantless inspections of suspected sources of pollution.  That section empowers certain officers, including Gerber, to


7
"enter and inspect any property, premise or place, except private residences, on or at which an air, water or land pollution source is located or is being constructed or installed....  Persons so designated may ... inspect any monitoring equipment or method of operation required to be maintained pursuant to this act ... for the purpose of investigating actual or potential sources of air, water or land pollution and for determining compliance or noncompliance with this act...."


8
Wyo.Stat. Sec. 35-11-109(a)(vi) (1988).


9
V-1 contends that this section did not authorize the search which took place, either because it does not authorize warrantless searches or because it only authorizes warrantless searches of monitoring equipment and methods of operation required by the Act, and underground storage tanks do not fall into this category.  We disagree.


10
V-1's first contention seems to be "that a warrant was required since the statute nowhere mentions the words 'warrantless search.' "    V-1 Oil Co. v. Wyoming, 696 F.Supp. at 581.    Courts do not infer a warrant requirement from statutes which authorize inspections but do not discuss the necessity of warrants.  Instead, a bare authorization for inspections is construed to authorize warrantless inspections.  See, e.g., Exotic Coins, Inc. v. Beacom, 699 P.2d 930, 940 (Colo.), appeal dismissed, 474 U.S. 892, 106 S.Ct. 214, 88 L.Ed.2d 214 (1985);  State v. Williams, 8 Kan.App.2d 14, 648 P.2d 1156, 1160-61 (1982);  State v. Galio, 92 N.M. 266, 587 P.2d 44, 47 (Ct.App.1978);  State ex rel. Industrial Comm'n v. Wasatch Metal & Salvage Co., 594 P.2d 894, 897 (Utah 1979).  We see no reason to believe that the Wyoming Supreme Court would construe this statute any differently.


11
Second, because the Wyoming Environmental Quality Act should be construed liberally, People v. Platte Pipe Line Co., 649 P.2d 208, 212 (Wyo.1982);  Roberts Constr. Co. v. Vondriska, 547 P.2d 1171, 1182 (Wyo.1976), we hold that underground gasoline storage tanks are a "method of operation required to be maintained pursuant to th[e] act."    The phrase "pursuant to" has a broader meaning than the word "by."    See Black's Law Dictionary 647 (abr. 5th ed. 1983).  The statute authorizes the inspection, not only of facilities which the Act specifically requires, but also of any mechanism which is necessary to avoid committing a violation.  Without proper storage equipment, gasoline could escape and pollute the surrounding land and groundwater.  This is prohibited by, inter alia, Wyo.Stat. Sec. 35-11-301 (1988).  Therefore, the Act authorized Gerber to inspect V-1's tanks.


12
B. Whether a Warrantless Search Pursuant to the Wyoming Environmental Quality Act Is Constitutional


13
The warrant requirement of the Fourth Amendment applies to commercial premises.  See v. City of Seattle, 387 U.S. 541, 543, 87 S.Ct. 1737, 1739, 18 L.Ed.2d 943 (1967).  An exception to this requirement has developed, however, for "pervasively regulated business[es]," United States v. Biswell, 406 U.S. 311, 316, 92 S.Ct. 1593, 1596, 32 L.Ed.2d 87 (1972), or " 'closely regulated' industries," Marshall v. Barlow's, Inc., 436 U.S. 307, 313, 98 S.Ct. 1816, 1820, 56 L.Ed.2d 305 (1978) (quoting Colonnade Catering Corp. v. United States, 397 U.S. 72, 74, 90 S.Ct. 774, 776, 25 L.Ed.2d 60 (1970)).  To be reasonable, the warrantless inspection of such a business must meet the three-part test enunciated in New York v. Burger, 482 U.S. 691, 107 S.Ct. 2636, 96 L.Ed.2d 601 (1987):


14
"First, there must be a 'substantial' government interest that informs the regulatory scheme pursuant to which the inspection is made....


15
Second, the warrantless inspections must be 'necessary to further [the] regulatory scheme.'


16
Finally, 'the statute's inspection program, in terms of the certainty and regularity of its application, [must] provid[e] a constitutionally adequate substitute for a warrant.'    In other words, the regulatory statute must perform the two basic functions of a warrant:  it must advise the owner of the commercial premises that the search is being made pursuant to the law and has a properly defined scope, and it must limit the discretion of the inspecting officers.  To perform this first function, the statute must be 'sufficiently comprehensive and defined that the owner of commercial property cannot help but be aware that his property will be subject to periodic inspections undertaken for specific purposes.'    In addition, in defining how a statute limits the discretion of the inspectors, ... it must be 'carefully limited in time, place, and scope.'    United States v. Biswell, 406 U.S., at 315 [92 S.Ct., at 1596]."


17
Id. at 702-03, 107 S.Ct. at 2644 (quoting Donovan v. Dewey, 452 U.S. 594, 600, 602, 603, 101 S.Ct. 2534, 2538, 2539, 2540, 69 L.Ed.2d 262 (1981)).  The two major questions relevant to the constitutionality of Gerber's search are whether V-1 is pervasively regulated and whether the Act provides a constitutionally adequate substitute for a search warrant.1

1. Whether V-1 Is Pervasively Regulated

18
A pervasively regulated industry is one which has "such a history of government oversight that no reasonable expectation of privacy could exist...."  Marshall v. Barlow's, Inc., 436 U.S. at 313, 98 S.Ct. at 1821 (citation omitted).  "[T]he doctrine is essentially defined by 'the pervasiveness and regularity of the ... regulation' and the effect of such regulation upon an owner's expectation of privacy."    New York v. Burger, 482 U.S. at 701, 107 S.Ct. at 2643 (quoting Donovan v. Dewey, 452 U.S. 594, 606, 101 S.Ct. 2534, 2542, 69 L.Ed.2d 262 (1981)).  Pervasively regulated industries "represent the 'exception' rather than the rule."    Marshall v. Horn Seed Co., 647 F.2d 96, 99 n. 1 (10th Cir.1981) (quoting Marshall v. Barlow's, Inc., 436 U.S. at 313, 98 S.Ct. at 1820);  see also McLaughlin v. Kings Island, 849 F.2d 990, 994 (6th Cir.1988).


19
Wyoming state law2 requires a license and payment of a fee before one may do business as a gasoline dealer.  Wyo.Stat. Sec. 39-6-203(b) (1988).  Violation of this requirement is a misdemeanor.  Wyo.Stat. Sec. 39-6-213(a) (1988).  The price of the gasoline must be displayed conspicuously, Wyo.Stat. Sec. 39-6-205 (1988), and gasoline tax must be collected, Wyo.Stat. Sec. 39-6-209 (1988).  However, while gasoline wholesalers and refiners must submit reports and keep special records, Wyo.Stat. Secs. 39-6-204, -206, -208 (1989), gasoline dealers face no similar requirement.  Under federal law, owners of underground gasoline storage tanks must furnish substantial and detailed information about the tanks and must permit certain inspections3 and monitoring.  See 42 U.S.C. Secs. 6991-6991i.


20
In Burger, the Supreme Court held that New York vehicle dismantlers were pervasively regulated because they were subject to the following circumscriptions:  the requirement of a license and payment of a fee;  the maintenance and availability for inspection of certain records;  the display of the operator's registration number;  and the existence of criminal penalties for failure to comply with these provisions.  Burger v. New York, 482 U.S. at 704-05, 107 S.Ct. at 2644-45.    The aggregation of requirements to which Wyoming gas stations are subject is equally intrusive, so we affirm the district court's holding that V-1 was pervasively regulated.


21
2. Whether the Statute Provides a Constitutionally Adequate

Substitute for a Warrant

22
The district court concluded, with no explanation, that the Act provided a constitutionally adequate substitute for a warrant.  V-1 Oil Co. v. Wyoming, 696 F.Supp. at 582.    We disagree.  The statute is not so " 'comprehensive and defined that the owner of commercial property cannot help but be aware that his property will be subject to periodic inspections undertaken for specific purposes.' "    Burger v. New York, 482 U.S. at 703, 107 S.Ct. at 2644 (quoting Donovan v. Dewey, 452 U.S. 594, 600, 101 S.Ct. 2534, 2539, 69 L.Ed.2d 262 (1981)).


23
First, because the Act applies to every business in Wyoming, it provides no notice whatsoever to the owner of any particular business that his or her property will be subject to warrantless inspections.  The only warrantless administrative searches which have been upheld are those conducted pursuant to narrow statutes which regulate particular industries.  Rush v. Obledo, 756 F.2d 713, 718-19 (9th Cir.1985);  cf. Marshall v. Barlow's, Inc., 436 U.S. at 321, 98 S.Ct. at 1825.    Administrative searches conducted pursuant to statutes of general applicability require search warrants.  See, e.g., Marshall v. Barlow's, Inc., 436 U.S. at 313-14, 98 S.Ct. at 1820-21 (Occupational Safety and Health Act);  See v. City of Seattle, 387 U.S. at 546, 87 S.Ct. at 1741 (Seattle Fire Code);  Lone Steer, Inc. v. Donovan, 565 F.Supp. 229, 232 (D.N.D.1982) (Fair Labor Standards Act), rev'd on other grounds, 464 U.S. 408, 104 S.Ct. 769, 78 L.Ed.2d 567 (1984);  Western Alfalfa Corp. v. Air Pollution Variance Bd., 510 P.2d 907, 909-10 (Colo.Ct.App.1973) (Colorado Air Pollution Control Act), rev'd on other grounds, 416 U.S. 861, 94 S.Ct. 2114, 40 L.Ed.2d 607 (1974);  New Mexico Envtl. Improvement Div. v. Climax Chem. Co., 105 N.M. 439, 733 P.2d 1322, 1323 (Ct.App.1987) (New Mexico Hazardous Waste Act).


24
Second, the Act provides no "assurance of regularity" of inspections.  Donovan v. Dewey, 452 U.S. 594, 599, 101 S.Ct. 2534, 2538, 69 L.Ed.2d 262 (1981).  In both Burger, 482 U.S. at 711, 107 S.Ct. at 2648, and Dewey, 452 U.S. at 604, 101 S.Ct. at 2541, the inspections were conducted on a regular basis.  The Wyoming Environmental Quality Act leaves inspectors free to inspect any business as often or seldom as he or she pleases.  A warrant is required if searches are "so random, infrequent, or unpredictable that the owner, for all practical purposes, has no real expectation that his property will from time to time be inspected by government officials."    Donovan v. Dewey, 452 U.S. at 599, 101 S.Ct. at 2538;  see also Serpas v. Schmidt, 827 F.2d 23, 29 (7th Cir.1987) ("To satisfy the 'certainty and regularity' requirement, an 'inspection program must define clearly what is to be searched, who can be searched, and the frequency of such searches.' "    (quoting Bionic Auto Parts & Sales, Inc. v. Fahner, 721 F.2d 1072, 1078 (7th Cir.1983)), cert. denied, 485 U.S. 904, 108 S.Ct. 1075, 99 L.Ed.2d 234 (1988).


25
Because the Act does not provide a constitutionally adequate substitute for a warrant, Gerber's warrantless search violated V-1's Fourth Amendment rights.


26
C. Whether Gerber Was Qualifiedly Immune From Suit


27
Government officials performing discretionary functions have a qualified immunity from suit.


28
"[W]hether an official protected by qualified immunity may be held personally liable for an allegedly unlawful official action generally turns on the 'objective legal reasonableness' of the action, assessed in light of the legal rules that were 'clearly established' at the time it was taken.


29
....


30
The contours of the right must be sufficiently clear that a reasonable official would understand that what he is doing violates that right.  This is not to say that an official action is protected by qualified immunity unless the very action in question has previously been held unlawful, but it is to say that in the light of pre-existing law the unlawfulness must be apparent."


31
Anderson v. Creighton, 483 U.S. 635, 639, 640, 107 S.Ct. 3034, 3038, 3039, 97 L.Ed.2d 523 (1987) (quoting Harlow v. Fitzgerald, 457 U.S. 800, 818, 819, 102 S.Ct. 2727, 2738, 2739, 73 L.Ed.2d 396 (1982)) (citations omitted).  "Once a defendant raises the defense of qualified immunity as a defense to an action, '[t]he plaintiff carries the burden of convincing the court that the law was clearly established.' "    Powell v. Mikulecky, 891 F.2d 1454, 1457 (10th Cir.1989) (quoting Pueblo Neighborhood Health Centers, Inc. v. Losavio, 847 F.2d 642, 645 (10th Cir.1988)).


32
"If the law was clearly established, the immunity defense ordinarily should fail, since a reasonably competent public official should know the law governing his conduct.  Nevertheless, if the official pleading the defense claims extraordinary circumstances and can prove that he neither knew nor should have known of the relevant legal standard, the defense should be sustained.  But again, the defense would turn primarily on objective factors."


33
Harlow v. Fitzgerald, 457 U.S. 800, 818-19, 102 S.Ct. 2727, 2738, 73 L.Ed.2d 396 (1982).  The defendant bears the burden of proving such circumstances.  See Pleasant v. Lovell, 876 F.2d 787, 794 (10th Cir.1989).


34
1. Whether The Right Was Clearly Established


35
When the search here at issue took place, the Burger decision was almost a year old.  The Dewey decision, upon which Burger relied heavily, was almost seven years old.  The Barlow's decision was almost ten years old.  At the same time there was no precedent for the proposition that a generally applicable statute which permitted irregular inspections could constitutionally authorize a warrantless search.  We hold that V-1's right not to be inspected without a search warrant pursuant to a statute such as the Wyoming Environmental Quality Act was clearly established.


36
2. Whether Extraordinary Circumstances Existed4


37
As its name suggests, the "extraordinary circumstances" exception to the rule that a qualified immunity defense fails where the defendant violated a clearly established right applies only "rarely."    Skevofilax v. Quigley, 586 F.Supp. 532, 539 n. 6 (D.N.J.1984).  The circumstances must be such that the defendant was so "prevented," Fernandez v. Leonard, 784 F.2d 1209, 1216 (1st Cir.1986);  Student Servs. for Lesbians/Gays & Friends v. Texas Tech Univ., 635 F.Supp. 776, 781 (N.D.Tex.1986), from knowing that his actions were unconstitutional that "he should not be imputed with knowledge of an admittedly clearly established right," Robinson v. Bibb, 840 F.2d 349, 350 (6th Cir.1988).


38
The circumstance most often considered for treatment as "extraordinary" is reliance upon the advice of counsel.  See Carey, Quick Termination of Insubstantial Civil Right Claims:  Qualified Immunity and Procedural Fairness, 38 Vand.L.Rev. 1543, 1444-55 (1985).  Of course, such reliance is not inherently extraordinary, for few things in government are more common than the receipt of legal advice.  Still, "reliance on the advice of counsel in certain circumstances rises to the level of extraordinary circumstances."    Ortega v. City of Kansas City, Kan., 659 F.Supp. 1201, 1211 (D.Kan.1987), rev'd on other grounds, 875 F.2d 1497 (10th Cir.), cert. denied, --- U.S. ----, 110 S.Ct. 325, 107 L.Ed.2d 315 (1989);  cf. England v. Hendricks, 880 F.2d 281, 284 (10th Cir.1989), cert. denied, --- U.S. ----, 110 S.Ct. 1130, 107 L.Ed.2d 1036 (1990);  Lavicky v. Burnett, 758 F.2d 468, 476 (10th Cir.1985), cert. denied, 474 U.S. 1101, 106 S.Ct. 882, 88 L.Ed.2d 917 (1986).  But cf. Powell v. Mikulecky, 891 F.2d 1454, 1457-58 (10th Cir.1989);  Melton v. City of Oklahoma City, 879 F.2d 706, 731 (10th Cir.), reh'g en banc granted, 888 F.2d 724 (10th Cir.1989).5


39
Whether reliance upon legal advice "bars our imputation to [the defendant] of constructive knowledge concerning the laws allegedly violated by his conduct," Polson v. Davis, 635 F.Supp. 1130, 1144 (D.Kan.1986), depends upon the circumstances of each case.  Compare Arnsberg v. United States, 757 F.2d 971, 982 (9th Cir.1985), cert. denied, 475 U.S. 1010, 106 S.Ct. 1183, 89 L.Ed.2d 300 (1985);  Burk v. Unified School Dist. No. 329, 646 F.Supp. 1557, 1568 (D.Kan.1986);  Wells v. Dallas Indep. School Dist., 576 F.Supp. 497, 508 (N.D.Tex.1983);  Alexander v. Alexander, 573 F.Supp. 373, 375 n. 4 (M.D.Tenn.1983), aff'd without opinion, 751 F.2d 384 (6th Cir.1984) with Watertown Equip. Co. v. Norwest Bank Watertown, 830 F.2d 1487, 1495-96 (8th Cir.1987);  Ortega v. City of Kansas City, Kan., 659 F.Supp. at 1211.    Relevant factors include how unequivocal, and specifically tailored to the particular facts giving rise to the controversy,6 the advice was, see Watertown Equip. Co. v. Norwest Bank Watertown, 830 F.2d at 1496;  Ortega v. City of Kansas City, Kan., 659 F.Supp. at 1211, whether complete information had been provided to the advising attorney(s), see Burk v. Unified School Dist. No. 329, 646 F.Supp. at 1560-61;  cf. Moore v. Marketplace Restaurant, Inc., 754 F.2d 1336, 1348-49 (7th Cir.1985) (separate opinion of Coffey, J.), the prominence and competence of the attorney(s), see Alexander v. Alexander, 573 F.Supp. at 375 & n. 4;  cf. Johnston v. Koppes, 850 F.2d 594, 596 (9th Cir.1988), and how soon after the advice was received the disputed action was taken, see Tanner v. Hardy, 764 F.2d 1024, 1027 (4th Cir.1985);  Green v. Brantley, 719 F.Supp. 1570, 1584 (N.D.Ga.1989).


40
We hold that a reasonable officer in Gerber's position--that is, an officer who conducts a warrantless search on the same day he was advised by fully informed, high-ranking government attorneys that a particular statute, which had not yet been tested in any court, lawfully authorized that particular search--should not be expected to have known that the search was unconstitutional.  This was not, as the dissent claims, "mere reliance on attorney's advice" or "attorney's advice without more."    Infra at 1490, 1491.  Because Gerber was prevented by extraordinary circumstances from knowing the relevant legal standard, he is qualifiedly immune.

II. ATTORNEYS' FEES

41
The amount of an award of attorneys' fees under 42 U.S.C. Sec. 1988 "is particularly within the discretion of the trial court."    Higgins v. Oklahoma ex rel. Oklahoma Employment Sec. Comm'n, 642 F.2d 1199, 1203 (10th Cir.1981).  "Accordingly, an attorneys' fee award ... will be upset on appeal only if it represents an abuse of discretion.  Findings on underlying questions of fact are subject to the clearly erroneous standard of review."    Mares v. Credit Bur. of Raton, 801 F.2d 1197, 1201 (10th Cir.1986) (citations omitted).


42
The district court's finding that twenty-two hours were spent on the issues for which fees were awarded is not clearly erroneous.  Nor was it an abuse of discretion to reach that finding by means of estimation, "so long as there [was] sufficient reason for its use."    Id. at 1203.    That the court was not granting fees for the entire litigation, but only for an indiscrete portion thereof, is sufficient reason for estimating hours.  Other courts have approved similar methods.  See, e.g., Jenkins by Agyei v. Missouri, 838 F.2d 260, 264 (8th Cir.), cert. denied, --- U.S. ----, 109 S.Ct. 221, 102 L.Ed.2d 212 (1988);  Aubin v. Fudala, 821 F.2d 45, 47 (1st Cir.1987);  Foster v. Board of School Comm'rs, 810 F.2d 1021, 1023-34 (11th Cir.), cert. denied, 484 U.S. 829, 108 S.Ct. 99, 98 L.Ed.2d 60 (1987);  Evers v. County of Custer, 745 F.2d 1196, 1204-05 (9th Cir.1984).  Courts of Appeal have even been known on occasion to estimate how much time particular claims consumed.  See, e.g., Raton Gas Transmission Co. v. FERC, 891 F.2d 323, 330-31 (D.C.Cir.1989);  Ustrak v. Fairman, 851 F.2d 983, 989 (7th Cir.1988).


43
We have before us a request from the defendants for atorneys' fees for work done on V-1's appeal of the fee award.  A party who successfully defends a section 1983 action and is awarded attorneys' fees, then successfully defends an appeal of that fee award, may recover attorney's fees for services rendered on the appeal.  See Glass v. Pfeffer, 849 F.2d 1261, 1266 & n. 3 (10th Cir.1988).  The standard for awarding fees remains the same as below:  whether the appeal is " 'frivolous, unreasonable, or without foundation.' "    Coverdell v. Department of Social & Health Servs., 834 F.2d 758, 770 (9th Cir.1987) (quoting Hughes v. Rowe, 449 U.S. 5, 14-15, 101 S.Ct. 173, 178-79, 66 L.Ed.2d 163 (1980) (per curiam)).  Because the appeal in No. 89-8011 meets this standard, we grant the request and "remand to the district court for the sole and limited purpose of determining a reasonable fee for the time spent defending on appeal the attorney fee award."    Glass v. Pfeffer, 849 F.2d at 1268.


44
No. 88-2691 is AFFIRMED.  No. 89-8011 is AFFIRMED, but REMANDED for a determination of an appropriate attorneys' fee award.


45
EBEL, Circuit Judge, dissenting.


46
Although I agree with the majority opinion's conclusion that the warrantless search was unconstitutional, I cannot agree with its analysis of the "extraordinary circumstances" basis for qualified immunity.  Therefore, I respectfully dissent from the majority's holding that Gerber was protected from suit by qualified immunity.  I have four concerns with the majority opinion's reliance on the extraordinary circumstances test in this case.


47
1. Attorney's advice, without more, is insufficient as a matter of law to establish qualified immunity.


48
My first concern with the majority's treatment of qualified immunity is that it advances nothing beyond receipt of an attorney's advice to establish the extraordinary circumstances necessary to bestow qualified immunity.  As the majority observed, few things in government are more common than the receipt of legal advice.  If the Supreme Court intended legal advice, without more, to be sufficient, it surely would have said so in Harlow, or it would have used some words other than "extraordinary" circumstances.


49
Although the Supreme Court has not defined what it meant by extraordinary circumstances, the term itself suggests things such as (1) extreme urgency, (2) an extraordinarily important public interest which justifies precipitous action without careful exploration of the legal underpinnings, or (3) actions by the plaintiff which somehow mislead the defendant or invited the unconstitutional conduct of the defendant.  These extraordinary circumstances share a common characteristic, which is not present in mere reliance on attorney's advice, in that they are all somewhat beyond the control of the defendant and may be objectively measured.  Reliance upon attorney's advice is solely within the control of defendants and, if that is all that were required, is vulnerable to manipulation by defendants in order to broaden their qualified immunity far beyond the parameters anticipated by the Supreme Court.


50
This is not to say that attorney's advice is an irrelevant consideration.  I agree with the proposition, found in many of the cases cited by the majority, that attorney's advice is one, but only one, factor to be considered.  I would consider it in evaluating the second prong of the extraordinary circumstances test:  i.e. whether the defendant can prove that "he neither knew nor should have known of the relevant legal standard."    If he received erroneous, but good faith, legal advice that his conduct was permissible, that would tend to show that he neither knew nor should have known that he was violating the clear legal standards, provided that there existed extraordinary circumstances which enhanced the reasonableness of his reliance upon the erroneous legal advice.


51
Four of the cases cited in the majority opinion purport to discuss receipt of legal advice in the extraordinary circumstances framework.  Watertown Equipment Co. v. Norwest Bank Watertown, 830 F.2d 1487, 1495 (8th Cir.1987), appeal dismissed and cert. denied, 486 U.S. 1001, 108 S.Ct. 1723, 100 L.Ed.2d 188 (1988);  Green v. Brantley, 719 F.Supp. 1570, 1583-84 (N.D.Georgia 1989), appeal dismissed, 895 F.2d 1387 (11th Cir.1990);  Ortega v. City of Kansas City, Kan., 659 F.Supp. 1201, 1211 (D.Kan.1987), rev'd on other grounds, 875 F.2d 1497 (10th Cir.1989);  and Burk v. Unified School District, 646 F.Supp. 1557, 1568 (D.Kan.1986).  Cf. Moore v. Marketplace, 754 F.2d 1336, 1348 (7th Cir.1985) (receipt of advice from supervisor created extraordinary circumstances).


52
Watertown Equipment and Green expressly state that reliance on attorney advice is only one of several factors to be considered in examining qualified immunity.  Similarly, in Ortega, the court, while not finding the defendants immune under the facts of that case, stated that "reliance on the advice of counsel in certain circumstances rises to the level of extraordinary circumstances."    Ortega, 659 F.Supp. at 1211 (emphasis added).  That language suggests that the advice of counsel by itself does not create extraordinary circumstances but that extraordinary circumstances requires reliance on counsel plus something more.  This appears consistent with the two part nature of the extraordinary circumstances test as articulated by Harlow.    Only the court in Burk states unequivocally that legal advice constitutes extraordinary circumstances.  However, in Burk, the law was found to be unclear and reliance on the extraordinary circumstances test merely provided an alternative ground for relief.  Thus, at most, we are dealing with dicta in that case.


53
The other cases cited in the majority opinion that discuss reliance on legal advice are not cases involving the extraordinary circumstances defense.  Rather, the majority of them merely refer to the attorney's advice as evidence going to whether the law was unclear or not violated.  See Arnsberg v. United States, 757 F.2d 971 (9th Cir.1985) (defendant did not violate clearly established law), cert. denied, 475 U.S. 1010, 106 S.Ct. 1183, 89 L.Ed.2d 300 (1086);  Wells v. Dallas Independent School Dist., 576 F.Supp. 497, 508-09 (N.D.Tex.1983) (law unclear);  Alexander v. Alexander, 573 F.Supp. 373, 376 (M.D.Tenn.1983) (Attorney advice was used by the court to show that defendant did not violate clearly established law.  However, the court notes in footnote 4 that the facts could equally show that defendant neither knew nor should have known the law.), aff'd, 751 F.2d 384 (6th Cir.1984).  Therefore, those cases address the basic Harlow test, which we have agreed was satisfied in this case.


54
2. The legal advice received here cannot constitute extraordinary circumstances.


55
Second, even assuming that receipt of attorney's advice without more could occasionally rise to the level of extraordinary circumstances, I do not believe the facts of this case justify invocation of the extraordinary circumstances test.  The majority opinion makes clear that the plaintiff has satisfied the first Harlow test by showing that the defendant has violated a clearly established constitutional right of which a reasonable person would have known.  Notwithstanding that fact, the extraordinary circumstance proposed in the opinion that overrides this knowledge is nothing more than legal advice that the requested search was authorized by Wyoming statute.    Neither the appellate briefs nor the record suggests that the defendant sought or received legal advice that the search would be constitutional under the Fourth Amendment of the United States Constitution. Thus, against the acknowledged backdrop that a reasonable person should have known that this search was unconstitutional, the defendant should at least be required to seek and obtain a specific opinion from counsel as to the constitutionality of the search before he can rebut the constructive knowledge of unconstitutionality that is imputed to him by virtue of the plaintiff's satisfaction of the first Harlow test.


56
The qualified immunity cases cited in the majority opinion do not stand for the proposition that legal advice is a generic term and that one size fits all needs.  In several of the cases cited there is nothing in the opinion to suggest that the attorney's advice was not directed specifically to the constitutional question at issue.  See, e.g., Arnsberg, 757 F.2d at 981 (whether execution of a warrant violated 4th Amendment);  Alexander, 573 F.Supp. at 378 (whether revocation of commutation of sentence deprived plaintiff of liberty interest without due process).


57
The Ninth Circuit in Johnston v. Koppes, 850 F.2d 594 (9th Cir.1988), found that whether legal advice specifically addressed the constitutionality of the alleged action is one factor to consider in determining whether reliance on that advice gives rise to qualified immunity.  See 850 F.2d at 596.    In Watertown Equipment, the Eighth Circuit found that reliance on legal advice did not establish qualified immunity, in part, because the advice "did not unequivocally assure [defendant] of the constitutionality of the [state statute]."  Watertown Equipment, 830 F.2d at 1495.


58
The district court in Ortega similarly found that the defendants were not entitled to qualified immunity because the legal advice relied upon was not sufficiently tailored to the particular acts at issue.  Ortega was a Sec. 1983 suit based on the violation of a state extradition statute.  In Ortega, the defendants failed to ask the attorneys the specific factual question of whether mailing notices to out-of-state suspects was proper.


59
In this case, Gerber failed to ask the specific legal question of whether the search was constitutional but rather he sought, and received, advice directed only to whether such a search was authorized under Wyoming law.  Gerber was the Northwest District Supervisor for the Wyoming Department of Environmental Quality, Water Quality Division and his duties included investigating discharges of pollution into groundwater.  As a district supervisor with a duty to conduct investigations, he reasonably should have known of the constitutional implications of a warrantless search and should have made sufficient inquiry to have known the clearly established legal test under Burger for administrative searches.  The record does not establish that Gerber made the necessary inquiry.


60
3. The majority's holding is contrary to the Tenth Circuit case of Melton v. City of Oklahoma City.


61
Third, I believe that the majority opinion is contrary to Tenth Circuit law.  The Tenth Circuit authority contrary to the majority's holding is Melton v. City of Oklahoma City, 879 F.2d 706, 730-31 (10th Cir.), reh'g en banc granted on other grounds, 888 F.2d 724 (10th Cir.1989).1   In Melton, the court held that attorney's advice cannot bestow immunity when conduct violates a clearly established right (such as we have found to exist in this case).  The court explained:


62
[The defendant] argues that he relied in good faith on the advice of municipal counsel in sending his letter to [plaintiff], and, therefore, he should be absolved of any personal liability for the consequences of his actions.  While superficially attractive, this argument proves too much.  Adopting the proffered position would immunize officials from liability via the simple expedient of consulting counsel.  In Harlow, the Supreme Court sought to protect officials in the good faith exercise of discretion in areas of the law which are not clearly charted.  However, where the law is clearly established, there is no justification for excusing individuals from liability for their actions.  In sum, officials are presumed to know and abide by clearly established law.  When their actions are otherwise, their claims of qualified immunity will fail.


63
Melton, 879 F.2d at 730-31.    I do not believe that Melton should be read so strictly that an individual can never be excused from liability if he acts contrary to clearly established law.  See Harlow, 457 U.S. at 818-19, 102 S.Ct. at 2738-39.    However, I do not believe that it can be read so broadly that it would permit finding Gerber immune from suit solely upon reliance on attorney advice.


64
4. The extraordinary circumstances defense was not raised below.


65
Fourth, I believe that it is inappropriate to affirm on the basis of extraordinary circumstances when that theory was not clearly advanced or argued on appeal or, apparently, below.  We can affirm on a ground not raised below provided the record is sufficiently clear to permit us to do so and provided that both parties had an adequate opportunity to develop the record on the issue that we choose to rely upon.  See Seibert v. University of Oklahoma, 867 F.2d 591, 597 (10th Cir.1989).  Here, I do not believe that the appellant has had a full and fair opportunity to develop in the record the lack of extraordinary circumstances such as urgency or compelling state interest.  I also do not believe that appellant has had an adequate opportunity to establish that the legal advice sought and given may have dealt only with the procedural compliance with Wyoming law rather than constitutional issues.


66
As stated in the majority's opinion, one of the factors in deciding whether counsel's advice can be relied upon is how specific and unequivocal the advice is.  Unless we know all of the circumstances of what the defendant sought from counsel and what the counsel advised, I fear we are deciding this case on an incomplete record and in a way that is unfair to the appellant since we are springing this defense upon it on appeal.


67
For the reasons stated above, I respectfully dissent from the majority opinion's holding that Gerber was immune from suit.



1
 The other two parts of the Burger test may be discussed summarily
V-1 concedes, Appellant's Brief at 18, and we agree, that the protection of the environment and the public from pollution in general, and from leakage from underground gasoline storage tanks in particular, is a substantial governmental interest.
We cannot determine from the record whether warrantless inspections are necessary to the regulatory scheme, i.e., whether there will be times that DEQ cannot obtain a warrant promptly enough for the subsequent search to be effective, see McLaughlin v. Kings Island, 849 F.2d 990, 996 (6th Cir.1988);  Blackwelder v. Safnauer, 689 F.Supp. 106, 139 (N.D.N.Y.1988).  Fortunately, such a determination is not necessary to our disposition of this case.


2
 Gasoline stations also may be regulated by municipal authorities, Wyo. Stat. Sec. 15-1-103(a)(xxvii) (1988), but the City of Lander has not done so


3
 Gerber has not claimed that he was acting pursuant to the federal inspection provision, 42 U.S.C. Sec. 6991d(a).  Also, the constitutionality of that provision is not before us


4
 The district court did not address this question.  We may consider it, however, because "we are 'free to affirm a district court decision on any grounds for which there is a record sufficient to permit conclusions of law, even grounds not relied upon by the district court.' "    Griess v. Colorado, 841 F.2d 1042, 1047 (10th Cir.1988) (quoting Alfaro Motors, Inc. v. Ward, 814 F.2d 883, 887 (2d Cir.1987))


5
 The dissent errs when it reads Melton as a bar to finding Gerber qualifiedly immune.  That decision does not address the extraordinary circumstances exception, so it cannot be considered binding authority on the scope of the exception.  Melton instructs us not to refer to legal advice the defendant received when we decide whether or not the governing law was clearly established;  it gives no guidance in deciding when a defendant should not be expected to have known the governing law


6
 We reject the position of the dissent that the advice must be couched in certain precise legal terms before an official is entitled to rely upon it.  See infra at 1493.  None of the cases cited above makes that suggestion.  Such a requirement cannot be inferred from the statement in Watertown Equipment that the defendants were not qualifiedly immune because the advice "did not unequivocally assure [them] of the constitutionality of the South Dakota attachment statute," 830 F.2d at 1495, because the problem there was not specificity (indeed, just like in this case, the attorney discussed the very statute under which the defendants acted), but equivocation:  the attorney told the defendants that there was " 'some risk' that [the plaintiff] could successfully attack [the statute's] constitutionality."    Id. at 1496


1
 The other Tenth Circuit cases cited by the majority are inapplicable because none of them deal with a situation where a defendant is seeking to rely on attorney's advice for immunity when his conduct violates clearly established law.  See Powell v. Mickulecky, 891 F.2d 1454 (10th Cir.1989);  England v. Hendricks, 880 F.2d 281, 284 (10th Cir.1989), cert. denied, --- U.S. ----, 110 S.Ct. 1130, 107 L.Ed.2d 1036 (1990), and Lavicky v. Burnett, 758 F.2d 468, 476 (10th Cir.1985), cert. denied, 474 U.S. 1101, 106 S.Ct. 882, 88 L.Ed.2d 917 (1986)


