Me. Justice Black
delivered the opinion of the Court.
Petitioners brought this suit in a federal district court to recover damages in excess of $3,000 from the respondents who are agents of the Federal Bureau of Investigation. The complaint alleges that the court's jurisdiction is founded upon federal questions arising under the Fourth and Fifth Amendments. It is alleged that the damages were suffered as a result of the respondents imprisoning the petitioners in violation of their constitutional right to be free from deprivation of their liberty without due process of law, and subjecting their premises to search and their possessions to seizure, in violation of their constitutional right to be free from unreasonable searches and seizures. Respondents moved to dismiss the complaint for failure to state a cause of action for which relief could be granted and for summary judgment on the grounds that the federal agents acted within the scope of their authority as officers of the United States and that the searches and seizures were incidental to lawful arrests and were therefore valid. Respondents filed affidavits in support of their motions and petitioners filed counter-affidavits. After hearing the motions the district judge did not pass on them but, on his own motion, dismissed the suit for want of federal jurisdiction on the ground that this action was not one that ". . . arises under the Constitution or laws of the United States . . ." as required by 2.8 U. S. C. § 41 (1). The Circuit Court of Appeals affirmed on the same ground. 150 F. 2d 96. At the same time it denied a motion made by petitioners asking it to direct the District Court to give petitioners leave to amend their complaint in order to make it still more clearly appear that the action was directly grounded on violations of rights alleged to stem from the Fourth and Fifth Amendments. We granted certiorari because of the importance of the jurisdictional issue involved.
Respondents make the following argument in support of the District Court's dismissal of the complaint for want of federal jurisdiction. First, they urge that the complaint states a cause of action for the common law tort of trespass made actionable by state law and that ft' therefore does not raise questions arising "under the Constitution or laws of the United States." Second, to support this contention, respondents maintain that petitioners could not recover under the Constitution or laws of the United States, since the Constitution does not expressly provide for recovery in money damages for violations of the Fourth and Fifth Amendments and Congress has not enacted a statute that.does so provide. A mere reading of the complaint refutes the first contention and, as will be seen, the second one is not decisive on the question of jurisdiction of the federal court.
Whether or not the complaint as drafted states a common law action in trespass made actionable by state law, it is clear from the way it was drawn that petitioners seek recovery squarely on the ground that respondents violated the Fourth and Fifth Amendments. It charges that the respondents conspired to do acts prohibited by these amendments and alleges that respondents' conduct pursuant to the conspiracy resulted in damages in excess of $3,000. It cannot be doubted therefore that it was the pleaders' purpose to make violation of these constitutional provisions the basis of this suit. Before deciding that there is no jurisdiction, the District Court must look to the way the complaint is drawn to see if it is drawn so as to claim a right to recover under the Constitution and laws of the United States. For to that extent "the party who brings a suit is master to decide what law he will rely upon and . . . does determine whether he will bring a 'suit arising under' the . . . [Constitution or laws] of the United States by his declaration or bill." The Fair v. Kohler Die Co., 228 U. S. 22, 25. Though the mere failure to set out the federal or constitutional claims as specifically as petitioners have done would not always be conclusive against the party bringing the suit, where the complaint, as here, is so drawn as to seek recovery directly under the Cbnstitution or laws of the United States, the federal court, but for two possible exceptions later noted, must entertain the suit. Thus allegations far less specific than the ones in the complaint before us have been held adequate to show that the matter in controversy arose under the Constitution of the United States. Wiley v. Sinkler, 179 U. S. 58, 64-65; Swafford v. Templeton, 185 U. S. 487, 491-492. The reason for this is that the court must assume jurisdiction to decide whether the allegations state a cause of action on which the court can grant relief as well as to determine issues of fact arising in the controversy.
Jurisdiction, therefore, is not defeated as respondents seem to contend, by the possibility that the averments might fail to state a cause of action on which petitioners could actually recover. For it is well settled that the failure to state a proper cause of action calls for a judgment on the merits and not for a dismissal for want of jurisdiction. Whether the complaint states a cause of action on which relief could be granted is a question of law and just as issues of fact it must be decided after and not before the court has assumed jurisdiction over the controversy. If the court does later exercise its jurisdiction to determine that the allegations in the complaint do not state a ground for relief, then dismissal of the case would be on the merits, not for want of jurisdiction. Swafford v. Templeton, 185 U. S. 487, 493, 494; Binderup v. Pathe Exchange, 263 U. S. 291, 305-308. The previously carved out exceptions are that a suit may sometimes be dismissed for want of jurisdiction where the alleged claim under the Constitution or federal statutes clearly appears to be immaterial and made solely for the purpose of obtaining jurisdiction or where such a claim is wholly insubstantial and frivolous. The accuracy of calling these dismissals jurisdictional has been questioned. The Fair v. Kohler Die Co., supra, 228 U. S. at 25. But cf. Swafford v. Templeton, supra.
But as we have already pointed out the alleged violations of the Constitution here are not immaterial but form rather the sole basis of the relief sought. Nor can we say that the cause of action alleged is so patently without merit as to justify, even under the qualifications noted, the court's dismissal for want of jurisdiction. The Circuit Court of Appeals correctly stated that "the complaint states strong cases, and if the allegations have any foundation in truth, the plaintiffs' legal rights have been ruthlessly violated." Petitioners' complaint asserts that the Fourth and Fifth Amendments guarantee their rights to •be free from unauthorized and unjustified imprisonment and from unreasonable searches and seizures. They claim that respondents' invasion of these rights caused the damages for which they seek to recover and point further to 28 XJ. S. C. § 41 (1) which authorizes the federal district courts to try "suits of a civil nature" where the matter in. controversy "arises under the Constitution or laws of the XJnited States," whether these are suits in "equity" or at "law." Petitioners argue that this statute authorizes the Court to entertain this action at law and to grant recovery for the damages allegedly sustained. Respondents contend that the constitutional provisions here involved are prohibitions against the Federal Government as a government and that 28 XJ. S. C. § 41 (1) does not authorize recovery in money damages in suits against unauthorized officials who according to respondents are in the same position as individual trespassers.
Respondents' contention does not show that petitioners' cause is insubstantial or frivolous, and the complaint does in fact raise serious questions, both of law and fact, which the District Court can decide only after it has assumed jurisdiction over the controversy. The issue of law is whether federal courts can grant money recovery for damages said to have been suffered as a result of federal officers violating the Fourth and Fifth Amendments. That question has never been specifically decided by this Court. That the issue thus raised has sufficient merit to warrant exercise of federal jurisdiction for purposes of adjudicating it can be seen from the cases where this Court has sustained the jurisdiction of the district courts in suits brought to recover damages for depriving a citizen of the right to vote in violation of the Constitution. And it is established practice for this Court to sustain the jurisdiction of federal courts to issue injunctions to protect rights safeguarded by the Constitution and to restrain individual state officers from doing what the 14th Amendment forbids the State to do. Moreover, where federally protected rights have been invaded, it has been the rule from the beginning that courts will be alert to adjust their remedies so as to grant the necessary relief.® And it is also well settled that where legal rights have been invaded, and a federal statute provides for a general right to sue for such invasion, federal courts may use any available remedy to make good the wrong done. Whether the peti tioners are entitled to recover depends upon an interpretation of 28 TJ. S. C. § 41 (1) and on a determination of the scope of the Fourth and Fifth Amendments' protection from unreasonable searches and deprivations of liberty without due process of law. Thus, the right of the petitioners to recover under their complaint will be sustained if the Constitution and laws of the United States are given one construction and will be defeated if they are given another. For this reason the District Court has jurisdiction. Gully v. First National Bank, 299 U. S. 109, 112-113; Smith v. Kansas City Title Co., 255 U. S. 180, 199-200.
Reversed.
Mr. Justice Reed joins in the opinion and the result. He desires to add to the cases cited in note 7, Barron v. Baltimore, 7 Pet. 243, and Burdeau v. McDowell, 256 U. S. 465, 475.
Mr. Justice Jackson took no part in the consideration or decision of this case.
The complaint stated in part:
"That on or about the 17th day of December, 1942, defendant R. B. Hood and each of the other defendants, unlawfully conspired with each other to act beyond their authority as said Federal Bureau of Investigation agents and police officer respectively, and agreed that they would abridge the Constitutional rights of the plaintiffs as guaranteed by the Fourth and Fifth Amendments to the Constitution of the United States to be free from the deprivation of liberty and property without due process of law, and to be free from unreasonable searches and seizures, and agreed unlawfully to simultaneously, in the early morning of December 18th, 1942, search the homes of. the individual plaintiffs herein without any warrants of search or seizure, and unlawfully to seize the papers, documents and effects of said plaintiffs and of 'Mankind United/ and falsely to imprison the individual plaintiffs by unlawfully arresting some of the individual plaintiffs without a warrant of arrest and unreasonably to delay the taking of all of the individual plaintiffs before a committing officer, in order to effectuate the unlawful searches and seizures aforesaid.
"That thereafter, and on the 18th day of December, 1942, . . . the defendants and each of them, in order to carry out the terms and conditions of the illegal conspiracy aforesaid, and solely for the purpose of carrying out said terms and conditions, did arrest and imprison the individual plaintiffs herein, and did search the homes of said plaintiffs, and seize and carry away books, papers and effects of said individual plaintiffs and of said 'Mankind United.' "
". . . by reason of the deprivation of . . . [their] Constitutional rights '. . . [plaintiffs had] suffered damages."
For other cases discussing the distinction between questions going to the merits and those going to the jurisdiction, see the following: Illinois Central R. Co. v. Adams, 180 U. S. 28; Geneva Furniture Co. v. Karpen, 238 U. S. 254; and see Nashville, C. & St. L. R. Co. v. Taylor, 86 F. 168.
Wiley v. Sinkler, supra; Swafford v. Templeton, supra. See also Brickhouse v. Brooks, 165 F. 534, 543, in which a similar suit was held to be within the jurisdiction of the federal court.
Philadelphia Co. v. Stimson, 223 U. S. 605; Hays v. Seattle, 251 U. S. 233; Pennoyer v. McConnaughy, 140 U. S. 1; City Railway Co. v. Citizens' Railroad Co., 166 U. S. 557; City of Mitchell v. Dakota Telephone Co., 246 U. S. 396, 407.
Chicago, B. & Q. R. Co. v. Chicago, 166 U. S. 226; see also Ex parte Virginia, 100 U. S. 339, 346, 347.
Marbury v. Madison, 1 Cranch 137, 162, 163; Texas & N. O. R. Co. v. Brotherhood of Clerks, 281 U. S. 548, 569, 570.
See e. g. Dooley v. United States, 182 U. S. 222, and cases cited and discussed at 228-230; Board of Comm'rs v. United States, 308 U. S. 343, 349-350.