
    WASHINGTON & IDAHO RAILROAD COMPANY v. CŒUR D’ALENE RAILWAY AND NAVIGATION COMPANY.
    ERROR TO THE OIROUIT COURT OF APPEALS FOR THE NINTH CIRCUIT.
    No. 585.
    Argued November 13, 14, 1895.
    Decided December 2, 1895.
    An action commenced May 27, 1889, in the District Court of the Territory of Idaho, before the admission of Idaho as a State, by a corporation organized under the laws of Washington Territory, against a corporation organized under the laws of Montana Territory, and against a railroad company organized under the laws • of the United States, upon which latter company service had been made and filed, was, after the admission of Idaho as a State, removable to the Circuit Court of the United States for that circuit both upon the ground of diversity of citizenship of the territorial corporations, and upon the ground that the railroad company was incorporated under a law of the United States; and, so far as the latter ground of removal is concerned, it is not affected by the fact that the railroad company afterwards ceased to take an active part in the case, as the jurisdictional question must be determined by the record at the time of the transfer.
    The provision in the act of March 3, 1875, c. 152,18 Stat. 482, granting the right of way through the public lands of the United States to any railroad duly organized under the- laws of any State or Territory, which shall have filed with the Secretary of the Interior a copy of its articles of incorporation and due proofs of its organization under the same, plainly means that no corporation can acquire a right of wayupon a line not described in. its charter, or articles of incorporation.
    When a court of law is construing an instrument, whether a public law or •a private contract, it is legitimate, if two constructions are fairly possible, to-adopt that one which equity would favor.
    ■ On May 15, 1889, the Washington and Idaho Bailroad Company, describing itself as a corporation duly organized under the laws of Washington Territory, brought an action of ejectment in the District Court of the First Judicial District of the Territory of Idaho against the Coeur d’Alene Bailway and Navigation Company; as a corporation duly organized under the laws of Montana Territory and the Northern Pacific Bailroad Company, as a corporation duly organized under the laws of the United States. The complainant alleged that, on the 10th day of July, 1887, the plaintiff was lawfully possessed, as owner in fee simple, of a certain tract of land situated in Shoshone County, Idaho Territory, being the right of way of plaintiff’s railroad, consisting of a strip off land two hundred feet in width and about four thousand feet in length; that the defendant, the Cceur d’Alene Bailway and Navigation Company, on the 1st "day of August, 1887, entered into possession of the demanded premises,, and ousted and ejected the plaintiff therefrom; that the defendant, the Northern Pacific Bailroad Company, claimed to be in possession of said premises as a tenant of the Coeur d’Alene-Bail way and Navigation Company, and was actually in the possession of said premises at the time of the institution of the suit; that the value of the rents, issues, and profits of the said premises while the plaintiff was excluded therefrom is five thousand dollars; that the plaintiff was still the owner in fee simple and entitled to the possession of said premises; and plaintiff demanded judgment against the said defendants for .the possession of the demanded premises, and for the sum of six thousand dollars as damages.
    A writ of summons against the' defendants- was sued out and, on the 27th day of May, 1889, Was returned as served on the said defendants, by the delivery of a copy thereof to their authorized agent. On May 31, 1889, the separate answer of the Coeur d’Alene Railway and Navigation Company was filed, denying the plaintiff’s title, and claiming that defendant had, in good faith, and without any knowledge that the plaintiff claimed any interest therein,- entered into possession of the described land and, in the belief that it was the owner thereof, had constructed thereon its railroad and its depot, at an expense exceeding seven thousand dollars; that the plaintiff knew that the defendant was constructing its railroad and depot as aforesaid, and permitted the same to be done without making any claim to said premises, wherefore defendant claimed judgment that the plaintiff should take nothing- by the action; that the' plaintiff should be declared to be estopped from claiming title to said premises; and that the defendant should have such other and further relief as should be just and equitable.
    On the 3d day of July, 1890, by virtue of an act of Congress of that date, the said Territory of Idaho became a State; and on August 27, 1890, the defendants filed a petition in the District Court of the First Judicial District of the State of Idaho, praying for the removal of said case to the Circuit Court of the United States, Ninth Circuit, in and for the District of Idaho; and the case was so proceeded in that, on December 6, 1892, a final judgment was entered, adjudging that the plaintiff, the Washington and Idaho Railroad Company, should take nothing by the action, and that-the defendant, the Coeur d’Alene Railway and Navigation Company, should have, judgment against the said plaintiff for its costs. • .
    The trial .in the Circuit Court was by the court, a jury having been waived by both parties. The court made the following findings of facts:
    “First. That on the 6th day of July, 1886, the defendant, the Coeur d’Alene Railway and Navigation Company, filed its articles of incorporation in the office of the secretary of the Territory (now State) of Montana, and also filed in the office of the county clerk and recorder of the county of Lewis and Clarke, in said Territory, a certified copy of its said articles of incorporation, which articles of incorporation are, in words and. figures, following, to wit:
    
      ss: “ ‘ Territory of Montana, ) County of Lewis and Clarke, Í
    “‘¥e, Daniel C. Corbin, Samuel T. Hauser, Anton H. Holier, of the city of Helena, in the county of Lewis and Clarke, Territory of Montana; Stephen S. (Hidden, of Spokane Falls, Washington Territory; James F. Wardner, of Wardner, in the Territory of Idaho; James Monaghan, of Coeur d’Alene, Idaho Territory; and Alfred M. Esler, of said Helena, Montana, do by these presents, pursuant to and in conformity with article 3 of chapter 15 of the Revised Statutes of Montana, entitled “ railroad corporations,” and all acts supplemental thereto or amendatory thereof, associate ourselves together and form a corporation for the purpose of locating, constructing, maintaining, and operating railroads in the Territories of Montana and Idaho, and to that end we do hereby certify as follows:
    “ ‘ First. The name of such corporation by which it shall be known shall be “ The Cceur d’Alene Railway and Navigation Company.”
    “ ‘ Second. The termini of said railroad are to be located in the county of Missoula, Territory of Montana, and in the counties of Kootenai and Shoshone, in the Territory of Idaho, and, if said corporation shall so determine, termini may also be located in the county of Nez Perces, in said Territory of Idaho; said railroad shall pass through said counties of Missoula, Kootenai, and Shoshone, and if said corporation shall so determine, then said railroad shall also pass through said county of Nez Perces, and the general route of said railroad shall be as follows : Commencing at or near the town of Thompson’s Falls, in said county of Missoula, or at some convenient point between said Thompson’s Falls and the western boundary line of said Territory of Montana; thence running westerly or southwesterly to that certain tributary of Coeur d’Alene River known as the South Fork; thence down the South Fork and Coeur d’Alene River to Old Mission, connecting with steamboats or-other- water craft, to be owned and operated by said corporation, said steamboats or other craft to ply between said Old Mission and the town of Coeur d’Alene; and, if said corporation shall so determine, then said railroad shall again commence at said town of Coeur d’Alene, and run northwesterly to Rathdrum, in said county of Kootenai, or such point on the line of the Northern Pacific railroad between Rathdrum and the western boundary of Idaho Territory as said corporation may hereafter determine,, with the right and privilege, if said corporation shall see proper, to run a branch or extension of said road in a southerly direction from said Shoshone County to the said county of Nez Perces; said steamboats or other water craft between the points in that behalf above specified' to be used in connection with and as constituting a part of said railroad.
    
      “ Third. The amount of capital stock necessary to construct such roads, including said connections, is five hundred thousand dollars, divided into five thousand shares of one hundred dollars each.
    “ ‘ Fourth. The principal place of business of said corporation in the Territory of Montana shall be at Helena, in the county of Lewis and Clarke,'and principal, place of business of said corporation in the Territory of Idaho shall, until otherwise fixed by the board of directors of said corporation, be at Coeur d’Alene, in the said county of Kootenai.’
    “ Second. That the line of route of the railroad of the-said Coeur d’Alene Railway and Navigation Company, as described in said article of incorporation, passes over and includes the ground in controversy in this action.,
    “Third. That on the 20th day of July, 1886, the defendant, the Coeur d’Alene Railway and Navigation Company, filed in the office of the Secretary of the Interior, at Washington, D. C., a certified copy of its said articles of incorporation, and proofs of its organization, under the laws of the Territory (now State) of Montana, which certified copy of articles of -incorporation and proofs of organization ■ were duly approved on that day by the honorable Secretary of the Interior. '
    “Fourth. That in the summer and fall of 1886 the defendant, the Coeur d’Alene Eailway and Navigation Company, constructed its railroad over said line of route as described in said, articles of incorporation, from the said Old Mission up the main Coeur d’Alene Eiver to the town of Kingston, and thence up the South Fork of the Coeur d’Alene Eiver to the town of Wardner Junction, a distance of about fourteen miles; and that in the month of October, 1886, the said defendant, the Coeur d’Alene Eailway and Navigation Company, for the purpose of extending its line of railroad, caused a survey to be made for its said line of railroad from said Wardner Junction, -up the said fork of the Coeur d’Alene Eiver, over the line described in its said articles of incorporation, through the towns of Wallace and Mullen, and marked the centre line of said road upon the ground by planting stakes at each station at one hundred feet, and at such other points as there were angles in the line, so that the line of route of said road could be readily traced upon the ground, and that the said surveying and marking of said line was completed on the 31st day of October, 1886. That in making said survey the engineers of said Coeur d’Alene Eailway and Navigation Company ran three lines through said town of Wallace, called lines £A,’ ‘ B,’ and ‘ C,’ said lines ‘ A ’ and £ B ’ both being on the south side of the South Fork of the Coeur d’Alene Eiver, and the said line £ O ’ being on the north side of said river, and being the line upon which the railroad of the Coeur d’Alene Railway and Navigation Company was afterwards constructed, and upon the ground now in controversy in this action. That in the month October, 1886, and about one week after the commencement of the said survey by the engineers of the said Coeur d’Alene. Eailway and Navigation Company, W. H. Burrage, an engineer, with a party of assistants claiming to be acting for the plaintiff, commenced surveying a line of route .for a railroad from near the town of Wardner, up the South Fork of the Coeur d’Alene Eiver, to' the said town of Mullen, and that, in making said survey, the said Burrage and the party assisting him were several days and several miles behind the engineers surveying for the defendant, the Coeur d’Alene Eailway and Navigation Company; and that in surveying their line through the town of Wallace, said Burrage surveyed the same on the north side of said river and over the ground in controversy ; and that said Burrage and party also marked their line in a similar manner to what the engineers of the Coeur d’Alene Railway and Navigation Company had done, and that said Burrage and party completed their survey on the 5th day of November, 1886, and that said portion of said line run by said Burrage over the ground in controversy was run on the 28th day of October, 1886, and that said line £ C ’ run by the engineers of the said Coeur d’Alene Railway and Navigation Company over the land in controversy was run on the 29th day of October, 1886; and that all of the parts of the line of the Coeur d’Alene Railway and Navigation Company, except said line £ C,’ were run and marked prior to the line run by the said Burrage, said line £ C ’ being run by the engineers of the Coeur d’Alene Railway and Navigation Company as an amendment after they had completed the survey to the town of Mullen.
    “ Fifth. That in the summer and fall of 1887 the defendant, the Coeur d’Alene Railway and Navigation Company, extended its road from the town of Wardner Junction over its line of survey, a point about one mile east of the town of Wallace, and over said line C,’ the ground in controversy in this action, through the town of Wallace; and at all times thereafter, up to and at the time of the commencement of this action, occupied and used the same as a railroad and for railroad purposes; and at the time of the commencement of this action had its roadbed and track, and side tracks and depot thereon, and was using the same exclusively for railroad purposes.
    “ Sixth. That at all the times above mentioned the lands in controversy, and all other lands along the line of said railroad of the defendant, the Coeur d’Alene Railway and Navigation Company, as described in its articles of incorporation, were unsurveyed public lands of the United States.
    ££ Seventh. That on the 7th day of July, 1886, the articles of incorporation of the plaintiff, the Washington and Idaho Railroad Company, were filed in the office of the secretary of the Territory (now State) of Washington; that by said articles of incorporation so filed the plaintiff was authorized to construct a railroad from the town of Farmington, in Washington Territory, by the most practical route in general northerly direction, to a point at or near the town of Spokane Falls (now Spokane), in said Washington Territory, together with the following branch lines tributary -thereto: From a junction with the said main line at the forks of Hangman Creek, near Lone Pine, in- said Washington Territory, in a general northeastern direction, across the Coeur d’Alene Indian reservation, to a point near the mouth of St. Joseph’s Eiver on Cceur d’Alene Lake; thence in a northerly direction along the east side of Ccéur d’Alene Lake to the Coeur d’Alene Eiver; thence in a general easterly direction to Cceur d’Alene Eiver; thence in a general easterly direction to Coeur d’Alene mission; thence in a southeasterly direction, by the valley of the South Fork of the Coeur d’Alene Eiver to Wardner, in Idaho Territory. Second. From a junction with said main line, at or near the town of Spangle, in Washington Territory, in a generally northeasterly direction, to a point on Coeur d’Alene Lake, about five miles north of the mouth of the Coeur d’Alene Eiver, in said Idaho Territory, and to maintain and operate such railroads and telegraph lines and branches thereof, carry freight and passengers thereon, and receive tolls therefor.
    “Eighth. That the said line of railroad, as described' in the said articles of incorporation of the plaintiff, nor any of the branches thereof, did not cover or include the ground in controversy, or any part thereof, or of the valley of the South Fork of the Coeur d’Alene Eiver adjacent thereto; that the eastern terminus of the said branch of railroad running in the direction of the town of Wallace, as described in said articles, was at the town of Wardner, a distance of about fifteen miles westerly from, the town of Wallace and from the land in controversy herein.
    “ Ninth. That afterwards, to wit, on the 10th day of November, 1886, and after the completion of said survey by said Burrage, and the said survey by the engineers of the defendant, the Coeur d’Alene Eailway and Navigation Company, over the premises in controversy herein, the plaintiff filed in the office of the secretary of the Territory (now State) of Washington supplemental articles of incorporation, which supplemental articles of incorporation provided for a branch line of its railroad from the town of Milo (which is near Wardner), in Shoshone County, Idaho, following the South Fork of the Coeur d’Alene River to the town of Mullen, in said Territory, a distance of about twenty miles, which extension would pass over the premises in controversy.
    “Tenth. That on the 22d day of December, 1886, the plaintiff filed in the office of the Secretary of the Interior at Washington, D. C., a copy of its said articles of incorporation and a copy of the statute of the Territory of Washington under which the plaintiff’s incorporation was made and proof of its organization.
    “ Eleventh. That from the time of the making of the said survey by said Burrage over the land in controversy, on the 28th day of October, 1886, until long_ after the completion of the railroad, side tracks, and depot of the defendant, the Coeur d’Alene Railway and Navigation Company, upon the ground in controversy, neither the said Burrage nor the plaintiff, nor any person for them or either of them, ever made any other survey or did any other act upon the premises in controversy or took any possession thereof; and that the first act done by said Burrage or the plaintiff upon said premises thereafter was the survey made thereon in the year 1888 by the plaintiff ; and that at that time the railroad and the side track and depot of the defendant, the Coeur d’Alene Railway and Navigation Company, was fully constructed thereon, and had been so constructed, and thereon, since the fall of 1887, and the defendant, the Coeur d’Alene Railway and Navigation Company, was in full and complete operation and possession thereof and of the grounds in controversy herein.
    “ Twelfth. That the public surveys of the government were not extended over the land through which said surveys were made until in the month of July, 1891.
    “ Thirteenth. That on the 9th day of November, 1886, the defendant, the Coeur d’Alene Railway and Navigation Company, filed in the United States land office at Coeur d’Alene, Idaho, a map or profile of that portion of its railroad running through the town of- Wallace, which was approved by the Secretary of the Interior December 3, 1886, and that upon said map or profile said line ‘ B,’ through said town of Wallace, was platted as the line of route of said road; that line ‘ C ’ was in fact and intended to be a definite line of location thereof, but that said line ‘ B ’ was so platted by a mistake, and that said mistake was not discovered until after the completion of said railroad and side track and depot upon and over the ground in controversy herein, and that the filing of said plat, showing said road to run over said line ‘ B,’ was not done for the purpose of in any manner deceiving the plaintiff or any one else, but was done by a mistake as aforesaid, and that the plaintiff was not in any manner misled or prejudiced by the filing of said plat or by said mistake.”
    The case was taken, by a writ of error, to the Circuit Court of Appeals for the Ninth Circuit, where the judgment of the Circuit Court was, on February 12,1894, affirmed. 15 U. S. App. 359. On February 4, 1895, by a writ of error of that date, the case was brought to this court.
    
      Mr. A. A. Roehling, Jr., and Mr. Samuel Sheltabarger, (with whom were Mr. W W. Cotton and.. Mr. Jeremiah M. Wilson on the brief,) for plaintiff in error, said, upon the question of jurisdiction:
    ' I. The fact that the Northern Pacific Company united with the Coeur d’Alene Company in making the motion for the-removal of the case to the Circuit Court of the United -States did no’t make the Northern Pacific Company a party in the' case. Parrott v. Alabama Gold Life Ins. Co., 5 Fed. Rep. 391; Atchinson v. Morris, 11 Fed. Rep. 582; Miner v. Markham, 28 Fed. Rep. 387; Perkins v. Hendryx, 40 Fed. Rep. 657; Golden v. Morning News Co., 42 Fed. Rep. 112; Clews v. Woodstock Iron Co., 44 Fed. Rep. 31; Reifsnider v. American &c. Publishing Co., 45 Fed. Rep. 433; Bentlif v. London &c. Finance Corporation, 44 Fed. Rep. 667; Tollman v. Baltimore & Ohio Railroad, 45 Fed. Rep. 156.
    
      II. The United States Circuit Court for the District of Idaho had no jurisdiction to enter up judgment herein against the plaintiff in error and in favor of the defendant in error.
    Under the language of this act, the Federal courts created by the act became the successors of the territorial courts only in regard to the class of cases of which the Federal courts might have had jurisdiction had such courts been in existence at the time of the commencement of the action. Johnson v. Bunker Hill Mining Co., 46 Fed. Rep. 417; Back v. Sierra Nevada Mining Co., 46 Fed. Rep. 673; Strasburger v. Beecher, 44 Fed. Rep. 209.
    Two things are necessary to give a court of the United States jurisdiction over any particular action: First, the action itself must be within the jurisdiction of the court; and second, the jurisdictional facts must affirmatively appear in the record. It is not enough for the court to see from the evidence, or know as a matter of fact, that it has jurisdiction; but such jurisdiction must actually appear by suitable allegations in the pleadings or in the petition for removal, and unless such jurisdiction affirmatively appears, then it is the duty of the court to dismiss the action, although such jurisdiction may actually exist. Insurance Co. v. Pechner, 95 U. S. 183; Robertson v. Cease, 97 U. S. 646; Swan v. Manchester, Coldwater &c. Railway, 111 U. S. 379; Parker v. Ormsby, 141 U. S. 81, 83; Crehore v. Ohio & Mississippi Railway, 131 U. S. 240; Gold Washing Co. v. Keyes, 96 U. S. 199; Gibbs v. Crandall, 120 U. S. 105.
    The effect of § 18 of the Idaho enabling act was to confer jurisdiction on the state courts of all civil actions in which the United States was not a party, unless a proper written request showing the jurisdiction of the United States court was filed in the proper court, as required by the act. On familiar principles, such request for transfer, in order to oust the state court of jurisdiction and confer jurisdiction upon' the United States court, must necessarily show that the United States court might have had jurisdiction of the action had such court existed at the time of the commencement of such case, as well as jurisdiction at the time when the action was undertaken to be transferred. Johnson v. Bunker Hill Mining Co., 46 Fed. Rep. 417; Back v. Sierra Nevada Mining Co., 46 Fed. Rep. 673; Strasburger v. Beecher, 44 Fed. Rep. 209.
    Such request cannot be amended in the United States court; and a failure to properly allege therein the necessary jurisdictional facts is fatal to the jurisdiction of this court and of the court below. Crehore v. Ohio & Mississippi Railway, 131 U. S. 240; Stevens v. Nichols, 130 U. S. 230; Gold Washing Co. v. Keyes, 96 U. S. 199.
    The two grounds of jurisdiction suggested by the petition for removal, namely, diverse citizenship and the corporate character of the Northern Pacific Railroad Company, are the’ only grounds of jurisdiction anywhere hinted at throughout the entire record.
    Upon these grounds alone was the state court sought to be deprived of the jurisdiction conferred upon it over this action by the enabling act. Unless the jurisdictional facts above mentioned actually existed and are sufficiently stated, then no transfer took place, and the court below is without jurisdiction.
    III. The court below had no jurisdiction by reason of the Federal character of the Northern Pacific Company.
    Under the enabling act no action could be transferred unless “ pending ” at the time of the transfer. Glaspell v. Northern Pacific Railroad, 144 U. S. 211. This action was not pending against the Northern Pacific Company at the time of the admission of Idaho into the Union.
    The Federal charter to a corporation can only give rise to a Federal question when the corporation is an actual party to the suit, actively present, and actively engaged in the litigation. Pacific Removal Cases, 115 U. S. 1; Metcalf v. Watertown, 128 U. S. 586. It is only when an act of Congress is directly brought into consideration in an action that the cause can be said to arise under such act. Gold Washing Company v. Keyes, 96 U. S. 199; Gibbs v. Crandall, 120 U. S. 105; Shreveport v. Coe, 129 U. S. 36, 41.
    Jurisdiction will not be entertained in an action, even where the petition for removal states a clear Federal question, if the. party at the time of filing such petition enters a special appearance for the purpose of setting aside the service of summons made in the state court. Germania Ins. Co. v. Wisconsin, 119 U. S. 473.
    The only Federal question alleged in the petition for removal, or shown by the pleadings, was that suggested by the incorporation of the Northern Pacific Company; and when it appeared that that company never appeared, and that no service was made' oh it, that question disappeared.
    IY. Diverse citizenship furnishes no ground for jurisdiction. A corporation is a citizen, resident, and inhabitant of the State or Territory which creates it, and cannot become such in another State or Territory, by doing business in it. Shaw v. Quincy Miming Co., 145 U. S. 444; Southern Pacific Co. v. Denton, 146 U. S. 202.
    At the time of the commencement of this action, the Washington and Idaho Railroad Company was therefore a resident, citizen, and inhabitant of the Territory of Washington, and the Coeur d’Alene Railway and Navigation Company was a resident, citizen, and inhabitant of the Territory of Montana; and no suit either by or against either of such corporations could have been removed, transferred, or commenced in a Federal court on the ground of diverse citizenship. New Orleans v. Winter, 1 Wheaton, 91; Railway Company v. Swan, 111 U. S. 381; Johnson v. Bunker Hill &c. Co., 46 Fed. Rep. 417; Back v. Sierra Nevada Mining Co., 46 Fed. Rep. 673; Strasburger v. Beecher, 44 Fed. Rep. 209.
    Y. The record in this action nowhere shows jurisdiction in the Circuit Court for the District of Idaho.
    Jurisdiction must affirmatively appear in the record. Parker v. Ormsby, 141 U. S. 81, 83; Gold Washing Co. v. Keyes, 96 U. S. 199. Such jurisdiction must not only affirmatively appear to exist at the time of the admission of Idaho into the Union as a State, but also must be shown aflfirinatively to have existed at the time the action was- commenced. This is plainly required by the language of the act. Strasburger v. Beecher, 44 Fed. Rep. 209; Back v. Sierra Nevada Mining Co., 46 Fed. Rep. 673.
    
      Here no Federal question is alleged with sufficient accuracy in the petition or elsewheré in the record, to have authorized the court below to have entertained jurisdiction of this action. Gold Washing Company v. Keyes, 96 U. S. 199; Gibbs v. Crandall, 120 U. S. 105, 109; Theurhauf v. Ireland, 27 Fed. Rep. 769; Austin v. Gagan, 39 Fed. Rep. 626.
    
      Mr. A. JB. Browne, (with whom was Mr. A. T. Britton on the brief,) for defendants in error.
   Me. Justice Shiras,

after stating the case, delivered the opinion of the court.

We are to answer the questions that arise on this record in the light of the findings of fact made by the Circuit Court to which no exceptions'were taken.

Those questions are two — first, had the Circuit Court jurisdiction to entertain the action? and, if so, second, did the title set up by the plaintiff company show a right of possession of the land in dispute as against the title of the defendants ?

It is claimed by the plaintiff in error that as, at the time when the action was originally brought in the District Court of the Territory of Idaho, the Washington and Idaho Railroad Company, the plaintiff, was a corporation organized under the laws of Washington Territory, and the Oceur d’Alene Railway and Navigation Company, defendant, was a corporation organized under the laws of Montana Territory, and as the Northern' Pacific Railroad Company-was not really a party to the action, there was no right to remove the cause from the state court, whose jurisdiction over the case had attached under the terms of the act of July 3, 1890, c. 356, 26 Stat. 215, providing for the admission of Idaho into the Union. The argument is based on the language of the eighteenth section of that act, wherein it is provided that “ in respect to all cases, proceedings, and matters now pending in the Supreme or District Courts of the said Territory at the time of the admission into the Union of the State of Idaho, and arising within the limits of such State, whereof the Circuit or District Courts by this act established might have had jurisdiction under the laws of the United States had such courts existed at the time of the commencement of such cases, the said Circuit and District Courts, respectively, shall be the successors of said Supreme and District* Courts of said Territory; and in respect to all other cases, proceedings, and matters pending in the Supreme or District Courts of said Territory at the time of the admission of such Territory into the Union, arising within the limits of said State, the courts established by such State shall, respectively, be the successors of said Supreme and District territorial Courts; and all the files, records, indictments, and proceedings relating to any such cases shall be transferred to such Circuit, District, and State Courts, respectively, and the same shall be proceeded with therein in due course of law; but no writ, action, indictment, cause, or proceeding now-pending, or that prior to the admission of the State shall be pending, in any territorial court in said Territory, shall abate by the admission of such State into the Union, but the same shall be transferred and proceeded with in the proper United States Circuit, District, or State-Court, as the case may be: Provided, however, That in all civil actions, causes, and proceedings in which the United States is not a party transfers shall not be made to the Circuit and District Courts of the United States, except upon written request of one of the parties to such action or proceeding filed in the proper court'; and in the absence of such request such cases shall be proceeded with in the proper state courts.”

This language is interpreted by the plaintiff in error to mean that no case can be transferred to the Federal courts if the parties to it could not have gone into such courts at the time the action was brought, if such courts had then actually existed; and the contention is that, as at the time of the commencement of this action, the Washington and Idaho Railroad Company was a resident, citizen, and inhabitant of the Territory of Washington, and the Coeur d’Alene Railway and Navigation Company was a resident, citizen, and inhabitant of the Territory of Montana, no suit either by or against either of such corporations could have been removed, transferred, or commenced in a Federal court on the ground of diverse citizenship.

It should be observed that, while it is true that Montana and Washington were in a territorial condition when this suit was brought, they both had become States, the former on .the 8th, the latter on the 11th, of November, 1889, 26 Stat. 1551, 1553, before the filing of the petition for removal.

Á similar question was presented in Koenigsberger v. Richmond Silver Mining Company, 158 U. S. 41. That was a case where, at the time of the bringing of the action in a District Court of the Territory of Dakota, the plaintiff was a citizen of such Territory, and, when the Territory became a State under a statute- in terms precisely similar to those of the statute we are now considering, the cause was transferred to the Circuit Court of the United States, and it was there contended, as it is here, that the Circuit Court could not acquire jurisdiction of the case by reason of the diversity of citizenship between the parties, because at the time of the commencement of the case the plaintiff was a citizen of a Territory. The subject was carefully considered and the conclusion reached was thus expressed in the language of Mr. Justice Gray:

“ Upon the whole matter, the reasonable conclusion appears to us to be that Congress, by the description ‘whereof the Circuit or District Courts by this act established might have had jurisdiction under the laws of the United States, had such courts existed at the time of the commencement of such cases,’ intended to designate cases of which -those courts might have had jurisdiction under the laws of the United States, had those courts, like the other Circuit and District Courts of the United States generally, existed, at the time in question, in a State of the Union, whose inhabitants consequently were citizens of that State. According to that hypothesis, the plaintiff would have been a citizen of the State of South Dakota, and the defendant a citizen of the State of New York, at the time of the commencement of the action, and the Circuit Court of the United States would have had jurisdiction by reason of such diversity of citizenship. The case was, therefore, rightly transferred, at the written request of the defendant, upon the admission of the State of South Dakota into the Union, to the Circuit Court of the United States.”

This view sufficiently disposes of the objection made in this case to the jurisdiction of the Circuit Court of the United States, so far as that jurisdiction depended on adverse citizenship.

The Circuit Court of Appeals maintained the jurisdiction of the Circuit Court, on the ground that there was a Federal question involved in the fact that the Northern Pacific Railroad Company, a corporation created by the laws of the United States, was a party to the action. We agree with that court in regarding such a fact as conferring jurisdiction on the Circuit Court. But it is urged tfiat the fact did not exist — that the Northern Pacific Railroad was not a party to the action. This contention is, we think, disposed of bythe record itself. That discloses that the original suit was brought against the Northern Pacific Railroad Company as well as against the Coeur d’Alene Railway and Navigation Company; that the summons included both of said defendants; that the complaint alleged that the Northern Pacific Railroad Company was in actual possession of the premises in dispute as a tenant of the Coeur d’Alene Railway and Navigation Company. The return of the summons alleged that service had been made upon both defendants. The petition for the removal or transfer of the case was joined in by the Northern Pacific Railroad Company, and in that petition it was not alleged that the latter company objected to the summons, or for any reason, to the jurisdiction of the court, but alleged that the controversy was between citizens of different States, and that the suit was of a civil nature arising under the laws of the United States.

Upon the face of the record as it existed at the time of the removal, consisting of the writ, the return of service, the complaint, and the petition for such removal, it was, therefore, plain that the Northern Pacific Railroad Company, as a corporation created by the laws of the United States, was a party both nominally and actively. It is true that the subsequent record discloses that the Circuit Court, in rendering its opinion and judgment, speaks of the Northern Pacific Railroad Company as not having been served and as not appearing in the action. But, as was well said by the Circuit Court of Appeals, when dealing with this contention, “ it cannot be said that the Northern Pacific Railroad Company was not an actual party to the litigation. It was not only made a party, but it was a proper party. It was the party in possession of the premises sought to be recovered by the action of ejectment. . . .

At the time when the cause was removed the return of service was on file, but no default had been taken against the Northern Pacific Railroad. Company, and no disposition had been made of the plaintiff’s controversy against it; that defendant, in presenting its petition for removal to the Circuit Court, declared itself, to be one of the defendants to the case, and •recited the fact that the cause was pending in the state court, and was properly within the jurisdiction of the Circuit Court of the United States.”

"Whatever reason, therefore, the Circuit Court may have had for speaking of the Northern Pacific Railroad Company as a party not served and not appearing, it is incontrovertible, as against the record, that it. was served, and whether seryed or not, it entered a general appearance by joining in the petition for removal. That it may have subsequently ceased to take an active part in the case is immaterial. The jurisdictional question must be determined by the record at the time of the transfer of the case.

Whether conflicting claims of railroad companies, under the right-of-way act of Congress, March 3, 1875, would give a Circuit Court of the United States jurisdiction independently .of citizenship, under the doctrine of Doolan v. Carr, 125 U. S. 618, 620, we do not find it necessary to consider.

If, then, the case fell within the jurisdiction of the Circuit Court, we have next to inquire whether that jurisdiction was properly exercised.

The controversy was between two railroad companies, one organized under the laws-of Washington Territory, the other organized under,, the laws of Montana Territory, and was as to the right of possession of a tract of land situated in Shoshone County, in the Territory of Idaho, and over which each company claimed a right of way under the act of March 3, 1875, c. 152,18 Stat. 482, entitled “ An act granting to railroads the right of way through the public lands of the United States.” This act provides that “ the right of way through the public lands of the United States is hereby granted to any railroad company duly organized under the-laws of any State or Territory . . . which shall have filed with the Secretary of the Interior a copy of its articles of incorporation and due proofs of its organization under the same, to the extent of one hundred feet on each side of the central line of said road.”

It was affirmatively found by the Circuit Court that the Coeur d’Alene Railway and .Navigation Company, on the 6th day of July, 1886, filed its articles of incorporation in the office of the secretary of the Territory of Montana, and also filed in the office of the county clerk and recorder of the county of Lewis and Clarke, in said Territory, a certified copy of its said articles of incorporation; that the line of route of the railroad of the said company, as described in said articles of incorporation, passed over and included the land in' controversy; that on the 20th day of July, 1886, the said company filed in the office of the Secretary of the Interior at Washington, D. C., a certified copy of its articles of incorporation and proofs of its organization under the laws of the Territory of Montana, which certified copy of articles of incorporation and proofs of organization were duly approved on that day by the Secretary of the Interior ; that in the summer and fall of 1886 the said company constructed its railroad over said line of railroad, as described in said articles of incorporation, from the Old Mission up the main Coeur d’Alene. River to the town of Kingston, and thence up the South Fork of the Coeur d’Alene River to the town of Wardner Junction, a distance of about fourteen miles ; that in the month of October, 1886, the said company, .for the purpose of extending its line of railroad, caused a survey to be made for its said line of railroad from said Wardner Junction up the said fork of the‘Coeur d’Alene River, over the line described in its said articles of incorporation, through the towns of Wallace and Mullen, and marked the centre line of said road upon the ground by planting stakes at each station at one hundred feet, and at such other points as there were angles in the line, so that the line of route of said road could be readily traced upon the ground; that the said surveying and marking of said line was completed on the 31st day of October, 1886; that in making said survey the engineers of said company ran three lines through said town of Wallace, called lines “ A,” “ B,” and “ 0 ” — the two former being on the south and line “ C ” being on the north side of said river, the latter being the line .upon which the-railroad of said company was afterwards constructed, and upon the ground in controversy in this action; that in the summer and fall of 1887 the said company extended its road from the town of Wardner Junction over its line of survey, a point about one mile east of the town of Wallace, and over said line “C,” the ground in controversy, through the town of Wallace, and at all times thereafter, up to and at the time of the commencement of this action, occupied and used the same as a railroad and for railroad purposes, and at the time of the commencement of this action had its roadbed, track, side tracks and depot thereon, and was using the same exclusively for railroad purposes ; and that at all times above mentioned the lands in controversy, and all' other lands along the line of said railroad of the Coeur d’Alene Kailway and Navigation Company, as described in its articles of incorporation, were unsurveyed public lands of the United States.

If these facts stood unaffected by other evidence, the title of the Coeur d’Alene Kail way and Navigation Company to the land in controversy would be clear.

It was, however, shown that on the 9th day of November, 1886, ten days after the completion of the survey of the three lines “ A,” “B,” and “C,” the said company filed in the United States land office at Coeur d’Alene, Idaho, a map or profile which was, December 3, 1886, approved by the Secretary of the Interior, and that on this map the line B ” through the town of Wallace was platted as the line of the said railroad. As already stated, in the fall of 1887 the company constructed its railroad upon line “ C ” and across the land in controversy. But no amendment of the said map was made, nor was any approval of the Secretary of the Interior obtained to any new map covering line 0.”

The plaintiff contends that the effect of the filing and approval of the map line B ” was to vest in the said company a right of way one hundred feet 'wide on each side of the centre line of its road, as indicated upon said map, which right could not be changed without the consent of the granting power first had and obtained. Regarding this question as one entirely between the Ooeur d’Alene Railway and Naviga-, tion Company and the United States, it should be observed that the act of Congress, under which both parties claim the land in question, by its fourth section provides that, in case of unsurveyed lands of the United States, as these- were, the plat need not be filéd until twelve ■ months after a survey thereof. It is, however, said that while the company might not have been required under the act to file its map at the time such filing was made, yet it had the right to do so under certain regulations of the Secretary of the Interior, in force during the period of this controversy, and that when such map was approved by the Secretary the company had secured’ the benefit of the act upon the line there shown, and could not thereafter alter the same. We agree with the Circuit Court of Appeals in thinking that, so far as the United States are concerned, there is nothing in the act forbidding a railroad company, having adopted one line of survey along the route provided for in its articles of incorporation, and having filed a plat thereof, to subsequently, and within the time allowed it by law for so doing, adopt another route, and that no reason is apparent why, instead of filing a second plat, it may not construct the road on the line surveyed and adopted, so long as the rights of others have not intervened. Such an actual construction and appropriation of one line would preclude the company from asserting any claim to the other lines, and hence the contention that, by running several. lines through unsurveyed lands, the company sought to'obtain more than the statute gave, namely, one right of way, is met by the fact that it claimed and constructed but one line.

If the United States could not, and do not, complain, there is no foundation for the plaintiff! company to do so, as it was found by the trial court that the platting of line “ B,” instead of line “ C,” was through a mistake, and that such mistake was not discovered until after the completion of the defendant’s railroad and depot over and upon the ground in controversy, and that the filing of the plat showing line “ B ” was not done for the purpose of, in any manner, deceiving the plaintiff or any one else, and that the plaintiff was not, in any manner, misled or prejudiced by the filing of said plat or by said mistake.

Even if the Coeur d’Alene Railway and Navigation Company was duly organized as a railroad company, and, as such, was entitled to construct and maintain its road over the land in controversy, without being estopped by having filed an inaccurate map, still the plaintiff contends that the right of way in question belongs to it by virtue of a prior survey made on its behalf. The facts relevant to this contention are that the articles of incorporation, under which the plaintiff claims the land in controversy, were not filed in the office of the secretary of the Territory of Washington till the 10th day of November, 1886, and that a copy of such articles and proof of organization were not filed in the office of the Secretary of the Interior till December 22, 1886. It was, indeed, shown and found that, on October 28, 1886, W. H. Burrage, claiming to be acting for the plaintiff, surveyed a line up the Coeur d’Alene River, through the town of Wallace, and over the ground in controversy, which was the line described in the articles of incorporation subsequently'filed by the plaintiff company in the offices of the secretary of the Territory and of the Secretary of the Interior.

The conclusion of the courts below, on this state of facts, was that at the time of the making of said survey by W. H. Burrage over the lands in' controversy, on October.28,1886, the plaintiff was not a corporation organized for the purpose of constructing, or authorized to construct, a railroad over the land in controversy; was not authorized to take possession of the said premises, or to locate a line of railroad thereon; and that the said survey on October 28, 1886, conferred no right whatever on it, the plaintiff, as against the defendant, the Cceur d’Alene Eailway and Navigation Company.

The argument on behalf of the plaintiff is that when, on December 22, 1886, the Washington and Idaho Eailroad Company had filed its articles of incorporation and proof of organization in the office of the Secretary of Interior at Washington, D. C., it had a right to adopt the survey previously made by Burrage, as and for the location of its route under the general right-of-way act, and that when it so adopted said survey it related back to the date when the survey was made.

We are unable to accept such a view of the law, but concur in the conclusion of the court below that the language of the act of Congress, under which both parties claim, wherein it provides that “the right of way through the public lands of the United States is hereby granted to any railroad company duly authorized under the laws of any State or Territory, which shall file with the Secretary of the Interior a copy of its articles of incorporation and due proofs of its organization under the same, to the extent of a hundred feet on each side of the central line of said road,” plainly means that no corporation can acquire a right of way upon any line not' described in its charter or in its articles of incorporation; that it necessarily follows that no initiatory step can be taken to secure such right of way by the survey upon the ground or otherwise ; that until the power to build the road upon the surveyed line was in a proper manner assumed bj or conferred upon the plaintiff company, its acts of making surveys were of no avail .; and that, so far as the conflicting rights of the parties to. this controversy are concerned, the status of the plaintiff is the same as if its survey of October 28, 1886, had not been made.

The case of New Brighton Railroad Co. v. Pittsburg Railroad Co., 105 Penn. St. 11, was, like the present, one of a contest between two railroad companies for a right of way, and where the effect of a survey of a line before the legal organization of the company had to be considered; and it was held that surveying, locating, and designating, by proper marks, the property to be taken for railroad purposes, cannot be done by the projectors of a railroad company before its incorporation, but only by the president and directors of a duly incorporated company, their engineers and employés, and that an unauthorized preliminary survey, though well marked by a line of stakes indicating the location of a railroad, cannot be regarded as sufficient notice of a prior legal appropriation of the land, nor will the subsequent adoption of such survey by the company, after its incorporation, give it any right to the location as against another company, which had surveyed, and taken possession of the land before the first-mentioned company had passed the resolution of adoption.

The cases cited by the plaintiff in error fio not sustain their position.

Morris & Essex Railroad v. Blair, 9 N. J. Eq. 635, was a case of a contest for a right of way between two railroad companies, both duly incorporated, and it was held that the prior right attached to the company which first actually surveyed and adopted a route and filed, their survey in the office of the Secretary of State, and also that the mere experimental surveying of a route will not confer any- vested or legal right until it shall have been adopted.

The Supreme Court of Iowa, in Lower v. Chicago, Burlington &c. Railway, 59 Iowa, 563, held that though a railroad company may not for some reason have the legal right to condemn a right of way for a lateral line, it may cause another company of its own stockholders to be so organized as to have that power, and that when such subsidiary company has condemned the right of way, it may lease its line to the former company, and in this there will be no fraud upon those whose lands have been condemned.

It is not perceived that these decisions, accepting them as sound, disclose any error in the ruling of the court below.

It is further made to appear, by the eleventh finding, that “ from the time of making the said survey by Burrage over the land in controversy on the 28th day of October, 1886, until long after the completion of the railroad, side tracks, and depot of the defendant, the Coeur d’Alene Railway and Navigation Company, upon the ground in controversy, neither the plaintiff, nor any person for it, ever made any other survey, or did any other act upon the premises, or took any possession thereof.”

While it may be that such a finding, standing alone, would not make out a case of estoppel, of which the defendant could avail itself in an action of law, it is entitled to consideration when we are asked to adopt a construction of the act of Congress which would enable the plaintiff company to take and enjoy the right of way enhanced in value by the improvements put thereon by the defendant. When a court of law is construing an instrument, whether a public law or a private contract, it is legitimate, if two constructions are fairly possible, to adopt that one which equity would favor.

The decree of the court below is

Affirmed.  