
    Nathan S. SMITH, Plaintiff-Appellee, v. Arthur R. GRIMM and Jeannine Grimm, Defendants-Appellants.
    No. 74-2310.
    United States Court of Appeals, Ninth Circuit.
    April 13, 1976.
    Rehearing and Rehearing En Banc Denied May 19, 1976.
    
      Louis N. Haas (argued), of Haas & Najarían, San Francisco, Cal., for defendants-appellants.
    Steven M. Kipperman (argued), of Kipperman, Shawn & Keker, San Francisco, Cal., for plaintiff-appellee.
    
      
      The Honorable Russell E. Smith, United States District Judge, for the District of Montana, sitting by designation.
    
   OPINION

Before CHAMBERS and SNEED, Circuit Judges, and SMITH, District Judge.

SNEED, Circuit Judge:

Plaintiff Smith sued the Commanding Officer, Air Force Accounting and Finance Center (the “Air Force”) and defendant Grimm for declaratory and injunctive relief with respect to certain salary and retirement payments that the Air Force was to pay to Grimm. Smith alleged that he had an equitable lien, arising out of legal services performed by him for Grimm, on fifty percent of military pay due to Grimm. The trial judge, sitting without a jury, ruled in Smith’s favor. Grimm appeals, alleging the uneonscionability of the contract with Smith, and Smith’s lack of performance thereof. We are unable to reach these issues inasmuch as we find that there is no federal jurisdiction to entertain this lawsuit.

I. Statement of Facts.

A comprehension of the factual background is necessary to adequately analyze the jurisdictional posture of this case. In 1963, after approximately eighteen years of service, Captain Grimm was discharged from the Air Force by the Secretary of the Air Force pursuant to the recommendation of a Board of Inquiry. Grimm retained Smith, an attorney, to contest the legality of that discharge. Arising out of this representation, and principally at issue below, was a contingent fee contract between Smith and Grimm whereby Grimm agreed to pay Smith “50% of any and all amounts recovered by [Grimm] as a direct or indirect result of the action.”

Smith was successful in his representation, and had the discharge declared null and void. Grimm v. Brown, 291 F.Supp. 1011 (N.D.Cal.1968), aff’d, 449 F.2d 654 (9th Cir. 1971). After the district court decision, Grimm filed suit in the Court of Claims seeking to recover back pay. After the Ninth Circuit affirmance of the district court, there was a dispute and the parties parted ways. The Air Force paid Grimm approximately $3,000 of back pay; Grimm did not pay Smith one-half of this amount. Smith then filed the instant lawsuit.

The district judge found that under the contract Smith was entitled to recover fifty percent of the military pay due Grimm, including future retirement pay. In so doing, the district judge found that the contingent fee contract was not unconscionable, and (implicitly at least) that Smith had substantially performed under it. The Judgment did not require any material performance from the Air Force, but merely ordered Grimm to direct the Air Force to henceforth send his retirement payments to a bank custodial account, from which Smith would automatically be paid fifty percent.

II. Federal Jurisdiction.

At bottom, this is a simple contract dispute between Smith and Grimm. Smith wants to collect his contingent fee; Grimm defends upon the grounds of unconscionability and nonperformance. These issues of state law predominate. The role of the Air Force in this case is merely that of the contract debtor.

The district judge did not deny a motion to dismiss made by Grimm based upon lack of subject matter jurisdiction. However, his reasoning was substantially influenced by the fact that, at that time, there was an appeal in this ease by the Air Force which was pending before this court. Since that appeal also raised the issue of federal jurisdiction, the district judge denied Grimm’s motion “pending a decision by the Ninth Circuit.” (R. 123). The Air Force’s appeal was subsequently dismissed by stipulation of the parties under Fed.R.App.P. 42(b), so this court has not heretofore decided that jurisdictional question.

The state law focus of the case and the lack of any apparent material nexus between the underlying dispute and federal law, coupled with the district judge’s initial reliance upon a non-forthcoming resolution from this court, convinced us that a critical appraisal of the federal jurisdiction of this case was warranted. This analysis leads us to conclude that there is no valid federal jurisdictional basis for this case. The complaint alleges two bases of federal jurisdiction, federal question, 28 U.S.C. § 1331(a), and mandamus, 28 U.S.C. § 1361. There is no allegation of diversity, and it appears from the record that both Smith and Grimm are California residents. We turn first to the issue whether federal question jurisdiction exists.

A. Federal Question.

Section 1331(a) provides:

The district courts shall have original jurisdiction of all civil actions wherein the matter in controversy exceeds the sum or value of $10,000, exclusive of interest and costs, and arises under the Constitution, laws, or treaties of the United States. The issue of what “arises under the Constitution, laws, or treaties of the United States” is one which the courts have grappled without being able to formulate a precise definition. Indeed, the task of determining whether a particular case “arises under” a federal law has been termed by a leading commentator as “the most difficult single problem in determining whether the federal jurisdiction exists.” C. Wright, A. Miller, & E. Cooper, 13 Federal Practice and Procedure, 397 (1975).

Given the predominate position of the federal government in our present society and the burgeoning of federal regulation, we are not surprised when even the most “local” lawsuit is tangentially related to a federal law. However, such a relation to a federal law is not sufficient for section 1331(a) jurisdiction unless the lawsuit “really and substantially involves a dispute or controversy respecting the validity, construction, or effect . . . ” of the federal law. Shulthis v. McDougal, 225 U.S. 561, 569, 32 S.Ct. 704, 706, 56 L.Ed. 1205, 1211 (1912). In analyzing the nexus between a claim and federal law, we are mindful of the admonition of Justice Cardozo, speaking for the Court in 1936, in words even more appropriate for 1976:

If we follow the ascent far enough, countless claims of right can be discovered to have their source or their operative limits in the provisions of a federal statute or in the Constitution itself with its circumambient restrictions upon legislative power. To set bounds to the pursuit, the courts have formulated the distinction between controversies that are basic and those that are collateral, between disputes that are necessary and those that are merely possible. We shall be lost in a maze if we put that compass by. Gully v. First National Bank in Meridian, 299 U.S. 109, 118, 57 S.Ct. 96, 100, 81 L.Ed. 70, 75 (1936).

Furthermore, the federal law must be a direct and essential element of the plaintiff’s cause of action. Id. at 112, 57 S.Ct. at 97, 81 L.Ed. at 71. And even if there is a federal question presented, that federal question must be “substantial.” Hagans v. Lavine, 415 U.S. 528, 536, 94 S.Ct. 1372, 1378, 39 L.Ed.2d 577, 587 (1974).

Before analyzing this case under these rather broad standards, we note that the federal question must be an essential element appearing on the face of the complaint. Gully, supra 299 U.S. at 112-13, 57 S.Ct. at 97-98, 81 L.Ed. at 71-72. The federal question may not be inferred from a defense or anticipated defense. Phillips Petroleum v. Texaco, 415 U.S. 125, 127-28, 94 S.Ct. 1002, 1003, 39 L.Ed.2d 209, 211-12 (1974).

We now examine the plaintiff’s complaint herein. The complaint initially alleges the factual background with respect to the contract and the subsequent $3,000 payment by the Air Force to Grimm. The complaint then alleges that there is no adequate remedy at law (principally because Grimm was insolvent, had numerous creditors, and refused to pay Smith), and asks for the declaration of an equitable lien, the appointment of a temporary receiver for the funds, and an injunction requiring the moneys to be paid to the receiver.

Nowhere does the complaint allege that any federal statute or constitutional provision is the basis for this cause of action. Indeed, there is no mention of any federal law, statute, or constitutional provision (other than allegation under the jurisdictional sections, 28 U.S.C. §§ 1331(a), 1361 and 2201). The Air Force is mentioned throughout, but only in its role as Grimm’s former employer and present debtor.

The litigation below did involve the construction and effect of a federal statute, the “Anti-Assignment Act,” 31 U.S.C. § 203. This section provides certain procedural safeguards so that, inter alia, the Government can be sure of the validity of the assignment of a claim against the Government, and renders null and void any attempted assignment of a claim against the Government that does not comply with its procedures. Smith had notified the Air Force of an assignment to him of the contract (complaint, exhibit “C”) and the Air Force had raised the issue of the Anti-Assignment Act (complaint, exhibit “D”). The question of whether an equitable lien, arising from a contract with an attorney, is a “transfer by operation of law” and therefore an exception to the Anti-Assignment Act was extensively briefed below by the Air Force and by Smith. However, this statute does not appear in the complaint, and cannot serve as a basis for jurisdiction since it is clearly collateral to Smith’s claim. Gully, supra. The existence by virtue of a federal statute of a formal impediment to recognition of the plaintiff’s claim grounded in state law does not provide federal question jurisdiction. Cf. Phillips Petroleum Co. v. Texaco, Inc., supra.

Although it is true that the term “laws,” within the meaning of section 1331(a), includes federal common law, Illinois v. City of Milwaukee, 406 U.S. 91, 99-100, 92 S.Ct. 1385, 1390-91, 31 L.Ed.2d 712, 721 (1972), Smith’s claim of the existence of an equitable lien does not provide federal question jurisdiction herein for several reasons. It is state law, not federal common law, that determines the existence of an equitable lien under the circumstances of this case. Cf. In re Freeman, 489 F.2d 431 (9th Cir. 1973) (bankrupt’s assignment of income tax proceeds void against United States under 31 U.S.C. § 203, but not void as between parties, and local law determines the validity of assignment of future right); Panning v. Mintz, 367 F.2d 804 (9th Cir. 1966) (validity of assignment as affects the rights of the assignor and assignee inter se a matter of local law, noncompliance with 31 U.S.C. § 203 notwithstanding); In re Italian Cook Oil Corp., 190 F.2d 994 (3rd Cir. 1951) (effectiveness of assignment governed by local law). Indeed, plaintiff Smith’s memorandum of law prepared in the proceedings below recognized this: “California law creates an equitable lien in favor of Smith under such a contract . ” (citing California cases) (R. 43-44); “ . . .in the case at bar the lien arises under California decisional law.” (R. 49). Furthermore, defenses to the existence of the equitable lien arising out of the contract — unconscionability and non-performance — are also issues of California law, and were briefed and argued as such below.

As already indicated, the fact that the provisions of the federal Anti-Assignment Act may be avoided by reason of an equitable lien created by local law in connection with a claim rooted in local law does not mean that such claim “arises under the Constitution, laws, or treaties of the United States.” Any federal question is too attenuated or collateral to provide jurisdiction. See Louisville & Nashville Railroad v. Motley, 211 U.S. 149, 29 S.Ct. 42, 53 L.Ed. 126 (1908).

B. Mandamus.

In 1962 Congress added section 1361 to Title 28 of the United States Code:

§ 1361. Action to compel an officer of the United States to perform his duty.
The district courts shall have original jurisdiction of any action in the nature of mandamus to compel an officer or employee of the United States or any agency thereof to perform a duty owed to the plaintiff.

Mandamus jurisdiction, we believe, fails on several counts.

This court has recently held that mandamus is traditionally proper only to command an official to perform an act which is a positive command and so plainly prescribed as to be free from doubt. The claim must be clear and certain and the duty of the officer ministerial. Jarrett v. Resor, 426 F.2d 213, 216 (9th Cir. 1970); United States v. Walker, 409 F.2d 477, 481 (9th Cir. 1969). See also Wilbur v. United States ex rel. Kadrie, 281 U.S. 206, 218-19, 50 S.Ct. 320, 324-25, 74 L.Ed. 809, 816-17 (1930).

It is true that in very recent cases we have interpreted the “clear and free from doubt” standard to permit mandamus to compel compliance with the constitutional requirements of due process. See Knuckles v. Weinberger, 511 F.2d 1221 (9th Cir. 1975) (due process challenge to summary curtailment of social security benefits); Workman v. Mitchell, 502 F.2d 1201 (9th Cir. 1974) (due process challenge to regulations governing prison discipline). However, in neither case did we cast doubt on the authority of Jarrett. In Knuckles, we noted that Jarrett did not involve an attack on a procedure as unconstitutional on its face. 511 F.2d at 1222. In Workman we approved of the holding in Jarrett and distinguished it in language relevant to the instant case:

Thus, mandamus jurisdiction was improperly invoked in that case [Jarrett] because there was no allegation that defendants had failed to perform any ministerial duty, be it established by regulation, statute or constitutional provision. Here [Workman ], however, the complaint clearly alleges that the disciplinary regulations adopted by the defendants, governing the procedures to be followed in imposing prison discipline, fail to comply with the requirements of due process. The district court does have jurisdiction under the mandamus statute to compel such compliance. 502 F.2d at 1206.

The complaint in the instant case alleges no duty — constitutional or otherwise — owed by the Air Force to the plaintiff. Nor does the judgment seek to force an officer of the United States to do anything. A complaint that fails to allege a duty owed by the officer to the plaintiff or a violation of the officer of any such duty is plainly insufficient to bestow mandamus jurisdiction.

Nor does the federal officer’s duty become clear, certain, and free from doubt when we infer from the complaint an allegation of a duty to recognize Smith’s purported equitable lien. To recognize the lien the officer must first determine its validity under state law and the effect of the Anti-Assignment Act, as well as ascertain the extent to which Grimm has satisfied Smith’s claims from other funds. To hold that these uncertainties can be removed by their adjudication and that, as a consequence, what originally was obscure is now clear, certain, and free from doubt would be contrary to Jarrett and extend the Knuckles-Workman interpretation far beyond its reasonable limits. In sum, this situation is not one in which extraordinary writ of mandamus will issue.

Therefore, we reverse the holding of the district court and remand with instructions to dismiss the complaint because of a lack of federal jurisdiction.

REVERSED and REMANDED. 
      
      . Grimm’s wife is also named as a defendant.
     
      
      . The Air Force has not appealed.
     
      
      . The Judgment provided, in pertinent part:
      IT IS FURTHER ORDERED, ADJUDGED, AND DECREED that Defendant Arthur R. Grimm instruct the Commanding Officer, United States Air Force Accounting and Finance Center (or any Finance and Accounting Office of the United States which may subsequently be responsible for disbursing moneys to Defendant Arthur R. Grimm) by registered mail, that henceforth, any payments for his account shall be forwarded directly to:
      The Bank of California, N. A.
      Collection Exchange Department
      P.O. Box 45000
      San Francisco, California 94145 who shall be, and hereby is, authorized and designated to endorse the payee’s name on any such check, draft, voucher, warrant or other evidence of indebtedness; who'shall be kept apprised of the gross amount of the monthly retirement pay of a captain in the United States Air Force retired with 20 years service; who shall on a monthly basis immediately upon receipt of a check, draft, etc., forthwith disburse to Nathan S. Smith fifty percent (50%) of such gross amount and to the payee named thereon the balance.
     
      
      . A federal appellate court may review subject matter jurisdiction even if not raised below. Mansfield, Coldwater & Lake Michigan Ry. Co. v. Swan, 111 U.S. 379, 4 S.Ct. 510, 28 L.Ed. 462 (1884).
     
      
      . The complaint also alleges jurisdiction based upon the Declaratory Judgment Act, 28 U.S.C. § 2201. The Declaratory Judgment Act does not confer an independent jurisdictional basis. Skelly Oil Co. v. Phillips Petroleum Co., 339 U.S. 667, 70 S.Ct. 876, 94 L.Ed. 1194 (1950).
     
      
      . Furthermore, even assuming that the attempt to enjoin the Air Force from paying directly to Grimm involves a federal question, we see no path around the bar of sovereign immunity. Suits nominally against government officers may in reality be against the sovereign. Dugan v. Rank, 372 U.S. 609, 83 S.Ct. 999, 10 L.Ed.2d 15 (1963). As the Court said in Dugan:
      
      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,” Land v. Dollar, 330 U.S. 731, 738, [67 S.Ct. 1009, 1012, 91 L.Ed. 1209] (1947), or if the effect of the judgment would be “to restrain the Government from acting, or to compel it to act.” Larson v. Domestic & Foreign Corp., supra, [337 U.S. 682] at 704, [69 S.Ct. 1457, at 1468, 93 L.Ed. 1628]; Ex parte New York, 256 U.S. 490, 502, [41 S.Ct. 588, 591, 65 L.Ed. 1057] (1921). Id. at 620, 83 S.Ct. at 1006, 10 L.Ed.2d at 23.
      The complaint does not allege, nor do we perceive, actions by the government officer which would fall within the two exceptions to this rule: (1) action by officers beyond their statutory powers and (2) even though within the scope of their authority, the powers themselves or the manner in which they are exercised are constitutionally void.” Id. at 621-22. The United States has not consented to be sued herein, and this lack of consent is a jurisdictional defect which may be raised at any time. Wright, Miller & Cooper, supra, Vol. 14, pp. 156-57. Cf. Roberts v. United States, 498 F.2d 520 (9th Cir.), cert. denied, 419 U.S. 1070, 95 S.Ct. 656, 42 L.Ed.2d 665 (1974).
     
      
      . See also, Elliott v. Weinberger, No. 74-1611 (9th Cir. October 1, 1975).
     
      
      . The judgment rendered in this case required Grimm to have his pay paid to a bank custodial account and to instruct the bank to pay Smith fifty percent thereof. This judgment did not enjoin or compel any action by the Air Force (other than the normal monthly disbursement of the monthly retirement payments, albeit to a bank), and could have been rendered by the California state courts.
     
      
      . We once again note the bar of sovereign immunity as an additional impediment to plaintiffs allegation of mandamus jurisdiction. See generally note 6 supra. The mandamus statute, 28 U.S.C. § 1361, is not a consent to suit by the sovereign. White v. Administrator of General Services Administration, 343 F.2d 444 (9th Cir. 1965). See United States v. Transocean Air Lines, Inc., 386 F.2d 79, 81 (5th Cir. 1967), cert. denied, 389 U.S. 1047, 88 S.Ct. 784, 19 L.Ed.2d 839 (1968) (judgment against the United States due to an attorney’s lien held barred by sovereign immunity).
     