OPINION
Plaintiff Smith sued the Commanding Officer, Air Force Accounting and Finance Center (the “Air Force”) and defendant Grimm 1 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, 2 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 Bоard 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,
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. 3
II. Federal Jurisdiction.
At bottom, this is a simple contract disрute 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 lаck 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, couрled 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. 4 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. 5 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. *1350 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 fedеral 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 effеct . . . ” of the federal law.
Shulthis v. McDougal,
If we follow the ascent far enough, countless claims of right can be discovered to have their source оr 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 arе 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,
Before аnalyzing 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
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 thе 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 thе Air Force of an assignment to him of the contract (complaint, exhibit “C”) and the Air *1351 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 wаs 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 clаim 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,
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 federаl question is too attenuated or collateral to provide jurisdiction.
6
See Louisville & Nashville Railroad v. Motley,
B. Mandamus.
In 1962 Congress added section 1361 to Title 28 of the United States Code:
*1352 § 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 frоm doubt. The claim must be clear and certain and the duty of the officer ministerial.
Jarrett v. Resor,
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,
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 adоpted 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 — constitutiоnal 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. 8 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 doеs 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 ascertаin 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 onе in which extraordinary writ of mandamus will issue. 9
*1353 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.
Notes
. 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, vоucher, 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 рercent (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,
. 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.,
. 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,
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,
. 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,
