delivered the opinion of the court.
1. There is but one question presented by this appeal : Did the lower court err in excluding evidence as to the California statute of limitations applicable to this character of litigation? In other words: Does the California statute or the Oregon statute apply for the purpose of fixing the time within which plaintiff was required to bring his action? It is elementary and is conceded by both parties to this appeal that the law of *74the forum ordinarily determines the time within which plaintiff must sue. The defendant relies wholly on Section 26, L. O. L., which is as follows:
“When the cause of action has arisen in another state, territory, or country, between non-residents of this state, and by the laws of the- state, territory, or country where the cause of action arose, an action cannot be maintained thereon by reason of the lapse of time, no action shall be maintained thereon in this state.”
Plaintiff’s cause of action arose on board a steamship owned in the State of California.
“The territorial sovereignty of a state extends to a vessel of the state when it is upon the high seas, the vessel being deemed a part of the territory of the state to which it belongs”: International Navigation Co. v. Lindstron, 123 Fed. 475, 476 (60 C. C. A. 649, 650).
To the same effect, see: Deslions v. La Compagnie Generale Transatlantique, 210 U. S. 95 (52 L. Ed. 973, 28 Sup. Ct. Rep. 664, 680); Old Dominion Co. v. Gilmore, 207 U. S. 398 (52 L. Ed. 264, 28 Sup. Ct. Rep. 133); La Bourgogne, 139 Fed. 433, 438 (71 C. C. A. 489); The Hamilton, 146 Fed. 724, 726 (77 C. C. A. 150); In re Clyde Steamship Co., 134 Fed. 95, 993; The E. B. Ward, 17 Fed. 456, 459.
This case therefore stands on the same footing as if plaintiff had been injured in the City of San Francisco.
2. It appears that plaintiff is a citizen and resident of the State of Washington. The case therefore falls within the operation of Section 26 of the Code, if it shall be held that the defendant is a nonresident of Oregon within the meaning of this section. The defendant’s allegation on the subject of its residence is as follows:
“That the said steamship ‘Roanoke’ referred to in the complaint and owned by this defendant is owned in *75the State of California and not within the State of Oregon, and that the said defendant is a California corporation, and that said steamship is registered in the State of California.”
Plaintiff claims that this allegation is insufficient on the ground that it covers the residence of the defendant only at the time when the answer was filed, and that there is no allegation that the defendant was a resident of California when the cause of action arose. In the respect criticised the answer is aided by the allegations of the complaint. It is alleged therein:
‘ ‘ That at all times hereinafter mentioned the defendant, North Pacific Steamship Co., was and now is a corporation duly organized and existing under and by virtue of the laws of the State of California and doing business in the State of Oregon, having an agent or agents at Portland, Oregon.
“That at all times hereinafter mentioned the defendant, North Pacific Steamship Co., was the owner of, and engaged in operating, as a common carrier, that certain steamship known as the Steamship Roanoke.”
We think it sufficiently appears from the pleadings that the defendant was a California corporation on the day when plaintiff sustained his injuries, and it could not by any possibility have become an Oregon corporation as the result of anything which has since transpired. If the incorporation of the defendant under the laws of California makes it a nonresident of the State of Oregon within the purview of Section 26, L. O. L., the defendant should have been permitted to prove the California statute of limitations.
3. The defendant contends that the pleadings admit that the defendant is a nonresident, and that for this reason the judgment should be reversed. This contention of the defendant is based upon the following allegation contained in plaintiff’s reply:
*76“The plaintiff admits that the steamer referred to in plaintiff’s complaint was registered at the city of San Francisco, California, and that the owner of said steamer resides in the State of California.”
The foregoing allegation merely admits the conclusion which the law would draw from the fact that the defendant is a California corporation. Plaintiff contends that although the defendant resides within the State of California, it was also a resident of the State of Oregon at the time when the cause of action arose, as it was doing business in Oregon and maintained an agent at Portland. The allegation of the complaint above quoted, to the effect that the defendant has been doing business in the State of Oregon and has maintained an agent therein, is sustained by the proof. This case therefore presents the interesting legal question as to whether a foreign corporation doing business in Oregon and maintaining an agent therein is to be deemed a nonresident of the state within the meaning of Section 26, L. O. L.
"While the briefs are repléte with authorities, our attention has been directed by the parties to only two cases arising under facts substantially identical with the case at bar. One of these cases, cited by plaintiff, is Louisville Co. v. Pool, 72 Miss. 487 (16 South. 753). This was an action brought in Mississippi to recover damages for the killing of plaintiff’s stock in the State of Alabama by the defendant’s railroad. The defendant relied on the Mississippi statute corresponding to our Section 26. The decision is not in point because the Mississippi statute is wholly unlike the Oregon statute. It is confined in its operation to cases of parties who remove from one state to another, and by its terms excludes from its operation the case of a corpó*77ration doing business in two or more states at the same time. The defendant cites Northwestern Co. v. Lowry, 14 Ky. Law Rep. 600 (20 S. W. 607). This case turns on a question of laches, and what was said by the court in construing the Kentucky statute corresponding to our Section 26 was not necessary to the decision. Furthermore, the Kentucky legislation is distinguishable from the Oregon statute.
4. It is settled law in this jurisdiction that a foreign corporation doing business in Oregon is to be deemed a resident of Oregon in such sense as that it is amenable to the processes of the Oregon courts, and a personal judgment may he secured against it based on the service of summons in this state: Aldrich v. Anchor Coal Co., 24 Or. 32, 35 (32 Pac. 756, 41 Am. St. Rep. 831); Farrell v. Oregon Co., 31 Or. 463, 467, 468 (49 Pac. 876). It is believed that these authorities go no further than to hold that a corporation by transacting business in Oregon consents to be found therein for the purpose of service of summons upon it.
5. Section 16, L. O. L., is in part as follows:
“If, when the cause of action shall accrue against any person who shall he out of the state or concealed therein, such action may be commenced within the terms herein respectively limited, after the return of such person into the state, or the time of his concealment.”
Within the meaning of this statute it is held that a foreign corporation is not out of the state, provided it maintains an agent therein upon whom service of summons may be made: Burns v. White Swan Co., 35 Or. 305, 308 (57 Pac. 637); 3 Cook on Corporations, 7 ed., § 757, pp. 2774, 2775. The authorities announcing this latter principle base their conclusions on the fact that *78the reason which induced the legislature to enact Section 16 aforesaid is inapplicable to any party on whom service of summons may be effected within the state at any time.
It is provided by Section 44, L. O. L., that except in certain cases an action shall be commenced and tried in the county in which the defendant resides. In the interpretation of this statute it is held that a foreign corporation is a nonresident and that it may therefore be sued in any county in which service may be secured upon it: Cunningham v. Klamath Lake R. Co., 54 Or. 13, 21 (101 Pac. 213, 1099). The same conclusion has been reached by the Idaho court: Boyer v. Northern Pacific Co., 8 Idaho, 74 (66 Pac. 826, 70 L. R. A. 691). In determining the situs of its movable personal property for purposes of taxation, a corporation is held to be a resident of the jurisdiction which incorporates it: Callender Co. v. Pomeroy, 61 Or. 343, 351 (122 Pac. 758). Within the meaning of the bankruptcy statute (Act July 1, 1898, c. 541, 30 Stat. 544), a corporation is a resident of the state under whose laws it is incorporated, and of no other state: In re Matthews Co., 144 Fed. 724, 729. The attachment statutes of a number of the states permit the levy of attachments on the property of nonresidents. Within the meaning of these statutes it has been held that a foreign corporation is a nonresident, even though it is transacting business in the state: South Carolina Co. v. People’s Inst., 64 Ga. 18, 30. The Missouri court, however, has reached a different conclusion on this question of law: Farnsworth v. Terre Haute Co., 29 Mo. 75. The Act of Congress governing the jurisdiction of the federal courts requires that suits in which the jurisdiction is based on diversity of citizenship shall be brought only *79in a federal district of which either the plaintiff or the defendant is an inhabitant. Within the meaning of this statute it is held that a corporation is an inhabitant of the state which incorporated it, and of no other state: Shaw v. Quincy Mining Co., 145 U. S. 444, 453 (36 L. Ed. 768, 12 Sup. Ct. Rep. 935); Averill v. Southern Co., 75 Fed. 736, 740. It has accordingly been held that the Baltimore & Ohio Railroad Co. is not an inhabitant of the State of West Virginia, although it maintains and operates extensive lines of railway therein: Martin v. Baltimore & Ohio R. Co., 151 U. S. 673, 676, 684 (38 L. Ed. 311, 14 Sup. Ct. Rep. 533). The federal statutes vest the federal courts with jurisdiction of controversies between citizens and residents of different states. Within the meaning of this legislation, a corporation is deemed to be a resident of the state which incorporates it, and of no other: Koshland v. Insurance Co., 31 Or. 205, 217, 218 (49 Pac. 845); Railroad Co. v. Koontz, 104 U. S. 5, 11, 12 (26 L. Ed. 643); Myers v. Murray, 43 Fed. 695, 699 (11 L. R. A. 216). The books are full of general statements in line with the authorities last above cited. 1 Cook on Corporations (7 ed.) Section 1, page 3, states the rule as follows:
“The domicile, residence, and citizenship of a corporation are in the state where it is incorporated.”
In 1 Thompson on Corporations (7 ed.), Section 490, page 592, we find the following language:
‘‘ The first and prime rule is that a corporation is a resident, or has its legal domicile in the state or country by and under whose laws it was organized. As said by one court: ‘A corporation can exist only within the sovereignty which created it, although, by comity, it may be allowed to do business in other jurisdictions through its agents. It can have but one *80legal residence, and that must he within the state or sovereignty creating it.’ The authorities are practically unanimous on this proposition.”
In 1 Clark & Marshall on Private Corporations, Section 114, page 352, it is said:
“The settled doctrine is that a corporation, for the purposes for which it may be considered a citizen, resident, or inhabitant, is a citizen, resident, or inhabitant of the country or state by or under whose laws it was created or organized, and that it can not be a citizen, resident, or inhabitant of any other country or state.”
6. We think the word “nonresident,” found in Section 26, L. O. L., is to be interpreted in the light of the authorities last above referred to.
For most purposes and under most circumstances it is clear that a corporation resides only in the state where it is incorporated. If it transacts business in another state, it is properly held to be. a resident of such other state for purposes of legal process. This rule is followed in order to prevent the intolerable injustice of authorizing the transaction of corporate business without the corresponding responsibility of. answering within the jurisdiction for corporate contracts and torts. It follows, as a corollary, that a corporation transacting business within the state may plead the statute of limitations. These exceptions to the general rule are apparent rather than real. The word “resident” in these authorities means “one found within the jurisdiction.” The word is not used in this sense in Section 26. To sustain plaintiff’s contention in this case is to hold that every corporation, held to answer in an Oregon court, is a resident of Oregon, for no foreign corporation can be sued in this state unless it maintains an agent in Oregon: Aldrich v. An*81chor Coal Co., 24 Or. 32, 35 (32 Pac. 756, 41 Am. St. Rep. 831). Section 26 is the concluding section of the chapter of the Code on the subject of the limitation of actions. The purpose of the legislature in enacting the statute was to remove any possible encouragement which might otherwise be offered for the bringing in the Oregon courts of litigation which more properly belongs elsewhere.
When the cause of action arises in Oregon, the courts of this state are a proper forum in which to litigate the controversy. Inasmuch as the courts of this state exist for the accommodation of its citizens, every opportunity should be given to litigate in our courts controversies to which any citizen of Oregon is a party. Section 26 permits these controversies to be litigated in Oregon courts during the whole period allowed by our statute of limitations. It is the plain legislative intent that controversies arising in other jurisdictions between citizens of other states shall not be litigated in Oregon courts after the causes of action are barred by the statutes of such other states. It is contrary to the policy of the law to encourage the litigation in our courts of controversies which are litigated here for the sole reason that our statute of limitations is more liberal than that of the jurisdiction in which the controversy arose. • The word “resident” as used in Section 26 is used in the same sense in which Congress uses it in statutes defining the jurisdiction of the federal courts.
7. Within this definition the defendant is a resident of California; plaintiff is a resident of Washington and the cause of action arose within the jurisdiction of California. The case therefore falls within the operation of Section 26, L. O. L., and the defendant should have *82been permitted to prove that the action is barred by the California statute of limitations.
The judgment is reversed and the cause remanded.
Reversed and Remanded.
Mr. Chief Justice McBride, Mr. Justice Burnett and Mr. Justice Bean concur. Mr. Justice Harris took no part in the consideration of this case.