
92 Wn.2d 306 (1979)
596 P.2d 285
LLOYD A. PETERSON, Respondent,
v.
THE DEPARTMENT OF ECOLOGY, ET AL, Appellants.
No. 45471.
The Supreme Court of Washington, En Banc.
June 14, 1979.
Slade Gorton, Attorney General, Charles B. Roe, Jr., Senior Assistant, and Robert E. Mack, Assistant, for appellants.
Schillberg & Sorlien, P.L.C., by Charles T. Schillberg, for respondent.
WILLIAMS, J.
The State Department of Ecology appeals a writ of mandamus issued by the trial court ordering the department to issue a permit to respondent Peterson for the withdrawal of public ground waters. We reverse.
The complex factual and procedural history of this case can be summarized as follows:
Peterson owns property located within the boundaries of the state's Quincy Ground Water Management Subarea *308 (Quincy Subarea). See WAC 173-124 and 173-134. In or about 1948, a previous owner, Zimmerman, dug a well on the property without a permit to do so. Zimmerman's successor, Shinn, installed a pump in 1956. Since that time, water has been withdrawn at the rate of 640 gallons per minute (g.p.m.) for the seasonal irrigation of crops. In 1973, Shinn filed a water right claim with the Department of Ecology (department) pursuant to RCW 90.14.041.
In 1974, Shinn sold the property to Peterson. Then, in January 1975, a hold was placed on the processing of applications for the use of public ground waters in the Quincy Subarea by the department pending further investigation of water availability. In February 1975, Peterson filed with the department two applications involving the use of water. One was for a permit to use artificially stored ground water pursuant to WAC 173-136 and the other was for a permit to withdraw public ground waters pursuant to RCW 90.44.050. The department returned the applications with notice that (1) the application for natural ground water must be resubmitted to obtain a priority date, and (2) no permits would be issued by the department pending further study of the Quincy Subarea. Peterson resubmitted the application for a permit to appropriate public ground water, and the department gave him a priority date of January 23, 1976. No action was taken on either of the applications by the department.
In 1977, the department issued a cease and desist order, as authorized by RCW 43.27A.190, which prohibited Peterson from making any further withdrawals from the well in excess of the amounts exempt under RCW 90.44.050 without a permit. Peterson filed an appeal of the order with the Pollution Control Hearings Board (PCHB). The notice of appeal, however, went beyond the question of whether Peterson was withdrawing water without a permit in violation of RCW 90.44.050. It also raised the issues of the propriety of the priority date assigned to the application, the validity of the department's finding that ground water was in short supply, and the due process afforded Peterson. An *309 amended notice of appeal raised the additional questions of the effect of a water right claim filed under RCW 90.14, prescriptive rights, unconstitutional taking, and the department's abuse of discretion. In short, the appeal of the cease and desist order raised those issues germane to the question of whether the department had unlawfully failed to issue Peterson a permit to withdraw ground waters.
A prehearing conference was held in July 1977 with attorneys for Peterson and the department. The prehearing conference report contained the following provisions:
I. CONTENTIONS
Appellant Peterson will rely at the formal hearing on the factual and legal contentions set forth in his Appeal of Order (filed February 16, 1977) and Amended Notice of Appeal of Order (dated March 15, 1977) . ..
...
IV. ACTION OF PRESIDING OFFICER
1. Issues, exhibits, and witnesses at the hearing on the merits will be limited to those identified herein, ...
A formal hearing for the appeal of the cease and desist order was held before the PCHB. The chairman of the board stated at the outset that he would allow Peterson to present testimony beyond the scope of the issue of the lawfulness of the cease and desist order, not because he was convinced that it was dispositive of the issues of this case but "to preserve a record for him and to avoid a piecemeal determination of this matter perhaps at another time by another body." Peterson then presented testimony and argument with regard to the merits of the permit application.
The board issued findings of fact and conclusions of law and an order. In conclusion of law No. 5, the PCHB stated:
Appellant has failed to successfully challenge the issuance of the Cease and Desist Order and it will be affirmed. Further, the Board concludes that it has no jurisdiction to compel the Department of Ecology to process an application for a ground water permit. A hearing before this Board of an appeal which challenges the validity of the Department's Cease and Desist Order does not open up, nor confer original jurisdiction upon *310 the Board to determine, the merits of an application for a water right which has not yet been acted upon by the Department. Only in Superior Court will a Writ of Mandamus properly lie to compel the exercise of discretion.
(Footnote omitted. Italics ours.)
Despite this conclusion, the PCHB stated in its finding of fact No. 4 that "[i]n summary, there would appear to be ground water available for appropriation by Mr. Peterson." The board further refused to consider the water right claim filed in 1973 as an application for a permit, but it changed Peterson's priority date from January 23, 1976, to February 14, 1975, the date he originally filed his application for the permits.
Peterson appealed to the Superior Court for Grant County for a review of one issue only: the PCHB's refusal to treat Shinn's water right claim under RCW 90.14.041 as an application for a permit which would result in his receiving an earlier priority date. In his appeal he did not challenge conclusion of law No. 5, in which the board stated that in this particular action it had no jurisdiction to determine the merits of the permit application or to compel the department to process an application for a ground water permit. At the same time that he filed his appeal, Peterson filed in a separate action in the same court an alternative petition for mandamus to order the department to issue a permit for the use of public ground water. Peterson, on an ex parte order, had the record of the Pollution Control Hearings Board appeal transferred to the mandamus cause. It is the mandamus action that is presently before this court.
In its defense in the mandamus action, the State answered by admitting certain allegations, denying others, and asserting 10 affirmative defenses. At trial, the court allowed no evidence to be presented. Counsel were allowed to argue the evidence introduced at the PCHB hearing as well as the findings of that board. At the conclusion of arguments, the trial court judge announced his intention to issue the writ of mandamus directing the department to *311 grant Peterson a permit. He based his decision in part on the PCHB's finding that there appeared to be ground water available for appropriation. The department's motion for reconsideration was denied and the writ of mandamus was issued.
On appeal, the department contends that the trial court erred in refusing to take evidence in the mandamus action and in basing its decision on the PCHB's findings in the appeal of the department's cease and desist order. We agree with these contentions.
[1] The Superior Court Civil Rules apply to all civil actions, including mandamus proceedings. Chief Seattle Properties, Inc. v. Kitsap County, 86 Wn.2d 7, 541 P.2d 699 (1975). An application for a writ of mandamus has all the elements of a civil action. Chief Seattle Properties, Inc. v. Kitsap County, supra; State ex rel. Amende v. Bremerton, 33 Wn.2d 321, 205 P.2d 1212 (1949). If issues of fact are raised, they may be tried before the court or a jury, and an appropriate judgment may be entered upon the verdict or findings. State ex rel. Amende v. Bremerton, supra; State ex rel. Ryder v. Pasco, 3 Wn. App. 928, 478 P.2d 262 (1970). The department argues that it raised in its answer a number of factual issues, including that of whether public ground water was available. The department therefore concludes that it was entitled to introduce evidence on this point at the trial.
Peterson contends that the department was not entitled to give testimony because the answer raised only questions of law, the facts having been determined by the PCHB. RCW 7.16.250 provides, in part, that:
If the answer raises only questions of law, or puts in issue immaterial statements not affecting the substantial rights of the party, the court must proceed to hear or fix a day for hearing the argument of the case.
Peterson claims that the department answer raised only one valid question of fact, i.e., of the availability of public ground water. He argues that the PCHB's finding of fact No. 4 collaterally estopped the department from denying *312 that public ground water is available for appropriation at the Peterson site. The department argues that the application of the doctrine of collateral estoppel was not appropriate in this case. We find the department to be correct on this point.
[2] An order or determination of an administrative body acting with jurisdiction and under authority of law is not subject to collateral attack in the absence of fraud or bad faith. Charles Pankow, Inc. v. Holman Properties, Inc., 13 Wn. App. 537, 536 P.2d 28 (1975). See Knestis v. Unemployment Compensation & Placement Div., 16 Wn.2d 577, 134 P.2d 76 (1943).
The doctrine of collateral estoppel precludes parties from relitigating issues which have been actually and necessarily contested and determined in prior actions between the same parties. Haslund v. Seattle, 86 Wn.2d 607, 547 P.2d 1221 (1976); King v. Seattle, 84 Wn.2d 239, 525 P.2d 228 (1974). The question becomes whether the availability of public ground water was actually and necessarily contested and determined in the appeal of the cease and desist order before the PCHB.
Pursuant to RCW 43.27A.190, the director of the Department of Water Resources may issue a cease and desist order if a person is violating or is about to violate the provisions of RCW 90.44. With certain exemptions, none of which appears applicable here, a permit is required for the withdrawal of public ground water. RCW 90.44.050. Therefore, upon appeal of the cease and desist order, the only issue properly before the PCHB was whether Peterson had withdrawn public ground water in violation of RCW 90.44, i.e., without a permit.
Peterson contends, however, that in his appeal of the order and amended notice of appeal of the order, he raised issues pertinent to the issuance of a permit and that in the prehearing conference report the department attorney agreed to litigate those issues. The language of provisions I and IV of that report indicates that at trial Peterson would be limited to the contentions set forth in his appeal of *313 order and amended notice of appeal of order. Neither of those provisions indicates that the State agreed to litigate all of those issues.
More importantly, even if the department had agreed to litigate those issues, the PCHB specifically held in conclusion of law No. 5 that it lacked jurisdiction to adjudicate issues regarding the issuance of a permit where the department had not made an initial determination. Peterson never appealed this conclusion of law. Therefore, the board's finding that "there would appear to be ground water available for appropriation by Mr. Peterson" cannot be considered to have been actually and necessarily contested and determined by the PCHB. Accordingly, the trial court's application of the doctrine of collateral estoppel was erroneous.
There is another reason why the trial court erred in applying the doctrine of collateral estoppel in this case. An ambiguous and inconsistent judgment should not be the basis for an estoppel by judgment. Henderson v. Bardahl Int'l Corp., 72 Wn.2d 109, 431 P.2d 961 (1967). The department correctly argues that the statement is ambiguous because (1) it merely states that "there would appear" to be available ground water, and (2) it does not specify whether public ground water or artificially stored ground water is intended.
For these reasons, it is our conclusion that the trial court erred in applying the doctrine of collateral estoppel and in refusing to allow the department to introduce testimony on the availability of public ground waters in its defense in the mandamus action.
The department raises still another issue in which we find merit. The State does not contest the authority of the superior court to order an officer to exercise his discretion. See State ex rel. Brown v. Board of Dental Examiners, 38 Wash. 325, 80 P. 544 (1905). It asserts, however, that in ordering the department to issue a permit, the trial court improperly commanded the State to perform a discretionary act.
*314 [3] Though mandamus will lie to direct an officer to exercise the discretion which it is his duty to exercise, mandamus will not lie to compel performance of a discretionary act. Neal v. Wallace, 15 Wn. App. 506, 550 P.2d 539 (1976). See also Lillions v. Gibbs, 47 Wn.2d 629, 289 P.2d 203 (1955). The question is then one of whether the issuance of a permit to withdraw ground water is a discretionary act.
[4] Before a permit can be issued, the department must find four elements.
The statute [RCW 90.03.290] requires the department to make essentially four determinations prior to the issuance of a water use permit: (1) what water, if any, is available; (2) to what beneficial uses the water is to be applied; (3) will the appropriation impair existing rights; and (4) will the appropriation detrimentally affect the public welfare.
Stempel v. Department of Water Resources, 82 Wn.2d 109, 115, 508 P.2d 166 (1973).
It is our opinion that decisions on these issues involve the exercise of discretion. This holding accords with the case law of other states to the effect that considerable discretion is given to agencies with duties similar to those of Washington's Department of Ecology. See Smyth v. Jenkins, 208 Ore. 92, 299 P.2d 819 (1956); American Fork Irrigation Co. v. Linke, 121 Utah 90, 239 P.2d 188 (1951); and Kirk v. State Bd. of Irrigation, 90 Neb. 627, 134 N.W. 167 (1912).
Our holding that the issuance of a permit to appropriate ground water is a discretionary act leads to the conclusion that the trial court erred in directing the department to issue such a permit.
Peterson claims that even if the issuance of a permit is a discretionary act, the department acted in a manner so arbitrary and capricious as to evidence a total failure to exercise discretion, thereby entitling him to relief in mandamus. See State ex rel. Tubbs v. Spokane, 53 Wn.2d 35, 330 P.2d 718 (1958); Miller v. Pacific County, 9 Wn. App. *315 177, 509 P.2d 377 (1973). We find no support for this argument in the record.
We are not unmindful of Peterson's frustrations in his attempt to move the department to issue him a permit so that he may irrigate his property. Although there may be merit in his assertion that he is entitled to a permit to withdraw public ground water, he has not sought relief through the proper channels. What he should have done, and still may do, is bring an action in mandamus before the superior court to compel the department to exercise its discretion, i.e., to act on his application. In accordance with this opinion, neither party would be estopped by any finding by the PCHB which was not actually and necessarily litigated in the course of the appeal of the cease and desist order. Such a trial would be held in accordance with the Superior Court Civil Rules, and parties would be permitted to introduce evidence relevant to the action on mandamus.
If the department is ordered to exercise its discretion as a result of such trial, Peterson would be entitled to department action on his application.[1] If the department rules unfavorably on his application, he can then appeal the department's decision to the PCHB. At that point he would be entitled to argue the merits of the department's refusal to issue him a permit before the board, and the board would have jurisdiction to rule on those issues. If the board also rules against him on appeal, he may seek review of the decision in superior court.
[5] Finally, Peterson raises a number of issues in his appeal brief. First, he argues that the department's failure *316 to issue him a permit is an unconstitutional taking. The relevant inquiry in such a challenge is whether the regulatory scheme is an exercise of police power rather than one of condemnation. The question is one of social policy which requires the balancing of the public interest in regulating the use of private property against the interests of private landowners not to be encumbered by restrictions on the use of their property. Maple Leaf Investors, Inc. v. Department of Ecology, 88 Wn.2d 726, 565 P.2d 1162 (1977). The court must decide each case on its own facts. Maple Leaf Investors, Inc. We find the permit requirement to be a reasonable exercise of the State's police power.
[6] Peterson also argues that he has acquired a right to the use of water by adverse possession or prescription. In the collateral administrative proceeding, the board rejected this argument, stating that "[n]o right to the use of ground waters of the State can be acquired against the State itself by prescription or adverse use." Peterson did not appeal this conclusion of the board in his appeal of that action to the superior court; he is therefore estopped from raising it here. We note, however, our recent ruling in McLeary v. Department of Game, 91 Wn.2d 647, 591 P.2d 778 (1979), which states that water rights cannot be acquired against the State by prescriptive use.
Finally, Peterson claims that the government should be equitably estopped from denying him a permit because of longstanding notice of his well. Although the State may be subject to equitable estoppel on account of its conduct, see Shafer v. State, 83 Wn.2d 618, 521 P.2d 736 (1974), the record reflects no conduct on the part of the government which would call for the application of the doctrine in this case.
*317 The judgment of the trial court is reversed.
UTTER, C.J., and ROSELLINI, STAFFORD, WRIGHT, BRACHTENBACH, HOROWITZ, DOLLIVER, and HICKS, JJ., concur.
NOTES
[1]  The State contended in argument before this court that before it can properly exercise its discretion, it must drill additional test wells and do further research on the availability of water in the Quincy Subarea. The department admits that the completion of such research and testing would take a considerable period of time and would require more funds than are presently available to the department for this project. If the trial judge finds that the department cannot properly exercise its discretion without having completed these tests, and on that ground declines to issue the order of mandamus, he may feel it appropriate to invoke his equity powers and issue a stay of the cease and desist order until such time as the department is able to act.
