
    SECURITIES AND EXCHANGE COMMISSION, Plaintiff-Appellee, v. G. C. GEORGE SECURITIES, INC., Grover Cleveland “Pat” George; Gene Grover et al., Defendants, Jerry T. O’Brien, Inc., d/b/a Pennaluna & Company, and Jerry Titus O’Brien, Individually, Defendant-Appellant. SECURITIES & EXCHANGE COMMISSION, Plaintiff-Appellant, v. G. C. GEORGE SECURITIES, INC., Grover Cleveland “Pat” George; Gene Grover et al., Defendants-Appellees.
    Nos. 78-1754, 78-2212.
    United States Court of Appeals, Ninth Circuit.
    Submitted May 8, 1980.
    Decided Jan. 23, 1981.
    As Modified on Denial of Rehearing March 25, 1981.
    George Prince, Seattle, Wash., Andrew W. Sidney, Washington, D. C., on brief; John P. Sweeney, Securities & Exchange Comm., Washington, D. C., for Securities & Exchange Comm.
    William D. Symmes, Witherspoon, Kelley, Davenport & Toole, Spokane, Wash., for O’Brien.
    Before ANDERSON and SKOPIL, Circuit Judges, and BYRNE, District Judge.
    
      
       The Honorable William M. Byrne, United States District Judge for the Central District of California, sitting by designation.
    
   J. BLAINE ANDERSON, Circuit Judge:

The defendant-appellant Pennaluna appeals from the district court’s refusal to enjoin a pending Securities & Exchange Commission administrative proceeding. The court below concluded that Pennaluna must first exhaust its administrative remedies in the SEC proceeding before seeking relief in court. We determine, however, that the district court erred as a matter of law when it concluded that it had no jurisdiction and mechanically applied the exhaustion doctrine. We therefore reverse and remand for a determination of whether the district court should exercise its jurisdiction and decide whether the administrative proceedings should be enjoined or whether, instead, to apply the exhaustion doctrine and defer that question to the SEC.

I. BACKGROUND

This action had its beginnings in 1975 when the SEC filed a complaint in the federal court for the Eastern District of Washington, seeking an injunction against the Spokane Stock Exchange and all of its active member firms. The SEC alleged that the Exchange and its members’ practice of publicly listing bid and ask prices, as well as certain inter-firm trading practices, violated various antifraud provisions of the federal securities laws. After extensive negotiations, the parties entered into a “Stipulation, Undertaking to the Court and Order” which was designed to settle the dispute. On December 3, 1975, the district court approved this stipulation.

The stated purpose of the stipulation had been to settle the district court litigation without adjudicating the factual and legal issues which it raised. The first four paragraphs of the stipulation were devoted to establishing new procedures for the Spokane Stock Exchange and its member brokers. Paragraph 5 then repeated its purpose by saying that the stipulation disposes “of the issues raised by the allegations of the [SEC’s] Complaint and the Answers filed herein without further litigation.” This was followed by paragraph 6 which stated that the stipulation “shall not be used as the basis for administrative action affecting” any one of the defendants. And finally, paragraph 7 gave the SEC the right to apply to the court for any further relief necessary to insure compliance with the stipulation. In addition, all of the parties were given the right “to petition the Court for an order vacating, modifying, or dismissing” the stipulation. The district court expressly retained jurisdiction for these purposes.

On September 1, 1976, the SEC brought an administrative action against Pennaluna (Jerry T. O’Brien and his firm, Pennaluna & Company) which had been a party to the earlier litigation. The SEC complaint stated two separate grounds against Pennaluna: (1) sale of unregistered securities in violation of section 5 of the 1933 Act, and (2) violation of the antifraud provisions based on the same acts which had been settled in the earlier injunctive action in federal court. It is only the latter part of the SEC complaint which is involved in this appeal.

Almost a year later, Pennaluna returned to the district court seeking an order requiring the SEC to show cause why the administrative proceeding should not be enjoined. Pennaluna alleged that the stipulation had fully disposed of and resolved all of the matters which formed the basis of the SEC action. In addition, Pennaluna claimed that the administrative proceeding “was in direct conflict and contrary to the various terms of the court’s prior order.”

On August 24, 1977, the district court denied Pennaluna’s request for injunctive relief, concluding “that the matters raised by [Pennaluna] on this motion should be first presented to the Securities and Exchange Commission, and that this Court has no jurisdiction to hear or determine these matters.” Pennaluna moved for reconsideration on the same day. This motion was denied on October 20, 1977. Pennaluna then filed its timely notice of appeal on November 16, 1977.

Pennaluna filed a motion for an injunction pending appeal on October 28, 1977. The district court granted the motion, in part. The SEC was allowed to continue its proceedings, but was prevented from issuing any final order while this appeal was pending. Three months later, the SEC moved to have the injunction clarified. On March 27,1978, the district court entered an order clarifying the injunction. The SEC filed a notice of appeal from this order on May 15, 1978.

II. DISCUSSION

Although the SEC treats this as a pure exhaustion of administrative remedies case, it is not that simple. The court below held that it did not have jurisdiction to proceed on Pennaluna’s request for relief because the court found that Pennaluna had to first exhaust its administrative remedies. However, it is important to note that Pennaluna’s request for relief in the district court basically presented two questions. They were: (1) whether the issues presented in the administrative proceeding were the same as those which had been raised in the earlier court proceeding, and (2) whether the settlement agreement barred the later administrative proceeding. By finding that Pennaluna must first present these questions in the administrative proceeding, the court below never reached, nor did it consider, the question whether to exercise jurisdiction and, thus, never reached the merits of these questions. Therefore, this appeal does not present the question of whether the district court should have enjoined the administrative proceeding, but, rather, whether the district court has jurisdiction to decide that issue. The district court does have jurisdiction. The district court should determine whether, in its discretion, to exercise jurisdiction or to apply the exhaustion doctrine. If the court decides to exercise jurisdiction, it would then address the merits of the two questions presented in determining whether to enjoin the administrative proceeding.

When the SEC initiated the present case in 1975, it had the choice of proceeding administratively (15 U.S.C. §§ 77t(a), 78u(a)), or in the courts (15 U.S.C. §§ 77v(a), 78aa). The SEC chose to first proceed against Pennaluna in the district court. In doing so, jurisdiction was conferred in the district court over the parties and the subject matter and, as we noted earlier in this opinion, when the district court approved the stipulation, it expressly retained jurisdiction to insure compliance with the agreement.

In addition to this retained jurisdiction, the district court also had the authority to consider Pennaluna’s request for relief under the All Writs Act. 28 U.S.C. § 1651(a). This Act allows federal courts to issue “all writs necessary or appropriate in aid of their respective jurisdictions.” We have interpreted § 1651 as authorizing a district court to enjoin a party from attempting to relitigate a cause of action relating to the same subject matter of an earlier action. See Clinton v. United States, 297 F.2d 899 (9th Cir. 1961), cert. denied, 369 U.S. 856, 82 S.Ct. 944, 8 L.Ed.2d 14. And, we have also said that a district court’s “powers under § 1651 should be broadly construed.” Hamilton v. Nakai, 453 F.2d 152, 157 (9th Cir. 1972), cert. denied, 406 U.S. 945, 92 S.Ct. 2044, 32 L.Ed.2d 332.

Based on its retained continuing jurisdiction over this case, and its authority under § 1651, we are satisfied that the district court had jurisdiction to consider Pennaluna’s request for injunctive relief, and it erred as a matter of law when it concluded that it had no jurisdiction to do so.

Though we have determined that the district court did have jurisdiction to grant the relief requested by Pennaluna, that determination does not resolve the question of whether the district court should exercise that jurisdiction or apply the exhaustion doctrine. For the guidance of the district court and the parties on remand, we. set forth in the margin a brief review of our understanding of this court’s approach to the application of this doctrine.

III. CONCLUSION

The SEC elected to pursue its judicial remedies and entered into a settlement. The SEC initially invoked the jurisdiction of the district court. The district court had continuing jurisdiction to enforce the terms of the stipulation and its own decree. The SEC cannot now argue that the federal court lacked jurisdiction to re-examine the bargain which was struck before it in light of the administrative proceeding which may violate the terms of the agreed settlement.

The order of the district court is vacated and the case is remanded to the district court to determine whether, in its discretion, to exercise jurisdiction and interpret the prior stipulation and determine whether the requested injunctive relief is warranted, or whether, instead, to apply the exhaustion doctrine and allow the SEC to initially make that determination. Nothing said in this opinion should be interpreted as an indication of this court’s views on the merits.

VACATED and REMANDED for further proceedings. 
      
      . The SEC disputes this, contending that different matters are involved. The district court did not reach this issue and neither will this court. Nevertheless, for purposes of this opinion, we do assume that Pennaluna has made a prima facie showing that both proceedings arose from basically the same acts on the part of Pennaluna.
     
      
      . In addition to the district courts’ power under § 1651, the federal courts also possess inherent equitable power.
      “The federal courts have inherent equitable authority to issue a variety of ‘ancillary relief measures in actions brought by the SEC to enforce the federal securities laws. This circuit has repeatedly approved imposition of a receivership in appropriate circumstances. The power of a district court to impose a receivership or grant'other forms of ancillary relief does not in the first instance depend on a statutory grant of power from the securities laws. Rather, the authority derives from the inherent power of a court of equity to fashion effective relief.” (footnotes omitted)
      
        S. E. C. v. Wencke, 622 F.2d 1363, 1369 (9th Cir., 1980).
     
      
      . It would be premature for this panel to determine the applicability of the exhaustion doctrine before the district court has the opportunity to do so. Therefore, it is also unnecessary for us to determine at this time whether the district court would “abuse its discretion” or “err as a matter of law” if, after applying the exhaustion doctrine, it decided to deny or grant injunctive relief.
     
      
      . Under the exhaustion doctrine, “no one is entitled to judicial relief for a supposed or threatened injury until the prescribed administrative remedy has been exhausted.” Myers v. Bethlehem Shipbuilding Co., 303 U.S. 41, 50-51, 58 S.Ct. 459, 463, 82 L.Ed. 638 (1938). The purpose behind the doctrine is to allow “an administrative agency to perform functions within its special competence-to make a factual record, to apply its expertise and to correct its own errors so as to moot judicial controversies.” Parisi v. Davidson, 405 U.S. 34, 37, 92 S.Ct. 815, 31 L.Ed.2d 17 (1972). Exhaustion promotes both judicial economy and agency efficiency.
      Unless application of the exhaustion doctrine is statutorily mandated, its application lies within the sound discretion of the courts. Aleknagik Natives, Ltd. v. Andrus, - F.2d -, -; 29 F.R.Serv. 796 (9th Cir., as amended May 16, 1980); see, e. g., Eluska v. Andrus, 587 F.2d 996, 999 (9th Cir. 1978); Montgomery v. Rumsfeld, 572 F.2d 250, 253-254 (9th Cir. 1978). Nevertheless, on occasion, a court is obliged to exercise its jurisdiction in spite of a failure to exhaust, and “is guilty of an abuse of discretion if it does not.” Winterberger v. Gen. Teamsters Auto Truck, Etc., 558 F.2d 923, 925 (9th Cir. 1977).
      As this court recently noted, there are a number of exceptions to the general rule requiring exhaustion, covering situations such as where administrative remedies are inadequate or not efficacious, pursuit of administrative remedies would be a futile gesture, irreparable injury will result, or the administrative proceedings would be void. Aleknagik, supra at-.
      In deciding how to exercise its discretion, this court has suggested that a balancing analysis should be employed on a case-by-case basis which “considers both the interests of the agency in applying its expertise, correcting its own errors, making a proper record, enjoying appropriate independence of decision and maintaining an administrative process free from deliberate flouting, and the interests of private parties in finding adequate redress for their grievances.” Montgomery, supra, 572 F.2d at 253. More specifically, this court has adopted Professor Kenneth Culp Davis’ test for evaluating the circumstances in which a party may seek judicial relief from anticipated agency action. Marshall v. Burlington Northern, Inc., 595 F.2d 511, 513 (9th Cir. 1979); Casey v. F. T. C, 578 F.2d 793, 796 (9th Cir. 1978); Marshall v. Able Contractors, Inc., 573 F.2d 1055, 1057 (9th Cir. 1978), cert. denied, 439 U.S. 826, 99 S.Ct. 98, 58 L.Ed.2d 119; State of Cal. ex rel. Christensen v. F. T. C., 549 F.2d 1321, 1323 (9th Cir. 1977), cert. denied, 434 U.S. 876, 98 S.Ct. 227, 54 L.Ed.2d 156; Lone Star Cement Corp. v. F. T. C., 339 F.2d 505, 510 (9th Cir. 1964). This test established three factors which should be weighed in considering the propriety of judicial intervention:
      “[1] extent of injury from pursuit of administrative remedy; [2] degree of apparent clarity or doubt about administrative jurisdiction; and [3] involvement of specialized administrative understanding in the question of jurisdiction.”
      
        Christensen, supra, 549 F.2d at 1323.
     