This matter comes before the court upon the order to show cause why the preliminary injunction granted plaintiff should not be continued in force.
And also upon an order to show cause, obtained by the defendant, “ why this action should not be dismissed, or the service of the summons and complaint herein vacated and set aside.”
We will consider the last motion first.
As there is nothing in the affidavit showing that service was not regularly made in conformity with the provisions of the *231Code, we must assume that the defendant is properly brought into court, and that jurisdiction of the “ person ” of the corporation has been acquired. Consequently, the motion to dismiss the action or to vacate the service of the summons cannot be maintained on the ground that the court has no jurisdiction of the “ person ” of the defendant.
But the court is also asked to dismiss the action upon the ground that, as both parties are foreign corporations, the court has no jurisdiction of the cause of action alleged in the complaint, and possesses no power to grant the relief demanded. Whether the alleged cause of action arose within the state, or within the boundaries of a foreign state, must be determined by the allegations of the pleadings exclusively, and no affidavits can be received in the consideration of that question. Therefore, we hold that affidavits presented have no relevancy to the matters to be determined, and are not properly before the court. The regular mode of raising the question of jurisdiction of the cause of action, or of the subject-matter of the action, or of the power of the court to grant the particular relief prayed for, is by the interposition of a demurrer or answer to.the complaint. A mere motion to dismiss the action on that ground is not the proper method of procedure, and it ought not to be entertained. Atlantic & Pacific Tel. Co. v. Baltimore & Ohio R. Co., 87 N. Y. 357; Toronto Trust Co. v. Chicago, etc., R. R. Co., 32 Hun, 192.
This objection is raised by defendant’s answer and may be determined on the trial of the action, and we doubt the propriety of entertaining the motion at Special Term.
It follows that the motion to dismiss the action on this ground must be denied.
But the defendant also prays for such other and further relief as may be just in the premises. It appears that the preliminary injunction granted was vacated upon defendant’s giving an undertaking as provided by section 629, Code of Civil Procedure, but previous thereto leave was granted plaintiff to move to continue such injunction, and a motion for that purpose is now made. The question is now presented whether *232the courts of this state have or possess jurisdiction of the cause of action alleged in the complaint, and that depends upon the determination of the question whether the cause of action arose within the state. It is also to he considered whether this court has any power to grant the particular relief prayed for, and whether a decree enjoining a foreign railroad cor-' poration from doing, in the foreign domicile, the acts and things stated in the prayer for relief, would he there regarded as of any binding force, effect or validity; and further, whether the court, sitting as a court of equity, might not" properly decline to grant injunctive relief in the particular case, even though it possessed jurisdiction of an action for damages. In the first place it should be observed that in our opinion the statute of 1855 (Chap. 244) has no important or material bearing upon the case.
It does not confer upon the plaintiff any special power or authority, either in respect to the making of contracts in the prosecution of its lawful business, nor in respect to its legal capacity to sue. By the common law a foreign corporation could maintain a suit at law or in equity in the courts of this state. Silver Lake Bank v. North, 4 Johns. Ch. 372; New Jersey, etc., Bank v. Thorp, 6 Cow. 47; Bank of Commerce v. Rutland, etc., R. R. Co., 10 How. Pr. 7.
And legislative authority to sue at law upon filing security for costs was conferred by the Bevised Statutes. 2 B. S. 457, § 1.
And a foreign corporation may make and enforce in this state contracts which by its charter it is competent to enter into, and which are not forbidden by law or contrary to the public policy of the state. Barb v. Poole. 12 N. Y. 495 ; 2 R. S. 457, § 2.
The statute of 1855 also subjects theplaimtiff to liability to be sued in CMiy of our courts; but that provision must be taken with reference to the existing provisions of the law relating to suits against foreign corporations, and the subsequent amendments or alterations thereof, and with regard to the jurisdiction of the particular court.
*233But the question here is, not as to the legal capacity of tilt plaintiff to sue nor its liability to be sued, nor as to its power to make contracts to be performed in the foreign domicile, but as to the liability of defendant to be sued in our courts upon the cause of action alleged, and to be enjoined here from exercising some of its corporate powers and franchises in the foreign state; in other words, whether this court has jurisdiction of the cause of action or any power to grant a decree that would be effectual in the foreign state. The act of 1855 has no bearing whatever upon this question.
By the rules of the common law service of process on the president or principal officer of a corporation must be within the jurisdiction of the sovereignty where the artificial body exists. And inasmuch as the corporation can have no legal existence out of the boundaries of the sovereignty that created it, it follows that if a foreign corporation can be brought into court, it must be by some statutory provision. “ It may be conceded that, before the Eevised Statutes, a foreign corporation could not be sued at law in invibrnn in our courts.” Gibbs v. Queens Ins. Co., 63 N. Y. 116.
In other words, that our courts had no common-law jurisdiction of such corporations, and could acquire none without their consent. Whitehead v. Buffalo & Lake H. R. Co., 18 How. Pr. 230 ; Hann v. Barnegat, etc., Imp. Co., 7 Civ. Proc. Rep. 223.
We must look, therefore, to the statutes for authority or jurisdiction to entertain this particular action. By the provisions of the Eevised Statutes (Yol. 2, 459, § 15, as amended by Laws of 1849, chap. 107) relating to “ proceedings by and against corporations in courts of law,” jurisdiction was conferred of actions for the recovery of any debt or damages arising on contract executed or delivered within this state, or upon any cause of action arising therein.
The same legislature' of 1849, later in the session, added section 427 to the Code of Procedure, by which an action was authorized to be maintained “ by a plaintiff, not a resident of the state, when the cause of action shall home arisen or the *234subject of the action shall be sitxiated within this state.” There is no limitation here to actions at law or actions for damages.
By section 1780, Code of Oivil Procedure, “An action against a foreign corporation may be maintained by another foreign corporation or by a nonresident, in one of the following cases onl/y: 1. Where the action is brought to recover damages for the breach of a contract made within the state or relatvng to property situated within the state at the time of the making thereof. * * * 3. Where the cause of action arose within the state, except where the object of the action is to affect the title to real property situated without the state.”
Did the cause of action arise within this state ? By the terms of the contract defendant was to deliver the coal in Pennsylvania and to pay for its transportation in Hew York.
“ The breach of duty is substantially the cause of action.” 10 How. Pr. 9.
“ The cause of action arises when that is not done which ought to have been done, or that is done which ought not to have been done. But the time when the cause of action arises determines also the place where it arises, for when that occurs which is the cause of action the place where it occurs is the place where the cause of action arises.” Hibernia Nat. Bank v. Lacombe, 84 N. Y. 385 ; Toronto Trust Co. v. Chicago, etc., R. Co., 32 Hun, 192.
The ground of the action, the foundation upon which it is based, is not the refusal to pay in Hew York, but rather the refusal to deliver the coal in Pennsylvania, and that is the breach of the obligation complained of. In other words, this action is not brought to recover damages for the breach of the contract, but to enjoin and restrain the defendant from violating the terms of the contract in that state / in substance and effect, to compel or enforce the performance of its provisions in the foreign jurisdiction. Hone of the matters and things that plaintiff seeks to enjoin the defendant from doing, or to enforce the performance of, are required by the agreement to be done in this state, nor could they be performed here. It *235is difficult, therefore, to perceive how it can be maintained that this cause of action arose here.
But there are broader grounds upon which the decision of this matter may be placed, and they afford insuperable objec- \ tions to the exercise by the courts of this state of the power to enforce, by injunction or in any other method of procedure, a contract made by two foreign railroad companies in j respect to the business of transportation in the foreign state, * and imposing restrictions upon one of them in the full exercise of the corporate rights, powers and franchises conferred by the foreign sovereignty. These railroad companies are, in some sense, public corporations of Pennsylvania ; their roads are public highways in that state, and the extensive powers they exercise and the duties and obligations imposed upon them by the law are to a great extent public in their nature and character, and they peculiarly relate to the people of the state by which they were created. Any attempt to interfere by injunction with the business of railroad transportation in Pennsylvania, or to regulate or control the railroad company in the exercise of its corporate rights and powers, or to restrain it to the least extent in the full performance of itsi public duties, would undoubtedly be viewed by the courts of 1 that state as an impertinent interference with its domestic : affairs and the due administration of the local concerns of an 1 independent sovereignty. As a matter of comity between| the states, we are bound by every consideration of policy,' expediency and propriety to abstain from taking jurisdiction! of a controversy of this character. “ It is clear that no duty' devolves upon this state to entertain jurisdiction of the controversy. Indeed, it might well be suggested that to do so, instead of comity, would savor somewhat of impertinent interference. * * * Even the domestic origin of the cause of action, although allowed by the Code, existing alone, might, and probably would, be disregarded by other states when called upon to give effect to the judgment. * * * To say in such a case that the cause of action exists or has arisen in Eew York, or that the legislature contemplated assuming juris*236diction in such a case, would seem little short of preposterous.” Cumberland Goal & Iron Co. v. Hoffman Coal Co., 30 Barb. 171.
Z The complaint implies a wrong, a breach of duty, done or suffered by the defendant, to the injury of the plaintiff, for which the relief asked, if obtained, will be a remedy. The cause of action is the right to that remedy, and that accrued and the cause of action arose when and where the wrong or ^breach of duty was done or suffered. Id. 169.
The whole controversy appropriately belongs to the tribunals of Pennsylvania, the creator of these artificial bodies, and not to the tribunals of this state; and this court may well decline to assume jurisdiction or to grant the equitable relief by injunction. To warrant the granting of such relief in any case against a foreign corporation in respect to acts to be done or performed in the foreign domicile, “ there must be either a necessity or a fitness suggested by the peculiar circumstances.” Id. 111.
. Assuming that a suit in equity for an injunction may be ¡maintained by one foreign corporation against another in . jsome cases ■—even though it may operate upon and affect its ¡"‘actions in the common domicile — it is very clear to us that this is not one of them. And even assuming that the cause of action partly arose within the state, it by no means follows ' that the plaintiff is entitled to call into exercise the equitable powers of the court and to obtain relief for the enforcement of the contract by an injunction order.
The order restrains the defendant from “in any wise” violating the agreement set forth in the complaint, and from transporting to market any anthracite coal whatsoever from lands in the Lackawanna valley over any other railroad or in any other manner than as specified in the agreement, and from delivering to the Willcesbarre Eailroad Company, or any other carrier, any of the anthracite coal mentioned in the complaint, and which by the agreement was to be transported by the plaintiff; and also from receiving from the Wilkesbarre Company any coal either belonging to or controlled by the defend*237ant, and which under said agreement was to be transported by the plaintiff, and from diverting to said company, dr to the railroad of any other company, any of the said coal, “ or in any other respect violating or failing to perform the said agreement.” The effect of this injunction is not only to restrain the defendant from transporting the coal over its railroad as now constructed or as hereafter extended, but also from delivering it for transportation to any other railroad company or public carrier; and it thus operates on and affects other railroad corporations in Pennsylvania, and prevents them, to this extent, from exercising their corporate powers and performing their corporate duties as public carriers. And as it attempts to enjoin the defendant from receiving the coal from the Willcesbarre Company, it hinders and prevents that company from transporting and delivering it. "Whether the provisions of such a contract are valid or not, and whether or not the defendant may be enjoined from violating it, and in what respects and to what extent it may be enjoined, are questions to be answered and determined by the laws of Pennsylvania, to be ascertained by an examination of the legislative acts and the adjudications of the courts, and by the judicial tribunals of that state must they be ultimately determined. The contract may be opposed to some doctrine of “ public policy ” prevailing in that state, or it may violate some rule of the common law, or it may be in contravention of the “ spirit,” if not the letter, of some provision of the charter of incorporation, or of some provision of the statutes relating to railroad companies, but the decision of these questions peculiarly and most appropriately belongs to the courts of the state by which these corporations were created, and which are regulated and controlled by the legislative, executive or administrative and judicial authorities or tribunals there existing. The validity, obligation and interpretation of the contract must be determined by the laws and public policy of Pennsylvania.
This court should not intermeddle in a controversy of this nature, arising between two railroad corporations of a sister state, and to specifically enforce a contract of such a character *238by enjoining the defendant from doing certain acts in the foreign domicile. How would the courts of Pennsylvania regard an injunction issued by this court if the controversy should be transferred there ? Suppose either of these parties should institute a proceeding in the courts of that state, even after final judgment for the plaintiff rendered here, would the matters here determined be regarded as res adjudicada? Would the judgment operate as a bar or an estoppel? Suppose the courts there should be of the opinion that the con-, tract was invalid for any reason, or upon any ground of public policy or statutory law, would they hold themselves bound by the adjudication here, give effect to the judgment and enjoin the defendant from doing acts which, in their opinion, it had a legal right to do ? Ho authority or' precedent has been produced, and we believe none can be found, in support of this injunction.
By one of the provisions of this contract the defendant agrees not to build a line between the collieries and Gravel Place, and the language of the injunction is broad enough to cover this, but of course it would be regarded as a nullity in Pennsylvania.
Plaintiff’s counsel insists that the transportation part of the contract is severable from that pertaining to the relations of the parties as coal owners and coal sellers ; that the provisions relating to the production of the coal, the area in which it might not be sold, and the price at which it should be sold, were foreign to the actual transportation of the coal tendered for transportation. Conceding this, it does not follow that the court should sustain an injunction pendente lite. The fact that there are grave questions of public policy involved in this controversy, which must ultimately be determined by the judicial tribunals of Pennsylvania, and these matters arise out of one and the same contract and are intimately connected with the traffic arrangements, is sufficient warrant for a court of equity to decline to issue an injunction before the trial of the whole matters in controversy. We are not called upon to make a decision upon the validity of this contract, or any *239part of it, nor do we intend that the views here expressed respecting the power and jurisdiction of the court to grant a final judgment shall conclude the court upon the final hearing, so as to preclude it from making a reexamination of the questions involved. It is sufficient for the present purpose to hold that, for the reasons given, the right of the plaintiff to maintain this action is one of great doubt, and in such cases a preliminary injunction is never granted.
In the language of the court in Chase v. Vanderbilt, 37 N. Y. Super. Ct. 356, “ It seems to me that the examination into the question of the foundation of the plaintiff’s right to any judgment must inevitably extend beyond the jurisdiction of this court, and must have reference to the obligations and business of a foreign corporation in a foreign state. The examination of the questions involved relates to subjects beyond, and over which this court has no control.” And the court cannot obtain jurisdiction by acting on its directors. Affd. in 62 N. Y. 307. In the case of Atlantic & Pacific Tel. Co. v. B. & C. R. Co., 46 N. Y. Super. Ct. 377, where an action for injunction was brought by a domestic corporation against a foreign and domestic corporation, the court discusses the question of the power of the court to enjoin foreign corporations from doing certain acts in the foreign state. Id. 384, 386, 398, 416, 417. “The defendants are a corporation organized under the laws of Eew Jersey and must be deemed | nonresidents' of this state. This judgment, therefore, cannot 6 be enforced by process of attachment and proceedings as for J a contempt as against citizens of this state. Such an attempt” and proceeding would obviously prove utterly abortive.” Id. 425, quoting 42 E. Y. 306.
The liabilities which the defendant is under, as well as those which the plaintiff has assumed, must be determined by the local laws of that state where they were created as administered by its appropriate tribunals. At every step these must have the right to determine, as occasions for intervention arise, whether the duties imposed upon the defendant are being performed and the laws of the state observed. Its own *240rights in making contracts like that here presented must depend on the local laws which govern its creation, and, whatever these may be, we have no such control over it that we could enforce any decree against it. Kansas Con. Co. v. Topeka R. Co., 135 Mass. 38.
Aside from the question of power depending on the right of jurisdiction, we regard it as within the power of this court, sitting as a court of equity, to decline to exercise jurisdiction in such cases, referring parties to the tribunals of the state upon whose laws their relations and rights peculiarly depend and where alone they can be effectually and properly administered. Smith v. Mut. Life Ins. Co., 14 Allen, 343.
Where the cause of action arises abroad; where it affects only the internal government of the corporation; where the judgment, if rendered, cannot be in any way enforced against them, except by injunction against the individual members of the corporation, and the party has an ample remedy in the state where the corporation has a legal existence, the courts here may well decline exercising an equitable jurisdiction in such a case. Howell v. Chicago, etc., R. Co., 51 Barb. 379.
The motion to dismiss the action or to set aside the service of the summons and complaint is denied.
The motion to continue the injunction is denied, and the same is vacated and set aside.
Motions denied.