OPINION OP THE COURT.
MECHEM, MERRIT C., District Judge.'The record in this case is made up of the appellant’s (hereinafter called the plaintiff) first amended supplemental complaint; the City Electric Company’s (hereinafter called the defendant) demurrer thereto, the court’s order sustaining the demurrer, and judgment dismissing the cause.
The supplemental complaint sets forth the original and first amended complaints. The material averments of the first amended complaint are: That the plaintiff is a corporation operating a line of railway through the city of Albuquerque, and that its right of way and tracks thereon cross Tijeras Road; that the defendant the Citizens’ Traction & Power Company, a corporation operating a street car line in Albuquerque, has built its tracks to within a short distance of plaintiff’s Tijeras Road crossing, and the defendant intends and will, unless restrained, build its street railway tracks upon and across the plaintiff’s railway tracks at said crossing at grade; that the defendant refuses to enter into any contract with plaintiff relative to the common use and enjoyment of said crossing and the minimizing of the hazards thereof to the public; ‘ ‘ that the plaintiff is remediless save in a court of equity, and in pursuance of the statute in such case made and provided; and, especially in accordance with section 13, chapter 97, of the Session Laws of the Thirty-Sixth Legislative Assembly of the Territory of New Mexico (section 2110, Codification 1915) ; and prays that the court regulate and determine the manner or method of making connections and the crossing by said defendant of its street car line across said Tijeras Road, and the enjoyment and common use of said crossing by plaintiff and said defendant; and that an injunction be issued, enjoining and restraining the said defendant from constructing its proposed street car line across plaintiff’s tracks at said Tijeras Road until the rights of this plaintiff and defendant to the use and occupation and enjoyment has been fixed and determined by the decree of the honorable court, ’ ’ etc. Said complaint is dated June 22,1910. The first amended supplemental complaint alleges: That the defendants the Albuquerque Traction Company and the City Electric Company are New Mexico corporations; that upon motion of the Citizens ’ Traction & Power Company, the temporary injunction issued on plaintiff’s complaint was dissolved, and that said complaint was dismissed, whereupon plaintiff appealed to the territorial Supreme Corirt, and, upon hearing, the judgment of the district court was reversed, and this cause remanded for further proceedings in accordance with the opinion of said court; that after dissolution of the injunction, and pending the appeal of this case, the Citizens’ Traction & Power Company made its crossing on Tijeras Road without plaintiff’s consent and contrary to its-express wishes; that the Citizens’ Traction & Power Company sold its street car line to the Albuquerque Traction Company, and that the City Electric Company at a foreclosure sale of the Albuquerque Traction Company’s franchise and property became the owner of the street car line built by said Citizens’ Traction & Power Company across plaintiff’s tracks on Tijeras Road, and is now operating said line; that the defendants the Albuquerque Traction Company and the City Electric Company bought said line with full notice, both actual and constructive, of the pendency of this action; that during all the time intervening between the reversal of this case by the Supreme Court and the filing of the first supplemental complaint, February 18, 1916, the plaintiff attempted-to secure a settlement and adjustment of the controversies and disagreements still existing between the parties without a continuance of this cause; that since the making of said crossing plaintiff has borne all the expense of the upkeep and repair of same, and for that purpose expended $106.30, while the Albuquerque Traction Company was the owner of the street car line, and the further sum of $43.71 since the City Electric Company became the owner; that said sums are due and owing, and defendants have refused to pay the same.
The prayer for relief is:
That the plaintiff have judgment against the Albuquerque Traction Company for $106.30, arid against the City Electric Company for $43.71; “that the court prescribe and determine the place at which and the manner and mode in which the crossing of the tracks of the plaintiff and defendants shall be constructed, and in that connection, if proper, formally approve the place, manner, and mode of the crossing now constructed; that the court order, fix, determine the terms and conditions of the contract between the parties to this action, concerning the common use of said crossing, and other works appurtenant thereto and necessary therefor, the maintenance of said crossing, together with the furnishing and maintenance of such safety devices at such crossing as may be ordered or may be necessary, the future change, alteration, or renewal of said crossing, and such other or further terms or conditions as may be necessary, just, equitable, and fair to all parties, or such as may be necessary for the protection and convenience of the general public; that the court, upon failure or refusal of the defendants to make and execute the contract concerning said crossing (which may be determined upon and prescribed by the court), the defendants be restrained, enjoined, and prohibited from continuing to maintain the crossing now in existence, or from constructing or attempting to construct any new or different line or track across or upon the right of way and tracks of plaintiff at the intersection of plaintiff’s tracks and right of way with Tijeras Road in the city of Albuquerque.”
To plaintiff’s first amended supplemental complaint the City Electric Company filed its separate demurrer, the grounds whereof are:
(1) Because said defendant the City Electric Company was a stranger to all of the matters and things set forth in said amended supplemental complaint.
(2) Because it appears from the face of said complaint that the said City Electric Company purchased said property at public sale, and it does not appear that said City Electric Company had any knowledge or notice of any of the claims made by the plaintiff.
(3) Because it appears upon the face of said complaint that the plaintiff was guilty of laches in not pursuing the alleged remedy within a reasonable time.
(4) Because it appears upon the face of said complaint that the said plaintiff has an adequate remedy at law.
(5) Because the court has no power to make a contract for said City Electric Company or to compel it to •make a contract or to perform any other action than to enforce such legal rights as plaintiff may have in a proper suit.
(6) The facts do not show a proper cause for supplemental complaint, and defendant cannot properly be made party defendant to this suit.
(7) Because the prayer and object of the original suit against the Citizens’ Traction & Power Company was to regulate and determine the manner of making connections and the crossing by defendant’s street car line of plaintiff’s tracks, and the enjoyment and common use of said crossing by plaintiff and defendant, and for an injunction restraining defendant from making said connections and crossings until the rights of plaintiff and defendant in the premises should be fixed by the court’s decree; and it now appears from said supplemental complaint that the defendant the Citizens’ Traction & Power Company, pending said suit, was allowed to cross the plaintiff’s tracks, and was operating "its street railway across said tracks long before -the Albuquerque Traction or the City Electric Company acquired any interest in said street railway, and plaintiff is now attempting to secure entirely different relief against entirely different defendants than those against whom the original suit was instituted.
(8) Because there is a misjoinder of defendants in this, that the plaintiff seeks different remedies against different defendants; that it appears that the Citizens’ Traction & Power Company is defunct, and has no rights, title, or interest in said street railway; that the Albuquerque Traction Company is defunct, and has no right, title, or interest in said street railway; that plaintiff seeks to. recover a several judgment from said Albuquerque Traction Company in the sum of $103.60, and seeks to recover a several judgment against the City Electric Company in the sum of $43.71; that it seeks to determine the place at which and the manner and mode in which the crossings of plaintiff’s tracks by defendant shall be constructed, although said crossing was made more than six years ago, and has continued eyer since that time; and seeks to have the court make a contract for the defendant the City Electric Company.
(9) The City Electric Company was not a party or privy to any of the matters or things set out in the original complaint in this action.
(10) The City Electric Company is not a proper party defendant because it had no interest in the original suit, and the relief sought is merely personal, and in no way dependent upon the commencement or existence of the original suit.
(11) Because the amended supplemental complaint is not consistent with or in aid of the cause of action set forth in the original complaint, and a new and independent cause of action cannot be set up by such supplemental complaint, although it may have arisen out of the same contract or transaction that formed the basis of the suit.
(12) The facts on which plaintiff claims relief against defendant are properly the subject of a judgment for or against plaintiff without reference to the matters contained in the original complaint, and therefore a supplemental complaint is not proper.
From the court’s order sustaining the demurrer and rendering judgment for defendant, the plaintiff appeals.
[1] The following sections of the Statutes on Eminent Domain are relied upon by plaintiff:
“Sec. 2109. In case the lands sought to be appropriated are held by any public utility corporation, the right to appropi-iate the same- by a railroad, telephone or telegraph company shall be limited to such use as shall not materially interfere with the uses to which, by law, the corporation holding the same is authorized to use the same. Where no agreement can be made between the parties, the mode of assessing the damages provided heretofore as to private persons, shall be adopted; and if the lands to be appropriated lie in more than one county, an application may be made in any one county in which any of the lands lie, and the damages shall be assessed as to all the lands of the defendant corporation along the whole line in one proceeding.”
“Sec, 2110. The court shall have power:
“1. To regulate and determine the place and manner of making connections and crossings, or of enjoying the common use mentioned in the foregoing section,” etc. Codification 1915; chapter 97, Laws 1905.
On the former appeal in the case, 16 N. M. 154, 113 Pac. 810, the territorial Supreme Court, speaking by Mr. Justice Roberts, said:
“Prior to the act of 1905, there was no law in force in the territory of New Mexico which gave to the court the right to determine the manner and place of making connections and crossings between railroads. The right to cross was exercised under the general condemnation statutes, and there was no method by which the rights of the public could be protected and the safety of the passengers secured. A railroad could arbitrarily force its tracks, at grade, across the tracks of another railroad company, subject, of course, to the compensation which it was required to pay the first railway company, and the general equity power of the court. With the modern development of railroads of all kinds, shall we conclude that in 1905 the Legislative Assembly, in enacting the provision in question, had in mind only the crossing of a railroad on private property, and that it did not intend to make any provision whatever for the crossing of tracks, where the first railroad company had only an easement in a public street or highway? To so hold would leave the determination of the manner and place of making the crossing' wholly with the second railroad company, without any consideration as to the rights of the first railroad company or of the safety of the public. We believe that chapter 97 should receive a broader and more general construction, and that the Legislature meant to invest in the court the right to determine and regulate the place and manner of crossing by one railroad of the tracks of another, not only for the protection of the rights of the first railroad, but for the protection of the lives of the traveling public using both roads; and the court has the right to prescribe such system and safeguards as will, in its judgment, fully protect those rights. In the court, both railroad companies have the right to present all questions to the court for its consideration. The court, after hearing the witnesses and the testimony oí experts, can fix the rights of the parties and fully protect them, and at the same time safeguard the interests of the public. * * *
“It is to be presumed that where a crossing is mutually agreed upon between the railroad companies, ample provision will be made for the safety of the passengers on both railroads. In fact, it would be to the interest of both railroads 'to see that such provisions were made for the protection of human life, because, by so doing, they would relieve themselves from loss and damages.” 16 N. M. 161, 162, 113 Pac. 812, supra.
Having before us then the statute law and its interpretation and specific application to the very matter in hand, we may proceed to examine the situation of this case.
[2] And we think it may be stated baldly to be that defendant’s predecessor in-title during the pendency of this action, relying upon an erroneous judgment of the lower court, or rather under the permission of an erroneous judgment of the lower court, without plaintiff’s consent, but against its will, and while plaintiff was powerless to prevent it peaceably, entered upon plaintiff’s tracks, and without right and contrary to law made a crossing over the same; that it and its successors, including this defendant, have maintained such illegal crossing over the protest of plaintiff and in disregard of the oft-repeated efforts of plaintiff to amicably , adjust their differences.
We believe the foregoing fairly and justly states the situation as shown by the plaintiff’s supplemental complaint and admitted by the demurrer if the facts are well pleaded.
The defendant attempts to justify because, the crossing having been peaceably made, the court has lost its power to regulate the place and manner of making the same supposititiously, because defendant’s predecessor regulated the place and manner of making the same. But the defendant cannot make a right out of a wrong and rely upon it as a defense. The crossing was wrongfully and illegally made, and is just as illegal and wrongful today as if it were made yesterday, unless, of course, the lapse of time has made it inexpedient to disturb it.
[3] Such lapse of time is relied upon by defendant; it points out that between the decision in the territorial Supreme Court, February 4, 1911, and the 18th of February, 1916, when it was made a party to this cause, no attempt was made by plaintiff to prosecute this case, but the plaintiff alleges that during all the time between the reversal of the former judgment and the filing of its supplement complaint it continuously attempted to settle its difference with defendant and the other companies. The law favors such attempts, and in view of such an allegation the plaintiff will not be held guilty of laches on the face of the complaint.
[4] The defendant says that it should not be drawn into this controversy because it is a stranger to all the matters and things complained of; that, as shown by the complaint, it purchased the street railway at a foreclosure sale of the property of the Albuquerque Traction Company and bought without knowledge. The complaint, however, charges the defendant with actual knowledge, and its denial of knowledge has no place in a demurrer; we do not feel justified in discussing, in this opinion, defendant’s rights as an innocent purchaser when it is not before us. As the record stands, the defendant bought the street railway and, among other things, this lawsuit, which is a subject-matter capable of acquirement.
We come now to a matter of pleading. Defendant objects to the form of the supplemental complaint for two reasons: First, because the original complaint was against another party; second, because the object and prayer of the original complaint are other or different from the object and prayer of the supplemental eomplainty and that the supplemental complaint is inconsistent with the original complaint because it sets up a new and independent cause of action.
Section 4164, Codification 1915, provides:
“When a complete determination of the controversy cannot be had without the presence of other parties, the court may order them to be brought in by an amendment to the complaint or by a supplementary complaint and a new summons.”
[5, 6] From which, it would appear that the bringing in of a new party by a supplementary complaint is a proper proceeding, if a complete determination of the controversy cannot be had without the presence of the party brought in; and, where the controversy is whether or not a street railway can continue to maintain a crossing, it would seem that the owner of that street railway would be a necessary party.
By section 4169, Codification 1915, it is provided:
“A party may be allowed, on motion, to make a supplemental complaint, answer or reply, alleging facts material to the cause, or praying for any other or different relief, order or judgment.”
That another or different order or relief from that asked in the original complaint may be prayed in a supplemental complaint is specifically permitted by the statute just quoted, .but in this case the relief prayed is not materially changed, and the causes of action are identical, even though, as defendant contends at the time of the filing of the original complaint, the crossing had not been made, and the plaintiff prayed an injunction restraining its installation until the place and manner of making the same and the enjoyment of its common use should be by the court regulated and determined, and in the supplemental complaint the prayer is for an order regulating and determining the place and manner of making the crossing and the enjoyment of its common use, and for an injunction restraining defendant from further using the Crossing until it complies with the order of the court, nevertheless the cause of action is still the same, i. e., the regulation and determination of the' place and manner of making the crossing, and of the enjoyment of its common use.
The fact that the crossing has been made makes no difference because, as before stated, it was illegally made, and is in contemplation of a court of equity as if it had never been made, or to state it differently, a court of equity will not be deterred by the fact that it has been made, if done wrongfully and illegally, and the court has the right to exercise its statutory power, as yet unexercised.
We must not overlook defendant’s argument on the question of its privity with the original defendant, the Citizens’ Traction & Power Company. It says that it, the City Electric Company, “did not exist at the time of the construction of the crossing; consequently there could not have been a privity relative to the act. If there be privity, it must be because of some lien or covenant or responsibility running with the franchise or ownership of the street car line that would charge all, subsequent holders; surely there was nothing of the kind.” This argument ignores the fact alleged that the defendant had actual knowledge of all the circumstances of this case, when it bought the street car line. Accepting' defendant’s argument, however, and continuing it, suppose its predecessor had, over the protest of the owner, laid its tracks across his land, and was in such possession when plaintiff acquired the car line, could it be possible that the trespasser could convey an estate which it never had? Whatever plaintiff’s title may be to the Tijeras Road crossing, the territorial Supreme Court has said that the defendant could not arbitrarily cross plaintiff’s tracks. It could only do so in the exercise of its right of condemnation under the statutes regulating the right in quasi public colorations to take property for a public purpose. Therefore, as defendant’s predecessor stood, so it stands without right or title to the crossing it now maintains, unless, of course, possession has, by the lapse of time and the acquiescence of plaintiff, created a title.
The fact that defendant was not privy to the wrongful entry, or that there was not of record some instrument in the nature of a lien or covenant burdening its apparent title does not, of itself, create in it a right which its predecessor did not possess, and hence could not have conveyed.
Whether or not the pending of this action was'constructive notice is not discussed in the briefs, and we refrain from its consideration, but the thought quite naturally suggests itself that a prudent purchaser of a title which must rest in a court’s decree would search the court’s records to see if the seller had a title.
The defendant objects to what it says is in effect the making of a contract for it by the court. The parties had the opportunity of making a contract settling the various features of this controversy; failing to do so for whatever reason, the court will now proceed to issue its decree after hearing, defining the rights and duties of each party. The statute does not say that the court shall make a contract, but says that if the parties do not contract, the court shall have the power to regulate and determine the matter and things with respect to which the parties might have contracted.
The plaintiff seeks to recover sums of money from the Citizens’ Traction Company and the Albuquerque Traction Company and a sum of money from defendant on account of the maintenance and repair of the crossing. The traction company may be defunct, as alleged by the defendant in its demurrer, but that fact will be properly presented for determination later. The theory upon which plaintiff, if entitled to these sums, will recover them will be upon the familiar maxim that equity regards that as done which should have been done. The court’s ample jurisdiction in this case is such that after determining the amount the defendant and its predecessors should have contributed to the proper maintenance of the crossing, the court will order such sums as may be due paid by the party owing them to the party that advanced them, thus settling all disputes germane 'to the transaction by one judgment. The court will decree as if the determination of defendant and its predecessors’ obligations had been made when the crossing was installed; or, it may be said its decree will relate back to the time it should have been made. The court will judge whether the amounts claimed by plaintiff are fair and just.
It is at once apparent upon consideration that plaintiff could not, as defendant suggests, maintain an independent action at law at this time for the sums it claims until the contribution of each party to the installation, maintenance, and upkeep of the crossing is determined by a court in a proceeding like this. The plaintiff does not ask a judgment for damages nor for money paid out for defendant’s benefit on a promise to repay, either express or implied, but it asks to recover out of the sums paid out by it defendants ’ fair pro rata share of costs of installation, maintenance, and upkeep of the crossing as the same may be determined by the court. Until the court decrees the street railway’s pro rata share in the costs of installation, maintenance, -and repair, defendant’s debt to plaintiff cannot be measured.
.[7] There is then no misjoinder either of persons or causes of action. The plaintiff can bring in as parties every owner of the street railway, since the crossing was illegally made, and make such person contribute his just share for the past costs of the maintenance of the crossing; this, because it prevents a multiplicity of suits and because all the parties are interested in the same question, i. e., the street railway’s pro rata share.
There is no misjoinder of causes of action because the recovery of the money judgments against defendant and its predecessors is merely the carrying into effect of the court’s decree determining the street railway’s pro rata share of the costs of the installation, maintenance, and upkeep of the crossing, and not a separate cause of action.
It follows from the foregoing opinion that the judgment of the lower court must be reversed, and this cause remanded for further proceedings in accordance with the views above expressed; and it is so ordered.
Parker, C. J., and Boberts, J., concur.