Barry George, an attorney specializing in automobile personal injury cases, brought a defamation suit in state court against Gary Kay, a United States postal inspector. The suit arose out of a mail fraud investigation by Kay involving possible fraudulent insurance claims filed by George, during the course of which Kay allegedly said to a third party that George had staged accidents in order to recover on insurance policies. The case was removed to federal court under 28 U.S.C. § 1442 where Kay moved for dismissal, or, in the alternative, for summary judgment, and filed supporting affidavits. The district court dismissed pursuant to F.R.C.P. 12(b)(6) on grounds that Kay as a government official has absolute immunity from suit for acts that are within the “outer perimeter” of his line of duty.
George argues on appeal that the district court erred in granting a lower level federal official any immunity from a state tort suit; that, if any immunity is available it should be the qualified immunity allowed in Butz v. Economou, 438 U.S. 478, 98 S.Ct. 2894, 57 L.Ed.2d 895 (1978), rather than the absolute immunity allowed in Barr v. Matteo, 360 U.S. 564, 79 S.Ct. 1335, 3 L.Ed.2d 1434 (1959); and that the district court erred in granting a 12(b)(6) dismissal.
*1105We affirm the district court with respect to the immunity issue, and, although we find that the district court should have converted the 12(b)(6) motion into one for summary judgment, we do not remand on that issue because we find no prejudice in his handling of the matter.
I.
In Barr v. Matteo, 360 U.S. 564, 79 S.Ct. 1335, 3 L.Ed.2d 1434 (1959), the acting director of the Office of Rent Stabilization, charged with libel, was allowed an absolute privilege defense even though the acts complained of were found to be only within the outer perimeter of his duties and despite allegations that he acted with malice. The Court relied in part on Spalding v. Vilas, 161 U.S. 483, 16 S.Ct. 631, 40 L.Ed. 780 (1896), in which the Postmaster General as head of an executive department was afforded absolute immunity from a libelous distribution suit, but it refused to restrict the immunity to executive officers of Cabinet rank, pointing out that the privilege is not a “badge or emolument of exalted office, but an expression of a policy designed to aid in the effective functioning of government”. 360 U.S. at 572-73, 79 S.Ct. at 1340.
We read Barr to extend this absolute immunity to lower as well as upper level federal officials exercising discretionary authority. The Barr Court was careful to point out that the scope of immunity may be greater on occasion for higher level officials than for lower level ones; that is not because of the title of the office, however,
[b]ut that is because the higher the post, the broader the range of responsibilities and duties, and the wider the scope of discretion, it entails. . . . [It is] the relation of the act complained of to “matters committed by law to his control or supervision,” . . . which must provide the guide in delineating the scope of the rule .
360 U.S. at 573-74, 79 S.Ct. at 1340-41. (citation omitted).
The grant of absolute immunity to any federal official is not tantamount to granting absolute license to act as he chooses: the immunity is only absolute insofar as the acts complained of are within the scope of the official’s authority..
In this case, the affidavits of Kay and his supervising officer reflect that the allegations in George’s complaint relate to acts by Kay that were performed within the scope of his official duties as a postal inspector. The district court did not err, therefore, in holding that George was entitled to an immunity defense as a matter of law.
II.
George contends, however, that even if Kay is entitled to any privilege at all, it should be only the qualified immunity granted in Butz v. Economou, 438 U.S. 478, 98 S.Ct. 2894, 57 L.Ed.2d 895 (1978). We disagree.
In Butz, the Court narrowed the scope of privilege allowed in Spalding and Barr, holding that although government officials charged with tortious acts under state law are still allowed an absolute immunity privilege if the acts complained of were within the outer perimeter of their authority, those charged with unconstitutional acts are entitled only to a qualified immunity. The Court was
confident that Barr did not purport to protect an official who has not only committed a wrong under local law, but also violated those fundamental principles of fairness embodied in the Constitution. Whatever level of protection from state interference is appropriate for federal officials executing their duties under federal law, it cannot be doubted that these officials, even when acting pursuant to congressional authorization, are subject to the restraints imposed by the Federal Constitution.
438 U.S. at 495, 98 S.Ct. at 2905 (footnote omitted).
The Ninth Circuit has recently recognized the distinction Butz made between state tort law claims and constitutional claims. *1106In Miller v. DeLaune, 602 F.2d 198 (9th Cir. 1979), an official of the Internal Revenue Service was accused of both unconstitutional and tortious actions. The district court dismissed the complaint for failure to state a claim, relying on Barr to find that the official was absolutely immune from the suit because her actions were within the outer perimeter of her line of duty. The court of appeals reversed dismissal of the constitutional claim, finding that Butz allowed only a qualified immunity insofar as the official’s actions may have violated appellant’s constitutional rights. The court affirmed dismissal of the state tort law claims, however, finding that Butz “explicitly limited its immunity holding to those situations involving constitutional violations [and] current law compels the conclusion that a government official . acting within the outer perimeter of his or her line of duty, is absolutely immune from state or common-law tort liability.” 602 F.2d at 199-200 (citations and footnotes omitted).
We find that, as no constitutional violation has been alleged in the instant case,1 the district court was correct in allowing Kay the Barr absolute privilege rather than the Butz qualified privilege.
III.
We do find, however, that the district court should have granted the motion for summary judgment rather than the 12(b)(6) motion, which is proper only when the complaint on its face fails to state a claim for relief. If it is necessary for the court to look beyond the pleadings, the 12(b)(6) motion must be converted into a motion for summary judgment and all parties must be given the opportunity to present materials pertinent to such a motion.2 The complaint in this case did not allege that Kay was employed as a federal official; on its face it was a simple defamation complaint. The district court had to look to Kay’s motion to dismiss and its supporting affidavits to find that Kay was acting in his capacity as a federal official and that he was therefore entitled to an immunity defense. The record shows, however, that the district court in its ruling on the 12(b)(6) motion also considered affidavits of George and of Isaac Henry, to whom the defamatory statement was allegedly made. The 12(b)(6) motion was therefore effectively, if not formally, treated as a motion for summary judgment.
Because we are as able as the district court to determine that summary judgment would have been properly granted in this case (both parties had ample opportunity to present affidavits; the affidavits presented no issue of material fact; and the scope and status of Kay’s employment were clearly established therein), we refuse to remand for the consideration of that motion. See SEC v. Chenery Corp., 318 U.S. 80, 88, 63 S.Ct. 454, 459, 87 L.Ed. 626 (1943) (“It would be wasteful to send a case back to a lower court to reinstate a decision which it had already made but which the appellate court concluded should properly be based on another ground within the power of the appellate court to formulate.”); see also Romero v. International Terminal Operating Co., 358 U.S. 354, 79 S.Ct. 468, 3 L.Ed.2d 368 (1959). We, therefore, affirm the district court’s judgment.
AFFIRMED: