TJOFLAT, Circuit Judge:
The Secretary of Labor (the Secretary) brought this action in the district court to enjoin the defendant, Gibson’s Products, Inc., to submit to inspection under section 8(a) of the Occupational Safety and Health Act of 1970 (OSHA), 29 U.S.C. § 657(a) (1976). The defendant counterclaimed, asserting that the fourth amendment required the Secretary to obtain a search warrant based on probable cause. The merits of the counterclaim are controlled by the recent Supreme Court decision in Marshall v. Barlow’s, Inc. 436 U.S. 307, 98 S.Ct. 1816, 56 L.Ed.2d 305 (1978), which held war-rantless inspections under section 8(a) unconstitutional. We cannot, however, reach the merits in this case. We find that the district court lacked subject matter jurisdiction to entertain the Secretary’s suit (and hence the counterclaim) and therefore remand the case with the instruction that the cause be dismissed.
I
The facts in this case are not in dispute. On March 23, 1974, compliance officers of the Occupational Safety and Health Administration sought routine entry into one of [671] the defendant’s retail stores. The defendant refused to admit them. The Secretary brought suit in the district court to obtain an order to compel the defendant to submit to inspection. The court issued a show cause order, and the defendant counterclaimed. Since the counterclaim sought to enjoin section 8(a) of OSHA, which authorizes warrantless inspections without probable cause1, as repugnant to the fourth amendment, a three-judge district court was convened pursuant to 28 U.S.C. § 2282 (1970).2
The court held that when compliance officers seeking to inspect business premises under section 8(a) are refused entry, they must obtain a search warrant. Brennan v. Gibson’s Products, Inc., 407 F.Supp. 154 (E.D.Texas 1976). The court upheld section 8(a) by construing it to require impliedly that the Secretary procure a search warrant. Since the Secretary admittedly had no reason to believe the defendant was violating OSHA, and thus had no grounds for a warrant, his petition was dismissed. The counterclaim was also dismissed.
The Secretary filed notice of appeal both to this court and to the Supreme Court, but the appeal to the latter was dismissed on motion of the Secretary. The defendant does not appeal. Since the Secretary appeals only from the district court’s dismissal of his petition to require the defendant to allow the search, the case is properly before this court.3
II
This case was argued to us on the constitutional issues. Neither party questioned the jurisdiction of the district court to hear the case. Upon review of the record and the applicable statutes and precedents, we entertained doubts as to the jurisdiction of the court below to consider the Secretary’s petition for the injunction he sought, and we requested briefing on the question. We hold that the district court did not have subject matter jurisdiction.
It is incumbent on a court of the United Sates, whether trial or appellate, to [672] dismiss an action whenever it appears that subject matter jurisdiction is lacking, and the court must do so sua sponte if the parties have not brought the issue to the attention of the court. Mansfield, Coldwater & Lake Michigan Railway v. Swan, 111 U.S. 379, 4 S.Ct. 510, 28 L.Ed. 462 (1884). This is the “first principle of federal jurisdiction.” P. Bator, P. Mishkin, D. Shapiro, & H. Wechsler, Hart & Wechsler’s the Federal Courts and the Federal System 835 (2d ed. 1973). In adherence to this principle, we consider the jurisdictional issue.
A
Another principle of preeminence in federal jurisprudence is that federal courts are courts of limited jurisdiction; the exercise of federal jurisdiction is proper only when prescribed by Congress.4 Chicot County Drainage District v. Baxter State Bank, 308 U.S. 371, 376, 60 S.Ct. 317, 319, 84 L.Ed. 329 (1940); Edwards v. Selective Service Local Board No. 111, 432 F.2d 287, 290 (5th Cir. 1970), cert. denied, 402 U.S. 952, 91 S.Ct. 1637, 29 L.Ed.2d 122 (1971). A corollary to this principle is that Congress may withhold from the federal courts jurisdiction over a class of cases even though the judicial power of the United States, as described in article III, § 2 of the Constitution, includes that class. Sheldon v. Sill, 49 U.S. (8 How.) 441, 12 L.Ed. 1147 (1850); Turner v. Bank of North America, 4 U.S. (4 Dali.) 7, 1 L.Ed. 718 (1799). Our task, therefore, is to examine the actions of Congress to determine whether this case comes within the perimeters of federal jurisdiction. Before we proceed, we note that the defendant’s counterclaim, although raising a substantial federal question, cannot confer subject matter jurisdiction otherwise lacking.5 Jurisdiction must be apparent on the face of the Secretary’s petition. Louisville & Nashville Railroad v. Mottley, 211 U.S. 149, 29 S.Ct. 42, 53 L.Ed. 126 (1908).
In our search for Congressional guidance on the jurisdictional issue in this case, we must start with the specific before we can address the general: we look first to OSHA to see how it speaks to the issue of jurisdiction and second to general grants of federal jurisdiction to discern whether they may provide a basis for this suit. OSHA, on its face, does not authorize the Secretary to petition the district court for an injunction to compel employers to submit to search under section 8(a). It merely authorizes “the Secretary, upon presenting appropriate credentials to the owner, operator, or agent in charge, ... to enter without delay and at reasonable times any factory, plant, establishment, construction site, or other area, workplace or environment where work is performed by an employee of an employer.” 29 U.S.C. § 657(a)(1) (1976); see note 1 supra. Moreover, in enacting section 8(a) Congress clearly did not contemplate the injunctive relief sought by the Secretary in the district court below.
That Congress did not write section 8(a) to allow the injunction sought here is apparent from the provision authorizing the Secretary “to enter without delay.” These words were inserted by amendment [673] in the House and were intended to preserve the element of surprise deemed essential to inspections under the section. 116 Cong. Rec. 38709 (1970) (remarks of Congressmen Galifianakis and Steiger). That surprise was considered crucial to such inspections is unequivocally indicated by the provision imposing criminal penalties for giving without permission advance notice of an inspection. 29 U.S.C. § 666(f) (1976). See Marshall v. Barlow’s, Inc., 436 U.S. at 317, 98 S.Ct. at 1823. Obviously, any element of surprise is lost by the time the Secretary obtains an injunction.6
The legislative history of OSHA indicates that Congress may have omitted to provide jurisdiction for injunctive relief here precisely because of doubts as to the constitutionality of such provision. A sponsor of OSHA, Congressman Steiger, remarked during debate, “I would add that in carrying out inspection duties under this act, the Secretary, of course, would have to act in accordance with applicable constitutional protections.” 116 Cong.Rec. 38709 (1970). We think this congressional concern relevant to the determination of the intent behind the omission of a jurisdictional provision under section 8(a). As we discuss below, under specific sections of OSHA Congress did authorize the Secretary to bring suit and did provide for jurisdiction in the district courts over such suit. Congress knew full well how to grant jurisdiction, and where it is not unlikely that Congress omitted such a grant to avoid possible conflict with the Constitution, we can scarcely infer one.
That Congress did not intend to provide jurisdiction to grant the injunctive relief sought below is reinforced by the explicit provision for district court jurisdiction elsewhere in OSHA. The subsection immediately following 8(a) provides the Secretary with subpoena power in “inspections and investigations under this chapter [to] require the attendance and testimony of witnesses and the production of evidence under oath.” 29 U.S.C. § 657(b) (1976). If the Secretary’s order is violated, the district [674] courts are given “jurisdiction to issue to [the violator] an order requiring such person to appear to produce evidence . and to give testimony relating to the matter under investigation or in question, and any failure to obey such order of the court may be punished by said court as a contempt thereof.” Id. This provision, section 8(b), makes clear the acute attentiveness with which Congress addressed the role that the federal courts should play in the effec-tuation of OSHA.
Section 8(b) does not stand alone. Section 11(c)(2) of OSHA, 29 U.S.C. § 660(c)(2) (1976), states that upon complaint by any employee who believes that he or she has been fired or discriminated against for causing a complaint to be filed under OSHA, the Secretary “shall bring an action in any appropriate United States district court [against the employer]” if the Secretary has determined after investigation that the employer has indeed retaliated against the employee. Moreover, Congress was very explicit in delineating the jurisdiction of the district courts in such actions. “In any such action the United States district courts shall have jurisdiction, for cause shown to restrain violations [for retaliation] and order all appropriate relief including rehiring or reinstatement of the employee to his former position with back pay.” Id.
Subsection (a) of section 13 of OSHA, 29 U.S.C. § 662(a) (1976), confers jurisdiction on the district courts, upon petition by the Secretary, to restrain conditions that pose an imminent danger to employees. Subsection (b) of section 13 carefully defines the nature and extent of the jurisdiction in suits brought by the Secretary under subsection (a). Subsection (b) provides as follows:
(b) Upon the filing of any such petition the district court shall have jurisdiction to grant such injunctive relief or temporary restraining order pending the outcome of an enforcement proceeding pursuant to this chapter. The proceeding shall be as provided by Rule 65 of the Federal Rules, Civil Procedure, except that no temporary restraining order issued without notice shall be effective for a period longer than five days.
Obviously, Congress was specific and precise in this provision. Congress not only expressly authorized jurisdiction to grant injunctive relief and temporary restraining orders but also carefully defined the standards for allowing such relief by reference to rule 65, with the modification that a temporary restraining order issued without notice shall have effect for only five days instead of the ten days provided by the rule.
Sections 8(b), 11(c)(2), and 13(a) and (b) are the only provisions of OSHA that authorize the Secretary to bring suit in the district courts. Another provision, section 17(7), 29 U.S.C. § 666(k) (1976), requires that the United States bring suit in the appropriate district court to recover civil penalties incurred under OSHA. It is noteworthy that this section does not expressly create jurisdiction for the suit. Congress apparently recognized that even without express provision in OSHA, jurisdiction exists in the district courts under 28 U.S.C. § 1345 (1976) to hear cases prosecuted by the United States. See note 10 infra. Section 17(7) evinces again the discriminating attention Congress paid to the jurisdictional provisions of OSHA.
The absence of any provision in OSHA authorizing the Secretary to seek an inspection injunction is accentuated by the presence of provisions in other acts authorizing suit for precisely such enforcement relief. Exemplary is 30 U.S.C.A. § 818(a)(1) (West Supp.1978), a section of the Mine Safety Act. It states in pertinent part:
(a)(1) The Secretary may institute a civil action for relief, including a permanent or temporary injunction, restraining order, or any other appropriate order in the district court of the United States . whenever [a coal mine] operator or his agent
(D) refuses to permit the inspection of the coal or other mine .
The Air Pollution Control Act contains an inspection provision strikingly similar to section 8(a) of OSHA. The pertinent sec[675] tion states, “the Administrator or his authorized representative, upon presentation of his credentials . . . shall have a right of entry to, upon, or through any premises of [any person subject to the Act].” 42 U.S.C.A. § 7414(a)(2)(A) (West Supp.1978). Quite unlike OSHA, the Air Pollution Control Act goes on to authorize the Administrator to “commence a civil action for a permanent or temporary injunction . . . whenever [a person subject to the Act] . fails or refuses to comply with any requirement of section 7414 of this title . . .” 42 U.S.C.A. § 7413(b)(4) (West Supp.1978). These and other like provisions7 illustrate that Congress is cognizant of the need to set forth explicitly the authority of an administrator or agency to seek enforcement relief in federal court. Such provision is therefore particularly conspicuous by its absence from OSHA.8
Given the congressional awareness and concern illustrated by the provisions of OSHA and the other acts we have just discussed, we think the natural inference to be drawn from the omission of any grant of jurisdiction for the Secretary to obtain an injunction under section 8(a) is that no such grant was intended. Indeed, a longstanding rule of statutory construction teaches that the expression of certain powers implies the exclusion of others,9 and invocation of this rule is particularly appropriate here, where its application is consistent with the recognition that Congress did not contemplate injunctive relief under section 8(a) and perhaps omitted provision for [676] such relief to avoid conflict with the Constitution. See National Railroad Passenger Corp. v. National Association of Railroad Passengers, 414 U.S. 453, 458, 94 S.Ct. 690, 693, 38 L.Ed.2d 646 (1974). “Where Congress has consistently made express its delegation of a particular power, its silence is strong evidence that it did not intend to grant the power.” Alcoa Steamship Co. v. Federal Maritime Commission, 121 U.S.App.D.C. 144, 146, 348 F.2d 756, 758 (1965).
B
Our interpretation of OSHA is dis-positive of the jurisdictional issue in this case. Where Congress does not intend to grant jurisdiction, we will not infer it, for Congress has plenary power over the jurisdiction of the federal district courts. “[H]aving a right to prescribe, Congress may withhold from any court of its creation jurisdiction of any of the enumerated controversies. Courts created by statute can have no jurisdiction but such as the statute confers.” Sheldon v. Sill, 49 U.S. (8 How.) 441, 448, 12 L.Ed. 1147, 1151 (1850). Counsel urge, however, that several general grants of jurisdiction allow this suit. We will not read these provisions to contradict our interpretation of OSHA, but we think they do warrant some discussion.
Counsel argue that 28 U.S.C. § 1345 (1976) gives the district court jurisdiction to hear a case brought under section 8(a) by the Secretary. Even absent the intent of Congress not to provide such jurisdiction under OSHA, we think this argument without merit.
Section 1345 provides as follows: “Except as otherwise provided by Act of Congress, the district courts shall have original jurisdiction of all civil actions, suits or proceedings commenced by the United States, or by any agency or officer thereof expressly authorized to sue by Act of Congress.” This suit was brought not by the United States but by the Secretary of Labor. Therefore, the issue is not whether the United States could initiate such a suit in the district court but whether the Secretary can.10
Section 1345 grants the district courts jurisdiction over cases brought by agencies only when those agencies are “expressly authorized to sue by Act of Congress.”11 See Reed v. County Commissioners, 277 U.S. 376, 48 S.Ct. 531, 72 L.Ed. 731 (1928) (members of Senate committee not authorized by law to sue and therefore no district court jurisdiction under predecessor of section 1345). Therefore, for section 1345 jurisdiction to exist over this action, the Secretary must be expressly authorized to sue.
No provision of OSHA grants the Secretary general authority to bring suit. As discussed above, there are specific grants of district court jurisdiction over actions brought by the Secretary under certain provisions of OSHA. Section 8(a) is not one of those provisions. It is contended, however, that section 14 of OSHA, 29 U.S.C. § 663 (1976), does grant the Secretary general authority to enforce the Act. A reading of section 14 belies this contention; it provides in pertinent part as follows: “the Solicitor of Labor may appear for and represent the Secretary in any civil litigation brought under this chapter but all such litigation shall be subject to the direction and control of the Attorney General.” Section 14 merely allows the Solicitor of Labor to represent [677] the Secretary in civil suits that the Secretary could bring. It does not expand the power of the Secretary to bring suits beyond those authorized by the specific provisions we have already discussed. Any contrary reading would render redundant most of the specific provisions, which are carefully and precisely drawn.12 We think it clear, therefore, that no jurisdiction under section 1345 could exist in this case.
The complaint alleged alternative subject matter jurisdiction under 28 U.S.C. § 1337 (1976), which provides in pertinent part as follows: “The district court shall have original jurisdiction of any civil action or proceeding arising under any Act of Congress regulating commerce . . .” Admittedly, OSHA is an act regulating commerce.13 It would be anomalous indeed, however, to suggest that an action “arises under” an act that impliedly rejects jurisdiction to bring the action.14 The specific preclusion controls the general grant.15
Counsel make the final argument that regulations promulgated by the Secretary authorized him to bring this suit. Under the authority of section 8(g)(2) of OSHA, 29 U.S.C. § 657(g)(2) (1976), the Secretary of Labor and ihe Secretary of Health, Education, and Welfare are each instructed to “prescribe such rules and regulations as he may deem necessary to carry out their responsibilities under this chapter, including rules and regulations dealing with the inspection of an employer’s establishment.” One of these regulations provides that if an employer refuses to allow compliance officers to enter his premises, the inspection is to cease and the matter is to be referred to the Area Director, the Assistant Regional Director, and the Regional Solicitor, “who shall promptly take appropriate action, including compulsory process, if necessary.” 29 C.F.R. § 1903.4 (1977). It is therefore claimed that jurisdiction exists in the district court to issue such process. We think this argument patently paralogistic. A grant of rulemaking power is not authority to create federal jurisdiction. That authority lies solely with Congress.16 More[678] over, the agency cannot by rule do what Congress by statute precludes. United States v. Larionoff, 431 U.S. 864, 873, 97 S.Ct. 2150, 2156, 53 L.Ed.2d 48 (1977).
Ill
For the reasons stated above, we hold that the district court lacked jurisdiction over the subject matter of this case. Therefore, we vacate the judgment of the district court and remand the case with the instruction that the Secretary’s petition be dismissed for lack of jurisdiction.
VACATED and REMANDED with instructions to DISMISS.
(a) In order to carry out the purposes of this chapter, the Secretary, upon presenting appropriate credentials to the owner, operator, or agent in charge, is authorized—
(1) to enter without delay and at reasonable times any factory, plant, establishment, construction site, or other area, workplace or environment where work is performed by an employee of an employer; and
(2) to inspect and investigate during regular working hours and at other reasonable times, and within reasonable limits and in a reasonable manner, any such place of employment and all pertinent conditions, structures, machines, apparatus, devices, equipment, and materials therein, and to question privately any such employer, owner, operator, agent or employee.
Nor could direct appeal to the Supreme Court be had under 28 U.S.C. § 1252 (1976), which allows such appeal only in cases where an act of Congress is held unconstitutional. Here the court construed § 8(a) to save its constitutionality. See United States v. Christian Echoes Nat’l Ministry, Inc., 404 U.S. 561, 92 S.Ct. 663, 30 L.Ed.2d 716 (1972).
The Court did note, as background, that in a separate action the Secretary had obtained an order in district court compelling the employer to admit the inspector. 436 U.S. at 310, 98 S.Ct. at 1819. The Secretary’s suit, however, was not before the Court, and therefore the Court did not opine on the jurisdictional issue in that case.
Under the Federal Rules of Civil Procedure, the only type of injunction issuable without notice is a temporary restraining order. Fed.R.Civ.P. 65. But whether to grant a temporary restraining order compelling the employer to submit to inspection would constitute, for all practical purposes, the merits of the suit before the court. Therefore, it is highly improbable that the court would grant such relief absent notice or hearing, unless the Secretary could demonstrate “from specific facts shown by affidavit or by the verified complaint that immediate and irreparable injury, loss, or damage” would result if notice were given. Fed.R.Civ.P. 65(b); accord, Rondeau v. Mosinee Paper Corp., 422 U.S. 49, 57, 95 S.Ct. 2069, 2075, 45 L.Ed.2d 12 (1975). In a case like the one before us, where no suspicion of a violation exists, such a showing would be impossible. The Secretary could not show that the employer would not voluntarily submit to inspection, and therefore it could not be demonstrated that any harm that might result from refusal to permit entry indeed would be “irreparable,” for if entry were allowed, the injunction would have been unnecessary.
Even if the inspector had sought entry and was refused, a showing of the irreparable and immediate harm envisioned by Fed.R.Civ.P. 65(b) would be extremely difficult to make in the absence of articulable facts indicating that the employer had violated the safety provisions of OSHA. Therefore, the Secretary could obtain the type of injunction sought here rarely, if ever, without notice or hearing. Indeed, the procedure followed by the Secretary in this case clearly contemplated notice to the employer, and the employer was entitled to present defenses and to counterclaim in response to the show cause order of the court. Cf. Barlow’s, 436 U.S. at 318, & n. 14, 98 S.Ct. at 1823 (in separate suit by Secretary, employer given notice and opportunity to respond to show cause order); Brennan v. Buckeye Indus., Inc., 374 F.Supp. 1350 (S.D.Ga.1974) (same).
Of course, the equitable principles governing the issuance of injunctive relief are inapposite to proceedings for a search warrant. Such a warrant could issue ex parte and without notice before or after entry is sought, thereby preserving the element of surprise. Barlow’s, 436 U.S. at 316, 98 S.Ct. at 1822. Whether this fact is sufficient to distinguish the jurisdictional considerations in this case from those in a proceeding for a warrant is an issue we need not decide today.
As examples, the Mine Safety Act and the Air Pollution Control Act, cited above, are of narrower applicability than OSHA, which applies to all employers “engaged in a business affecting commerce.” 29 U.S.C. § 652(5) (1976). Moreover, the industries coming under acts such as that governing mine safety are generally subject to pervasive federal regulation, a factor found critical by the Supreme Court in its decisions upholding warrantless inspections in the liquor industry, Colonnade Catering Corp. v. United States, 397 U.S. 72, 77, 90 S.ct. 774, 777, 25 L.Ed.2d 60 (1970), and the firearms industry, United States v. Biswell, 406 U.S. 311, 316, 92 S.Ct. 1593, 1596, 32 L.Ed.2d 87 (1972). As the Supreme Court stated in Barlow’s: “The reasonableness of a war-rantless search . . . will depend upon the specific enforcement needs and privacy guarantees of each statute. Some . . . statutes . . apply only to a single industry, where regulations might already be so pervasive that a Colonnade-Biswell exception to the warrant requirement could apply.” 436 U.S. at 321, 98 S.Ct. at 1825.
permit an aggrandizement of the Executive’s and a restriction of the legislature’s role in the governmental process. [It would] allow the Executive, by a resort to the courts, to set governmental policy without legislative participation in areas in which the Constitution anticipates that the Congress play a significant role. Not only does this carry the potential for undermining the separation of powers notion that particular governmental functions should be accomplished primarily by the branch specifically designed and organized to perform them; it also threatens the constitutionally structured coordination of will and effort among the branches which stands as a vital safeguard for the preservation of the liberty of the people.
Note, Nonstatutory Executive Authority to Bring Suit, 85 Harv.L.Rev. 1566, 1570 (1972). Moreover, to adopt the concept that an agency can authorize itself to sue in federal court would allow the facile circumvention of those statutory provisions reserving to the Attorney General, in the absence of congressional direction to the contrary, the conduct of litigation to which the United States or any of its agencies is a party. 28 U.S.C. §§ 516, 519 (1976); see note 11 supra.
In any event, we do not think that the Court is furthering any such proposition. The language quoted above merely suggests that if statutory authority exists for a suit by the Secretary for an injunction, he “would appear” to have analogous authority to seek a warrant. Whether there is sufficient distinction between a proceeding for a warrant and one for an injunction to imply jurisdiction in the former but not in the latter is a problematic issue, cf. United States v. Holland, 552 F.2d 667, 674-75 (5th Cir. 1977) (even if district court has jurisdiction to issue search warrant, it had no jurisdiction to issue order in aid of investigation by Postal Service), vacated on other grounds, 565 F.2d 383 (1978) (en banc), and we do not address it here. See note 6 supra. It is clear, however, that the Court did not purport to address the issue we decide today, whether in fact statutory authority exists for the Secretary to bring suit to compel submission to inspection.