Mr. Justice Bean
delivered the opinion of the court.
This action was commenced in the Circuit Court for Umatilla County by Koshland, a citizen and resident of California, against a fire insurance corporation organized and existing under the laws of the State of Connecticut, doing business in Oregon, to recover the sum of $4,885 for the loss by fire of certain property covered by policy of insurance issued by the defendant. After service of process, and within the time required to answer, the defendant appeared and filed a petition and bond for the removal of the cause to the Circuit Court of the United States for the District of Oregon on the ground of diversity of citizenship; but the court denied the petition and proceeded with the trial, resulting in a judgment for plaintiff. Th¿ defendant appeals, assigning as error, among other things, the refusal of the trial court to allow the petition for removal. The consideration of this question naturally takes precedence over the other assignments of error, because if, when the petition and bond had *208been filed, a sufficient caus« for removal to the federal court was shown on the face of the record, the jurisdiction of the state court was at an end, and all subsequent proceedings therein were comm non judice and void; and the defendant lost none of its rights by remaining in that court and contesting the case on its merits: Railroad Company v. Koontz, 104 U. S. 5. The question of removal is a federal one, and the courts of the United States have repeatedly held that while a state court is not bound to surrender its jurisdiction on a petition for removal until a case is made out which on its fhce shows that the petitioner is entitled thereto, when the fact does appear its jurisdiction absolutely ceases, and that of the Circuit Court of the United States immediately attaches, and that all issues of fact made upon the petition for removal must be tried in the federal court. All the state court has a right to determine for itself is whether, on the face of the record, as a matter of law, the petitioner is entitled to a transfer; and an adverse determination involves the risk of having all its subsequent proceedings rendered of no avail if, on appeal or writ of error, it shall be determined that the record on its face shows that when the petition was filed it should have given up its jurisdiction: Stone v. South Carolina, 117 U. S. 430 (6 Sup. Ct. 799).
The petition for removal in the case in hand avers that the plaintiff was at the time of the commencement of the action, and still is, a citizen of the State of Oregon; and while, as we have said, it was not open to the plaintiff to raise an issue on the question for trial in the state court, it was nevertheless admitted *209on the hearing that the averment in the petition to that effect was not true, but that in fact the plaintiff was and is a resident and citizen of the State of California, and such admission was made a part of the record in the case; so that the question for decision is whether an action pending in the state court between citizens of different states can be removed by the defendant to the Circuit Court of the United States for the district in which the state court is held, when neither of the parties to the action are residents or inhabitants of such district. By section 1 of the act of congress of March 3, 18,87, to determine the jurisdic-. tion of circuit courts of the United States, and to regulate the removal of causes from state courts (24 U. S. Stat. 552), as amended and corrected by the act of August 13, 1888 (25 U. S. Stat. 433), the circuit courts of the United States are given original cognizance, concurrent with the state courts, of suits of a civil nature, at common law or in equity, when the matter in dispute exceeds, exclusive of interest and costs, the sum or value of $2,000, in the following cases: (1) Those arising under the constitution or laws of the United States, or treaties made or which shall be made under their authority; (2) those in which the United States are plaintiffs or petitioners; (3) those in which there is a controversy between citizens of different states; (4) those in which there is a controversy between citizens of the same state claiming under grants of different states; and (5) those in which there is a controversy between citizens of a state and foreign states, citizens or subjects. The section then provides that “no civil suit shall be brought before either of said *210courts against any person by any original process or proceeding in any other district than that whereof he is an inhabitant, but where the jurisdiction is founded only on the fact that the action is between citizens of different states, suits shall be brought only in the district of the residence of either the plaintiff or the defendant.” Section 2 of the act, after declaring that any suit of a civil nature arising under the constitution or laws of the United States, or treaties made or which shall be made under their authority, of which the courts of the United States are given original jurisdiction by the "first section, may be removed by the defendant to the Circuit Court of the United States for the proper district, further provides that “any other suit of a civil nature, at law or in equity, of which the circuit courts of the United States are given jurisdiction by the preceding section, and which are now pending, or which may hereafter be brought, in any state court, .may be removed into the Circuit Court of the United States for the proper district by the defendant or defendants therein, being nonresidents of that state.”
It is familiar law that under the federal decisions a corporation is, for jurisdictional purposes, a citizen of the state in which it is organized, and therefore, as the plaintiff is a citizen and resident of the State of California, and the defendant of the State of Connecticut, the present action is admittedly a controversy between citizens of different states, and within the provisions of section 2, just quoted, if it be one “of which the circuit courts of the United States are given jurisdiction by the preceding section.” The conten*211tion for the plaintiff is that it is not a controversy of that character, because neither of the parties to the action are citizens or residents of the district of Oregon. But this contention confuses the question of jurisdiction with the place of bringing the suit. The first section of the act of 1887 not only defines the class of cases of which the federal courts are given jurisdiction, but also provides the district in which such suit shall be brought by original process. The clause restricting the place of trial does not affect the question of federal cognizance in any way, and in interpreting the statute it is important not to confuse these two provisions. The one is the personal privilege of the defendant, and for his benefit, and therefore may be waived by him; but the other affects the jurisdiction of the court, and, of course, cannot be waived. By the act in question the jurisdiction of the federal courts depends upon the subject matter of the controversy, or the citizenship of the parties, and not upon the place of trial. When the facts exist upon which the jurisdiction is grounded, any circuit court of the United States may, by consent of the parties, hear and determine the controversy between them. The defendant, however, has a right to insist that the notion shall be brought only in the district in which he is an inhabitant when it is not founded upon diverse citizenship, and in a district of the residence of either himself or the plaintiff when it is. But this provision is for his benefit, and does not limit the general jurisdiction of the courts of the United States over the subject matter of the controversy, but only of the person. From the summary already given of the *212first section of the act, it clearly appears that the circuit courts of the United States are given jurisdiction of suits of a civil nature, “ in -which there shall be a controversy between citizens of different states,” in which the matter in dispute exceeds, exclusive of interest and costs, the sum of $2,000, and this jurisdiction is conferred without any other limitation or restriction whatever. Under this provision it is of no consequence, so far as the mere jurisdiction over the matter in dispute is concerned, whether either of the parties reside in the particular district where the suit is pending or not. It is sufficient for that purpose if they are citizens of different states. The jurisdiction depends upon the' fact of diverse citizenship, and not the place of trial. If in fact the parties are citizens of different states, any circuit court of the United States has the right to hear and determine the controversy, if it can obtain jurisdiction of the person.
It is argued, however, that because the section provides, when jurisdiction is founded on the fact of diverse citizenship, that “ suits shall be brought only in the district of the residence of either the plaintiff or defendant,” no other circuit court of the United States can acquire or exercise jurisdiction of the controversy, even by consent of the defendant. But this provision as to the place of trial is not alone peculiar to the Removal Act of 1887, but is to be found, in substance, in nearly if not quite all the former acts of congress upon the subject; and it has never been regarded as affecting the jurisdiction, in any such sense that it could not be waived by the defendant. It has always been considered as a personal privilege of the *213defendant, which, he could insist upon or not as he might choose. If an action within the general jurisdiction of the federal courts was brought against him in any of such courts, and he chose voluntarily to appear, it has repeatedly been held that the court has jurisdiction to proceed to judgment against him. In Ex parte Schollenberger, 96 U. S. 369, Mr. Chief Justice Waite, in referring to the question, says: “The act of congress prescribing the place where a person may be sued is not one affecting the general jurisdiction of courts. It is rather in the nature of a personal exemption in favor of the defendant, and is one which he may waive. If the citizenship of the parties is sufficient, a defendant may consent to be sued any where he pleases, and certainly jurisdiction will not be ousted because he has consented.” Indeed, such is the construction given the statutory provision now under consideration by the Supreme Court of the United States. The question was before that court in St. Louis Railway Company v. McBride, 141 U. S. 127 (11 Sup. Ct. 982); and Mr. Justice Brewer, after commenting upon the previous decisions of the court, concludes his opinion by saying: “Without multiplying authorities on this question, it is obvious that the party who in the first instance appears and pleads to the merits waives any right to challenge thereafter the jurisdiction of the court on the ground that the suit has been brought in the wrong district.” This case was cited with approval in the later case of Mexican National Railroad Company v. Davidson, 157 U. S. 201 (15 Sup. Ct. 563).
We take it, therefore, that the provisions of the act *214of 1887, requiring the suit to be brought in the district where either the plaintiff or defendant resides, when the jurisdiction depends upon diverse citizenship alone, is merely a restriction with regard to the court in which the suit must be brought, and not upon the general jurisdiction .of the federal courts over such controversies; and hence a suit in which there is a controversy between citizens of different states, where the matter in dispute exceeds the limit prescribed, is a suit “of which the circuit courts of the United States are given original jurisdiction” by the first section of the Removal Act of March 3, 1887, and, if brought in a state court, may be removed by the defendant (being a nonresident of the state) to the Circuit Court of the United States of the district in which the state court is held, although neither of the parties to the action are residents or inhabitants of such districts. The great majority of, and, indeed, all, the later decisions of the federal courts upon this question, support this view: Fales v. Chicago and Milwaukee Railway Company, 32 Fed. 673; Vinal v. Continental Improvement Company, 34 Fed. 228; Tiffany v. Wilce, 34 Fed. 230; Wilson v. Western Union Telegraph Company, 34 Fed. 561; Gavin v. Vance, 33 Fed. 84; Short v. Chicago and Milwaukee Railway, 33 Fed. 114; Loomis v. New York Coal Company, 33 Fed. 353; Kansas City Railroad Company v. Interstate Lumber Company, 37 Fed. 3; First National Bank v. Merchants’ Bank, 37 Fed. 657; Burck v. Taylor, 39 Fed. 581; Amsinck v. Balderston, 41 Fed. 641.
It is true, a different construction was given the act by the Circuit Court of the United States for the *215Northern District of California in Yuba County v. Pioneer Cold Mining Company, 32 Fed. 183, Judges Field, Sawyer, and Sabin sitting; but this case was expressly overruled by Mr. Justice Field in Wilson v. Western Union Telegraph Company, 34 Fed. 561, both Judges Sawyer and Sabin concurring in the opinion. So, too, the case of Harold v. Iron Silver Mining Company, 33 Fed. 529, was subsequently overruled in Kansas City Railway Company v. Interstate Lumber Company, 37 Fed. 3, in which it was distinctly held that an action pending in a state court between citizens of different states may be removed by the defendant to the federal court, although neither party is a resident of the district. In the opinion in that case Mr. Justice Brewer says that: “Any suit is removable of which any federal circuit court might take jurisdiction, and the mere fact that the defendant could have successfully objected to being sued in any one or more particular federal courts does not destroy the general jurisdiction of federal courts, or prevent its removal. Take the case at bar. If the suit had been commenced in this court, and process served personally upon the defendant, and it had raised »o question other than upon the merits of the controversy, this court would have had undoubted jurisdiction, and the judgment it rendered would have been valid. If the jurisdiction of the court upon his failure to insist upon his personal privilege be conceded in the one case, why should there be doubt of the jurisdiction when he voluntarily seeks the court?” The same construction has been given the Removal Act of 1887 by the supreme courts of Massachusetts and Maine: American *216Finance Company v. Bostwick, 151 Mass. 19 (23 N. E. 656); Craven v. Turner, 82 Me. 383 (19 Atl. 864).
The case of Mexican National Railroad Company v. Davidson, 157 U. S. 201 (15 Sup. Ct. 563), upon which the court below seems to have based its ruling, was an action brought in a state court of New York by a citizen of that state against a Colorado corporation upon a chose in action assigned to the plaintiff by another citizen of Colorado, and subsequently removed into the federal court by the defendant, and is clearly not in point. The court simply held that the action was not removable because the federal court did not have jurisdiction of the subject matter, and consent could not confer such jurisdiction. The act of 1887, in the latter clause of section 1, provides that no circuit or district court of the United States shall “ have cognizance of any suit, except upon foreign bills of exchange, to recover the contents of * * * any chose in action in favor of any assignee * * * unless such suit might have been prosecuted in such court * * * if no assignment or transfer had been made.” By this provision of the statute the federal courts are expressly prohibited from exercising jurisdiction in an action to recover on a chose in action, except foreign bills of exchange, by an assignee thereof, unless the suit could have been so maintained by the original holder; and hence the case referred to, being of this class, was not one of which the circuit courts of the United States are given original jurisdiction by the first section of the act in question, and of course they could not acquire such jurisdiction by removal from the state court. But in the case at hand the jurisdic*217-tion of the federal court is founded upon diversity of citizenship alone, and not upon the subject matter of the controversy; and in such case Mr. Chief Justice Fuller, says, in his opinion in Mexican National Railroad Company v. Davidson, 157 U. S. 201 (15 Sup. Ct. 563), that the provision of section 1 of the act of 1887, requiring such an action to be brought only in the district of the residence of the plaintiff or defendant, is a personal privilege of the defendant, and may be waived by him, and that section 2, providing for the removal of causes from the state to the federal court, “ refers to the first part of section 1, by which jurisdiction is conferred, and not to the clause relating to the district in which suit may be brought.” In view of these remarks, the portion of the opinion relied upon by the court below, that the jurisdiction of the circuit courts on removal by the defendant is limited to such suits as might have been brought in that court by the plaintiff under the first section of the act of 1887, must evidently refer to the portion of the first section dealing with jurisdiction, and not to the provision thereof in reference to the place of trial. In other words, unless the plaintiff could have brought the action in a federal court in the first instance, jurisdiction could not be conferred upon a circuit court of the United States by removal from a state court. We conclude, therefore, that the case is one properly removable to the federal court.
In Southern Pacific Company v. Denton, 146 U. S. 202 (13 Sup. Ct. 44), it was held that a corporation organized and existing under the laws of the State of Kentucky was not a resident of the Western District *218tion created and existing under and by virtue of the laws of the State of Connecticut; and the petition alleges that it “was at the time of the commencement of this action, and still is, a citizen of the State oí Connecticut, and of no other state, and has its principal office and place of business in the City of Hartford, in said State of Connecticut.” This has been held sufficient by the federal courts: Shattuck v. North British Insurance Company, 7 C. C. A. 386, 58 Fed. 609; Wilcox Guano Company v. Phœnix Insurance Company, 60 Fed. 929. “A corporation created by the laws of a foreign country,” says Mr. Justice Caldwell. in Shattuck v. North British Insurance Company, “does, not become a citizen or resident of a state of this-Union by merely opening an office in the state and transacting business there; and a petition for removal which shows that the defendant is a corporation chartered by the laws of another' state or a foreign country does not have to allege negatively that it is not a citizen or resident of the state in which suit is brought against it, because, in legal contemplation, its residence and citizenship can only be in the state or country by the laws of which it was created, although it may have an office and do business in other states whose laws permit it.” Under the decisions of the United States courts a corporation is, for the purpose of jurisdiction, conclusively presumed to be a citizen and resident of the state of its creation, and cannot migrate to or become a resident or inhabitant of another state, although it may by its agents engage in business therein, and, as a condition precedent to its right to do so, be required to comply with certain *219or agent engaged in its business within the state. It did not undertake to declare the corporation to be a citizen of the state, nor (except by the vain attempt to prevent removals into the national courts) to alter the jurisdiction of any court as defined by law. ' The agreement, if valid, might subject the corporation, after due service on its agent, to the jurisdiction of any appropriate court of the state. It might likewise have subjected the corporation to the jurisdiction of a circuit court of the United States held within the state, so long as the judiciary acts of the United States allowed it to be sued in the district in which it was found. But such an agreement could not, since congress (as held in Shaw v. Quincy Mining Company, 145 U. S. 444, 12 Sup. Ct. 935) has made citizenship of the state, with residence in the district, the sole test of jurisdiction in this class of cases, estop the corporation to set up noncompliance with that test when sued in a circuit court of the United States.”
But it is claimed on behalf of plaintiff that the petition for removal is insufficient, because it does not allege that the defendant is a. nonresident of the state. The complaint avers that the defendant is a corporation created and existing under and by virtue of the laws of the State of Connecticut; and the petition alleges that it “was at the time of the commencement of this action, and still is, a citizen of the State of Connecticut, and of no other state, and has its principal office and place of business in the City of Hartford, in said State of Connecticut.” This has been held sufficient by the federal courts: Shattuck v. North British Insurance Company, 7 C. C. A. 386, 58 Fed. *220corporation, as a condition precedent to obtaining a permit to do business within the state, to surrender a right and privilege secured to it by the constitution and laws of the United States, was unconstitutional and void, and could give no validity or effect to any agreement or action of the corporation in obedience to its provisions: Insurance Company v. Morse, 87 U. S. (20 Wall.), 445; Barron v. Burnside, 121 U. S. 186 (7 Sup. Ct. 931); Texas Mortgage Company v. Worsham, 76 Tex. 556 (13 S. W. 384). Moreover, the supposed agreement of the corporation went no further than to stipulate that process might be served on any officer or agent engaged in its business within the state. It did not undertake to declare the corporation to be a citizen of the state, nor (except by the vain attempt to prevent removals into the national courts) to alter the jurisdiction of any court as defined by law. The agreement, if valid, might subject the corporation, after due service on its agent, to the jurisdiction of any appropriate court of the state. It might likewise have subjected the corporation to the jurisdiction of a circuit court of the United States held within the state, so long as the judiciary acts of the United States allowed it to be sued in the district in which it was' found. But such an agreement could not, since congress (as held in Shaw v. Quincy Mining Company, 145 U. S. 444, 12 Sup. Ct. 935) has made citizenship of the state, with residence in the district, the sole test of jurisdiction in this class of cases, estop the corporation to set up noncompliance with that test when sued in a circuit court of the United States.”
And in Re Hohorst, 150 U. S. 662 (14 Sup. Ct. 221), *221it is said by the same learned justice “that, within the meaning of the judiciary acts, a corporation cannot be considered a citizen and inhabitant, or a resident, of a state in which it has not been incorporated, and that under the act of 1888 (March 3, 1887), a corporation incorporated in one of the United States, and in that state only, cannot be compelled to answer in another state, in which it has a usual place of business, and of which the plaintiff is not a citizen.” In Martin’s Administrator v. Baltimore and Ohio Railroad Company, 151 U. S. 673 (14 Sup. Ct. 533), the right of a corporation organized in one state, and doing business in another by the express license and authority of the legislative power thereof, to remove an action brought against it in the latter state by a citizen thereof, on the ground that it was a nonresident of the state, within the meaning of the act of March 3,1887, was involved; and the court held that under the provisions of that act a defendant corporation must be created by the laws of another state only in order to entitle it to remove an action brought against it by a citizen of the state in which it was doing business, but that if it is such a corporation, and has not been also created a corporation by the laws of the state in which the action is brought, it may remove the action to a federal court, even if it has been licensed by the laws of the state to act within its territory, and is therefore subject to be sued in its courts. And this case we regard as conclusive upon the question made by the plaintiff, that the defendant insurance company, by complying with the laws of this state in reference to such companies doing business here, became a resident of the *222state, and therefore not entitled to remove an action brought against it in one of the state courts to the federal court. It follows that the court below was in error in refusing to surrender jurisdiction of the cause, and that its judgment must be reversed, and the case remanded, with directions to proceed no further in the matter unless its jurisdiction shall hereafter be restored.
Reversed.