
    UNITED STATES of America, Plaintiff-Appellee, v. YAKIMA TRIBAL COURT of the Yakima Indian Nation and David Ward, Tribal Judge, Defendants-Appellants.
    No. 85-3927.
    United States Court of Appeals, Ninth Circuit.
    Argued Feb. 14, 1986.
    Submitted March 7, 1986 .
    Decided July 21, 1986.
    As Amended on Denial of Rehearing and Rehearing En Banc Dec. 4, 1986.
    
      Superseding 794 F.2d 1402.
    
      Kathleen P. Dewey, Washington, D.C., for plaintiff-appellee.
    James B. Hovis, Hovis, Cockril, Weaver & Bjur, Yakima, Wash., for defendants-appellants.
    Before WRIGHT and WALLACE, Circuit Judges, and LEGGE, District Judge.
    
    
      
      We deferred submission pending a decision in United States v. White Mountain Apache Tribe, 784 F.2d 917 (9th Cir.1986).
    
    
      
       Hon. Charles A. Legge of the Northern District of California.
    
   EUGENE A. WRIGHT, Circuit Judge:

This case arises from the efforts of two Yakima Indian sisters to prevent federal officials from relocating an irrigation canal on their land. They won a permanent restraining order in tribal court. The United States sued in district court to void the order on the ground that the tribal court lacked jurisdiction to enjoin federal officials from performing their official duties. The district court granted the government’s motion for summary judgment, and the tribal defendants appealed. We affirm.

ISSUES

(1) Is the case mooted by a final settlement in which the Indian sisters agreed to grant the Interior Department a right-of-way across their land for irrigation purposes?
(2) Did the district court have jurisdiction to enjoin enforcement of tribal court orders?
(3) Does sovereign immunity of the United States bar the tribal court action?
(4) Was the United States required to exhaust tribal court remedies before filing this action?
(5) Are the Yakima Tribal Court and its judge immune from this action under tribal immunity principles? and
(6) May Tribal Court Judge Ward invoke the doctrine of judicial immunity?

FACTS AND PROCEEDINGS BELOW

Viola Sohappy and LaRena Sohappy Brown, Yakima Indians, own Trust Allot-merit No. 1906 on the Yakima Indian Reservation. For many years, an irrigation canal in the Wapato Irrigation Project (“WIP”) has carried water to and across the Sohappys’ land. The WIP is administered by the Bureau of Indian Affairs (“Bureau”) in the Interior Department. The Project Engineer is Louis B. Hilderbrand.

The original canal ran along the north side of the allotment to a point near the northeast corner. From there, it angled southeast across a corner of the allotment, and then ran along the eastern boundary. The WIP also used a small ditch on the northern boundary to convey water to properties to the east. The ditch began where the canal angled to the southeast.

In 1980, a WIP employee and the Sohap-pys’ lessee discussed moving the canal to avoid transecting the northeast corner. Both parties believed that the property would be enhanced if the canal were moved to the northern and eastern boundaries. This entailed filling in the diagonal canal and enlarging the ditch.

WIP employees accomplished the filling and had begun enlarging the ditch when the Sohappys learned of the activities. They objected because WIP acted without their consent. Negotiations ensued.

The Sohappys consulted with the Bureau’s Portland Area Office, which acknowledged that Hilderbrand erred by not having secured their permission for the changes. The negotiations culminated in a settlement agreement of April 24, 1981. It allowed WIP to convey water through the allotment for two years until permanent relocation could be made to the north and east. During this period, WIP was to pay $11,000 for continued use of the canal.

Final relocation was accomplished in April 1983. The canal has since been used for irrigation purposes.

On April 10, 1983, the Sohappys sued WIP and its Project Engineer in Yakima Tribal Court. They sought a restraining order to keep WIP employees from their property and to halt completion of the canal relocation. The complaint was delivered to the WIP office on the reservation.

The federal defendants did not appear for the hearing on the requestor a restraining order. Instead, an Assistant Regional Solicitor wrote to the tribal court explaining that it was “without jurisdiction to grant relief against the United States, its officers and employees in the performance of their official duties.” The letter suggested that federal district court was the proper forum for such a suit.

Following the issuance of two temporary restraining orders, tribal court Chief Judge Ward entered an order permanently restraining Hilderbrand and other WIP employees from entering onto Allotment 1906. Despite having received the government's letter, he stated: “Having heard nor received nothing from the defendants this court was left with nothing to do but to grant the plaintiffs [sic] requests.”

In March 1984, the United States brought this action in district court against the Yakima Tribal Court and Judge Ward. It sought: 1) a declaratory judgment that the tribal court’s injunction was void, and 2) an injunction restraining further interference with WIP. Both sides moved for summary judgment.

Ruling for the government, the court held that the United States’ sovereign immunity barred the tribal court action because it was “a prohibited, unconsented suit against the United States.” It found that Hilderbrand was operating within the scope of his official authority.

As to the tribe’s claim that it was immune from suit, the court held that tribal immunity does not operate against the United States. It declared the tribal court orders null and void and permanently enjoined the tribal defendants from enforcing them.

Shortly before oral argument, we learned of a recent settlement agreement in the underlying action. In December 1985, the Sohappys agreed to grant the Interior Department a right-of-way over their land in exchange for $18,000. This suggested the possibility of mootness on which we requested supplemental briefing.

STANDARD OF REVIEW

We review de novo the grant of summary judgment. Augustine v. McDonald, 770 F.2d 1442, 1444 (9th Cir.1985). Review of the district court’s jurisdiction also is de novo. Clayton v. Republic Airlines, Inc., 716 F.2d 729, 730 (9th Cir.1983).

ANALYSIS

I. MOOTNESS

While the parties resist a finding of mootness, we consider our jurisdiction sua sponte. See Baumann v. Arizona Department of Corrections, 754 F.2d 841, 843 (9th Cir.1985). We will not issue an advisory opinion in a moot case. See Lake Coal Co. v. Roberts & Schaefer Co., — U.S. -, 106 S.Ct. 553, 554, 88 L.Ed.2d 418 (1985) (parties’ motion to decide issues of moot case denied).

This action is grounded in the existence of a tribal court order restraining federal officers from performing their official duties. It reads:

IT IS HEREBY ORDERED that defendants are perminantly [sic] restrained from going onto Allotment 1906 and the residence at Rt. 3 Box 2125A, Wapato, WA, Yakima Indian Nation until such time as plaintiffs petition this court to have the restraining order removed.

Counsel for the appellants tells us that the Sohappys do not intend to petition the tribal court to dissolve the order. Nor will the issuing judge vacate it sua sponte.

The situation is somewhat analogous to Gompers v. Bucks Stove & Range Co., 221 U.S. 418, 31 S.Ct. 492, 55 L.Ed. 797 (1911), where the Court held that a civil contempt action was mooted by the settlement of the underlying injunction. The Court reasoned:

[W]hen the main cause was terminated by a settlement of all differences between the parties, the complainant did not require and was not entitled to any compensation or relief [in the contempt proceedings]. The present proceeding necessarily ended with the settlement of the main cause of which it is a part.

Id. at 451-52, 31 S.Ct. at 502.

Gompers involved two proceedings in the same court. But here the settlement was between the parties to the tribal court action, the Sohappys and the Interior Department. See Southern Ohio Coal Co. v. Donovan, 774 F.2d 693, 698-99 (6th Cir.1985) (appeal not moot where settlement involved different parties and issues), amended, 781 F.2d 57 (6th Cir.1986). Before us we have the tribal court and its chief judge as appellants and the United States, represented by Justice Department attorneys, as appellee. No party to this appeal nor any attorney was involved in the settlement.

Further, we note that the tribal court’s order appears to be broader than necessary to resolve the dispute between the Sohap-pys and the government. It restrains the government from entry onto the land for any purpose. Thus, while the dispute between the Sohappys and the government might now be mooted, the broader restraint issued by the tribal court against the United States has not been mooted.

Finally, we must consider the effect of a finding of mootness. We would then be obligated to vacate the district court judgment and remand with instructions to dismiss the complaint. It is the tribal court order that should be vacated due to the settlement. We may decide the validity and effect of that order only by considering the merits of this appeal.

The peculiar circumstances here require that we conclude that the appeal is not moot. The existence of the order restraining federal officials from performing their official duties provides continuing consequences and imparts life to the controversy.

II. DISTRICT COURT JURISDICTION

Appellants assert that the district court lacked jurisdiction over the subject matter and was unable to grant relief. This claims fails.

The Supreme Court has held recently that a federal question was presented under 28 U.S.C. § 1331 when a non-Indian property owner sued in district court to enjoin execution of a tribal court judgment against it. National Farmers Union Insurance Cos. v. Crow Tribe, 471 U.S. 845, 105 S.Ct. 2447, 2452, 85 L.Ed.2d 818 (1985). Further, 28 U.S.C. § 1345 provides an independent basis for jurisdiction where the United States is the plaintiff. See United States v. White Mountain Apache Tribe, 604 F.Supp. 464, 466 (D.Ariz.1985) (in a similar action, jurisdiction premised on 28 U.S.C. § 1345), aff’d, 784 F.2d 917 (9th Cir.1986).

Appellants concede the “initial” jurisdiction of 28 U.S.C. §§ 1331 and 1345, but argue that relief is limited to the habeas corpus provision of the Indian Civil Rights Act (“ICRA”), 25 U.S.C. § 1303.

That section provides the sole federal remedy for violations of § 1302, which extends civil rights protections like those of the federal Bill of Rights to persons affected by actions of Indian tribal governments. See Santa Clara Pueblo v. Martinez, 436 U.S. 49, 58, 67, 98 S.Ct. 1670, 1676, 1681, 56 L.Ed.2d 106 (1978); Snow v. Quinault Indian Nation, 709 F.2d 1319, 1323 (9th Cir.1983), cert. denied, 467 U.S. 1214, 104 S.Ct. 2655, 81 L.Ed.2d 362 (1984); Trans-Canada Enterprises, Ltd. v. Muckleshoot Indian Tribe, 634 F.2d 474, 476 (9th Cir.1980).

The ICRA is inapplicable. The United States does not seek enforcement of rights under it. The habeas corpus remedy is inappropriate and inadequate.

Moreover, in National Farmers, the Court authorized precisely the kind of federal court action brought here when it said:

The District Court correctly concluded that a federal court may determine under § 1331 whether a tribal court has exceeded the lawful limits of its jurisdiction.

105 S.Ct. at 2452; see also United States v. White Mountain Apache Tribe, 784 F.2d 917, 920 (9th Cir.1986) (federal court had jurisdiction to determine limits of tribe’s powers over federal officials) (“White Mountain Apache”).

III. SOVEREIGN IMMUNITY OF THE UNITED STATES

The parties recognize that the United States enjoys absolute sovereign immunity from unconsented suits. When federal government officials are sued in their representative capacities, as was done here in tribal court, the question is whether the action is against the United States.

The general rule is that a suit is against the sovereign if ‘the judgment sought would expend itself on the public treasury or domain, or interfere with the public administration,’ or if the effect of the judgment would be ‘to restrain the Government from acting, or to compel it to act.’

Pennhurst State School & Hospital v. Halderman, 465 U.S. 89, 101 n. 11, 104 S.Ct. 900, 908 n. 11, 79 L.Ed.2d 67 (1984) (quoting Dugan v. Rank, 372 U.S. 609, 620, 83 S.Ct. 999, 1006, 10 L.Ed.2d 15 (1963) (citations omitted)).

The district court concluded correctly that the tribal court’s action was directed against the United States. See White Mountain Apache Tribe v. Hodel, 784 F.2d 921, 923 n.2 (9th Cir.1986) (court construes complaint naming government officials as action against the United States); White Mountain Apache, 784 F.2d at 919 (tribe’s effort to enjoin work of any federal agent in the performance of his official duties is action against the United States). The tribal court’s restraining order impeded management and operation of a federal irrigation project.

Appellants seek to invoke the ultra vires exception to sovereign immunity of federal officials. They contend that WIP and Hil-derbrand violated the federal constitution, statutes and regulations. They cite the Sohappys’ allegation that, before rights-of-way can be granted over Indian trust lands, a majority of the owners must give written consent. See 25 U.S.C. §§ 323-28; 25 C.F.R. § 169.3. They say also that just compensation must be paid to allottees for canal rights-of-way. 25 U.S.C. § 325; 25 C.F.R. §§ 169.12, 169.13.

The constitutional claims must be analyzed separately from the claims based on Hilderbrand’s violation of the federal regulations cited. These claims are subject to different rules.

According to Larson v. Domestic & Foreign Commerce Corp., 337 U.S. 682, 69 S.Ct. 1457, 93 L.Ed. 1628 (1949), suits that charge federal officials with unconstitutional acts are not barred by sovereign immunity. Id., at 690, 696-97, 702, 69 S.Ct. at 1461, 1464-65, 1467. In Larson, the Supreme Court noted that when a federal official commits an unconstitutional act, he is necessarily acting outside his official capacity.

If the official is acting pursuant to an unconstitutional statute, he cannot be acting on behalf of the government because the government authority conferred upon him is not valid. Id., at 690-92, 696-97, 69 S.Ct. at 1461-62, 1464-65. Similarly, if a federal official, acting pursuant to a constitutional statute, commits an unconstitutional act, he cannot be acting on behalf of the government because his actions go beyond the scope of his authority and are ultra vires. Id.

Any claim making such constitutional allegations is not barred by sovereign immunity and will be within the jurisdiction of the federal court. Id. at 701-02, 69 S.Ct. at 1467. The claim, however, may be made only against the official and not against the United States, as the official was acting individually and not in his capacity as a government agent. Id.

There is no substantial claim that Hil-derbrand’s act was unconstitutional. The result of his act may give rise to a claim for just compensation under the fifth amendment. Indeed, if that is the claim, suit may be brought in a proper forum. See Larson, 337 U.S. at 697, n. 18, 69 S.Ct. at 1465, n. 18. Rather, the thrust of appellants’ claim is that Hilderbrand lost his sovereign immunity protection due to violation of a statute and regulation.

A different analysis applies to the claims based on an official’s violations of federal statutes or regulations. Here, the appellants, relying on the Bureau’s admission that Hilderbrand should have secured their consent before undertaking changes, argue that violations of the provisions cited above stripped him and WIP of immunity. They are mistaken. Their position has been rejected repeatedly by the Supreme Court. See Larson at 695, 69 S.Ct. at 1464.

If an employee of the United States acts completely outside his governmental authority, he has no immunity. An obvious example would be if a dispute occurs pertaining to the sale of an employee’s personal house, his government employment provides him with no shield to liability. See Larson, 337 U.S. at 689, 69 S.Ct. at 1461. But that is different from the situation where an employee acting as a government agent, commits an act that is arguably a mistake of fact or law. In Aminoil U.S.A., Inc. v. California State Water Resources Control Board, 674 F.2d 1227 (9th Cir.1982), the question was presented whether a government agent’s decision that Aminoil violated a statute was “beyond the scope of his authority and [was] therefore not barred by sovereign immunity.” Id. at 1234. Aminoil argued that because the agent’s decision was incorrect, the decision was beyond the scope of the agent’s authority and was therefore not protected by sovereign immunity. Id. at 1234. We held that “Larson, however, clearly rejected this argument. A simple mistake of fact or law does not necessarily mean that an officer of the government has exceeded the scope of his authority. Official action is still action of the sovereign, even if it is wrong, if it ‘do[es] not conflict with the terms of [the officer’s] valid statutory authority....’ 337 U.S. at 695, 69 S.Ct. at 1464.” We need not decide in this case at what point a violation of a statute or regulation is so inconsistent with the agent’s authority that he divests himself of sovereign immunity. We do hold that, unlike constitutional violations, there is no per se divestiture of sovereign immunity when statutes or regulations are violated while an agent is pursuing his authorized duties.

Scope of authority turns on whether the government official was empowered to do what he did; i.e., whether, even if he acted erroneously, it was within the scope of his delegated power. Pennhurst, 465 U.S. at 112 n. 22, 104 S.Ct. at 914 n. 22. Ultra vires claims rest on the official’s lack of delegated power. Id. at 101 n. 11, 104 S.Ct. at 908 n. 11.

Here, the Yakima treaty grants federal government personnel authority to enter the reservation without the Yakimas’ permission. Hilderbrand was employed as Project Engineer for a Bureau irrigation project being operated for the tribe. He sought to relocate a canal to improve the Sohappys’ land and to benefit WIP users.

Clearly, as project engineer, he had authority to relocate irrigation canals to better serve the Yakimas. Although he may have violated statutes and regulations regarding owner consent to right-of-way changes, those trespasses do not strip him of immunity.

The affidavits of the Sohappys opposing summary judgment do not dispel this conclusion. They do no more than embrace improper legal conclusions on scope of authority.

The only facts they allege on personal knowledge deal with consent to enter the allotment for purposes of canal relocation. It is immaterial whether they consented. See Angel v. Seattle-First National Bank, 653 F.2d 1293, 1299-1300 (9th Cir.1981) (party opposing summary judgment must show relevance of factual disputes). The proper inquiry is whether Hilderbrand acted within the scope of his delegated authority. There were no genuine issues of material fact.

The question then is whether the United States was entitled to judgment as a matter of law. White Mountain Apache controls. There, we held that the White Mountain Apache Tribal Court lacked jurisdiction to enjoin Interior Department employees from transferring materials to the Justice Department for filing water rights claims on the tribe’s behalf. 784 F.2d at 919; see also United States v. Blackfeet Tribe, 364 F.Supp. 192, 194 (D.Mont.) (tribal court lacks power to regulate federal law officer in the performance of his duties), aff’d on rehearing, 369 F.Supp. 562 (D.Mont.1973).

The district court held correctly that the tribal court action was an unconsented suit against the United States barred by sovereign immunity. See White Mountain Apache, 784 F.2d at 919.

IV. EXHAUSTION OF TRIBAL COURT REMEDIES

Appellants rely on National Farmers and A & A Concrete, Inc. v. White Mountain Apache Tribe, 781 F.2d 1411 (9th Cir.), cert. denied, — U.S. -, 106 S.Ct. 2008, 90 L.Ed.2d 659 (1986), to require exhaustion of tribal court remedies in this case. They assert that the United States should have appealed Judge Ward’s orders to the tribal appellate court. We disagree.

In National Farmers, the Court required exhaustion because the tribal court’s power to exercise jurisdiction was “not automatically foreclosed.” 105 S.Ct. at 2453. Where the tribal court lacks jurisdiction, however, exhaustion is not required.

A similar challenge recently was rejected in White Mountain Apache. There, we concluded that exhaustion was pointless because tribal court jurisdiction clearly was foreclosed by the sovereign immunity of the United States. 784 F.2d at 920 n.10. That decision controls here. The government was not required to appeal Judge Ward’s orders before bringing this action.

V. TRIBAL SOVEREIGN IMMUNITY

Appellants assert that tribal sovereign immunity bars this action. The district court recognized the general rule that tribal officials generally enjoy immunity from suit when acting within the scope of their authority. See also Hardin v. White Mountain Apache Tribe, 779 F.2d 476, 479-80 (9th Cir.1985) (tribal immunity extends to tribal officials acting in representative capacity and within scope of their authority). It concluded:

The Tribe’s sovereign immunity (and the judge’s immunity as a derivative thereof) does not, however, act as a shield against the United States. Like each of the fifty states, the Yakima Nation is not immune from suits brought by the United States. See United States v. Mississippi, 380 U.S. 128 [85 S.Ct. 808, 13 L.Ed.2d 717] (1965). Thus, the United States is not barred from bringing this action.

Appellants criticize the court’s citation to Mississippi, asserting that the case is inap-posite because it involved the Eleventh Amendment. Mississippi is relevant for its holding that the United States could sue a state defendant and “override” the sovereign immunity of the states. See United States v. Mississippi, 380 U.S. 128, 140-41, 85 S.Ct. 808, 814-15, 13 L.Ed.2d 717 (1965).

By analogy, the United States may sue Indian tribes and override tribal sovereign immunity. “The Tribe’s own sovereignty does not extend to preventing the federal government from exercising its superior sovereign powers.” White Mountain Apache, 784 F.2d at 920. The tribal immunity claim fails.

VI. JUDICIAL IMMUNITY

Lastly, we address briefly appellant Ward’s assertion of the judicial immunity defense. That defense does not bar injunctive relief against a judicial officer acting in his judicial capacity. Pulliam v. Allen, 466 U.S. 522, 541-42, 104 S.Ct. 1970, 1980-81, 80 L.Ed.2d 565 (1984); Ashelman v. Pope, 793 F.2d 1072 (9th Cir.1986) (en banc).

The district court enjoined Judge Ward from enforcing the restraining orders he had entered. His status as a tribal judicial officer does not confer immunity against injunctive relief. See United States v. Blackfeet Tribe, 369 F.Supp. 562, 565 (D.Mont.1973) (“courts may be and are restrained from acting in excess of jurisdiction”).

The district court’s judgment is AFFIRMED. 
      
      . See generally Washington v. Confederated Bands and Tribes of the Yakima Indian Nation, 439 U.S. 463, 469-70, 99 S.Ct. 740, 745-46, 58 L.Ed.2d 740 (1979), and Yakima Indian Nation v. Whiteside, 617 F.Supp. 750, 751-52 (E.D.Wash.1985), for background on the Yakima Nation.
     
      
      . § 1303. Habeas corpus
      The privilege of the writ of habeas corpus shall be available to any person, in a court of the United States, to test the legality of his detention by order of an Indian tribe.
     
      
      . This case concerns the propriety of the tribal court forum. The government concedes that the Sohappys could have brought their action in federal district court.
     
      
      . A & A Concrete, Inc. v. White Mountain Apache Tribe, 781 F.2d 1411 (9th Cir.), cert. denied, — U.S. -, 106 S.Ct. 2008, 90 L.Ed.2d 659 (1986), relied on by appellants, is distinguishable because it does not involve the United States as a party or the relationship between sovereign immunity and tribal court jurisdiction.
     