
    HELENA LUMBER COMPANY, Appellant, v. MONTANA CENTRAL RAILROAD COMPANY, Respondent.
    
      Pleading — Mechanic's lien. — In an action for the foreclosure of a mechanic’s lien against a railroad company, the complaint alleged, in substance, that certain described land, against which the lien was invoked, was necessary to the convenient and ordinary use of the defendant’s depot buildings. The answer alleged as a separate defense that the land in question was " incident to its franchise and useful and indispensable and necessary, and facilitates the successful operation of said railroad.” Seld, that as the latter allegation was not admitted by the complaint, it was error to strike out a replication which denied it.
    
      Appeal from First Judicial District, Lewis and Clarice County.
    
    Judgment on the pleadings was rendered for the defendant by Hunt, J.
    Statement of facts, prepared by the judge delivering the opinion.
    The action is for the foreclosure of a mechanic’s lien. The complaint alleges that the defendant is a corporation organized under the laws of the State, and doing business therein. There is no allegation that it owned or was operating any railroad; that the co-defendants, McKay and others, were a partnership, under the firm name of McKay and Company, and the contractors of the railway company in the erection of a depot building. Paragraph 4 of the complaint is as follows: “That at all the times hereinafter mentioned said defendant, the Montana Central Railway Company, was and now is the owner of that certain tract of land situate, lying, and being in Ottawa Gulch [describing it], in Lewis and Clarke County, Montana Territory, which is occupied by, and appurtenant and necessary to, the convenient and ordinary use of the depot buildings and appurtenances of the Montana Central Railway Company at the town of Marysville, together with the said depot building and appurtenances erected thereon.” The complaint then alleges the erection by said contractors of a certain depot building on the real estate above described for the exclusive use and benefit of the railway company; that plaintiff sold and delivered to said McKay and Company material of the value of $376.74, for the depot building, which was used in and incorporated into the building. Then follow allegations of the filing of a lien against the land ■and building. Plaintiff demands a money judgment against both the contractors and the railway company, and prays a decree of foreclosure of the lien against said premises. The answer of the Montana Central Eailway Company, which is the only defendant which seems to have appeared, contains some denials which are not material to this inquiry, and then sets up a separate defense in paragraph 5, which is in full as follows: “And for a separate defense defendant alleges that its railway extends, and did prior to October 1, 1888, extend, and wqs in operation, through the counties of Cascade, Lewis and Clarke, and Silver Eow, in said State, and that the same was completed and in operation long prior to the time the depot building mentioned in plaintiff’s complaint therein is alleged to Jiave been constructed, and that the ground covered by said -depot, and appurtenant thereto, and necessary for its use and ■enjoyment, had been acquired by said company, and that the -same had become a part of its entire property long prior to the ■ construction of said depot building, to wit, since the tenth day of October, 1888, and that the same is incident to its franchise, • and useful and indispensable and necessary, and facilitates the successful operation of said railroad.” To this matter set up in paragraph 5, the plaintiff demurred on the ground that it -did not set forth facts sufficient, to constitute a defense to the : action. The demurrer was overruled, and the plaintiff' filed vthe following replication: “Plaintiff in replication denies that ^defendant’s railway was completed or in operation long prior, <©r at any time prior, to the said time said depot building was constructed, and denies that the same was completed or in operation at any time prior to several days after the last item of material was furnished for said depot building, as set forth in ■the complaint herein. Plaintiff further denies that the ground ■upon which said depot building stands, and the ground appurtenant and necessary for its use and enjoyment, is incident to the franchise of said defendant, and denies that the same is indispensable or necessary in the successful operation of said road.” The defendant moved to strike out the replication for the reason that the facts alleged in the replication were admitted and alleged in the complaint. This motion was sustained. The replication being stricken out, defendant moved for judgment on the pleadings. This motion was granted, and judgment accordingly entered for the defendant. The plaintiff appeals (1) from the order overruling the demurrer to paragraph 5 of the auswer; (2) from, the order striking out the replication; (3) from the judgment.
    
      Leslie & Craven, for Appellant.
    The answer of the defendant set up the following new matter asa separate defense, in substance: That its railway was completed and in operation long prior to the time the depot building mentioned in plaintiff’s complaint is alleged to have been constructed, and that the ground covered by said depot and appurtenant thereto and necessary for its use and enjoyment had been acquired and had become a part of its entire property long prior to the construction of said depot building; that the same is incident to its franchise, and useful and indispensable and necessary, and facilitates the successful operation of said railroad. Plaintiff’s demurrer to this separate defense was overruled, which we submit was error. The pleadings disclose the fact that the railroad company, defendant, and the lien law both owe their existence to a common origin — the statutory law of Montana. Before the company began business here, the incorporators knew that the same law which gave it existence also provided that it should pay for the labor and material entering into its property under its authority, and that its buildings might be sold to satisfy liens therefore. The mechanic’s lien law is remedial in character; it should be liberally construed. But a strict construction of its provision will give appellant all it asks for. Public policy cannot overshadow express enactment. The public policy of our law as to depot buildings is sufficiently shown in section 1370, fifth division of the Compiled Statutes, which, in providing a lien upon “any building, erection,” etc., especially mentions railroads as well. But the ease in 41 Ohio St. 37, mentioned below, decides that the phrase “any bridge” is sufficient to include a railroad bridge, in the absence of the inference as to public policy which is contained in our statute. The cases cited below, not only support us in the conclusions heretofore stated, but also show, as we think, conclusively, that the decisions relative to levy upon portions of railroad property under executions are not relevant to a case of this kind, in which a sale is asked, in order to satisfy an encumbrance upon specific and disintegrated property. A mechanic’s lien is an encumbrance by operation of law, and its enforcement ought to have the same favor in the courts as the foreclosure of a mortgage voluntarily given by the duly authorized officers of the railroad company, upon any detached portion of its property. {Hill v. La Crosse etc. JR. JR. Co. 11 Wis. 223; Phillips on Mechanics’ Liens [9th ed.], § 182; JBotsford v. New Haven etc. JR. JR. Co. 41 Conn. 454; Eorer on Eailways, p. 776; Smith Bridge Co. v. Bowman, 41 Ohio St. 37; 52 Am. Eep. 66; Purtell v. Chicago Forge & Bolt Co. 74 Wis. 132.)
    But after the demurrer was overruled and leave obtained to file a replication, what sufficient reason can sustain the court below in striking it from the files? The reason for this,as appears in the bill of exceptions, was because the denials therein were alleged and admitted in the complaint. The replication substantially consists of three denials: (1) It denies that the railway was completed or was in operation at any time prior to the construction of the depot building. There is no allegation in the complaint as to this. (2) It denies that the ground upon which the depot building stands and appurtenant and necessary for its use and enjoyment is incident to the franchise of the defendant. There is no allegation in the complaint as to what is and what is not incident to the franchise. (3) It denies that said ground is indispensable or necessary in the successful operation of said road. There is nothing in the complaint as to what is or what is not necessary or indispensable in the operation of the road. Therefore we respectfully submit that the court erred in striking the replication from the files.
    
      McCutcheon & JMJalntire, for Eespondent.
    The complaint shows that the land sought to be subjected to the lien is a part of the property of the defendant. Depots and depot grounds are specifically provided for by statute. (§ 685, fifth div. Comp. Stats.) That a railroad is an entirety and that a lien cannot attach to a section of it, or to a bridge or any -other structure which is a part of the road, is the view sustained by the greater number of authorities. (Jones on Liens, § 1619; Da/no v. M. & O. B. B. Co. 27 Ark. 564; Cox v. Western Pae. B. B. Co. 44 Cal. 18.) “Even under a statute giving a lien for work done and materials furnished in constructing or improving .... station houses, depots .... the lien is against the whole road.” (Knapp v. St. Louis K. C. & Nor. By. Co. 74 Mo. 374.) This is upon the ground that it is against public policy to permit detached portions of a railroad to be sold under any judgment or execution. (Knapp v. St. Louis K. C. & Nor. By. Co. supra, and cases cited; Cranston v. Union Trust Co. 75 Mo. 29; Shrainha v. Bohan, 18 Mo. App. 340; Cue v. Tidewater Canal Co. 24 How. 263; Rorer on Judicial Sales, §§ 1068,1069; Coe v. Columbus P. & I. B. B. Co. 10 Ohio St. 372; 75 Am. Dec. 518; Western Pa. B. B. Co. v. Johnston, 59 Pa. St. 290; Youmgman v. Elmira & W. B. B. Co. 65 Pa. St. 278; Bayard’s Appeal, 72 Pa. St. 453; Thomas v. Armstrong, 7 Cal. 286; Stewart v. Jones, 40 Mo. 140; Hatcher v. Toledo & W. B. B. Co. 62 111. 477; James v. Pontiac G. P. B. Co. 8 Mich. 91; Ammant v. New Alexandria & P. T. Co. 13 Serg. & R. 212; 15 Am. Dec. 593; Plymouth B. B. Co. v. Colwell, 39 Pa. St. 337; 80 Am. Dec. 526.) In Montana this doctrine has been extended to an office safe. (Northern P. B. B. Co. v. Shimmell, 6 Mont. 161.) A lien for work upon any part of the road attaches to the entire road. (Broohs v. Burlington etc. By. Co. 101 U. S. 443; Jones on Liens, § 1620.)
    It is apparent that the allegations in the replication are in conflict with the allegations in the complaint, and the replication was for this reason properly stricken from the files.
   De Witt, J.

The first point on the appeal we will not consider.

The plaintiff pleaded by replication after the demurrer to the answer was overruled. If the striking out of the replication were correct, judgment on the pleadings properly followed. If the replication should have been allowed to stand, the judgment must be reversed; To that inquiry we will address ourselves. It is not very clearly alleged in paragraph 5 of the answer that defendant had any railroad, or that the depot building was necessary or incident to any railroad franchise. But the overruling of the demurrer was a declaration of law by the court that the allegation, that the land was necessary and incident to the franchise, constituted a defense, if true. If this were a defense by way of new matter, the plaintiff had the right to deny it in a replication. He did so. There is no reason why this replication should not stand, and the issue thus framed be tried, unless plaintiff had admitted in its complaint what it denied in the replication. Paragraph 4 of the complaint, cited in full in the foregoing statement of facts, is the portion for examination. The language is grammatically awkward, but as we are enabled to construe it, it alleges that the land described is necessary to the use of the depot building, not that the land or building is necessary to the use of the railroad franchise, or incident thereto; nor does it allege that defendant had any railroad or railroad franchise. Therefore, when defendant in its answer alleges that the land against which the lien is invoked is “incident to its franchise, and useful and indispensable and necessary, and facilitates the successful operation of said railroad,” and the court holds, in overruling the demurrer, that this matter is a good defense, the plaintiff has admitted nothing in its complaint which precludes it from denying the truth of this material matter in the answer. We are of opinion that the replication should have been allowed to stand.

The judgment is therefore reversed, and the case remanded to .the District Court for further proceedings in accordance with these views.

Blake, C. J., and Harwood, J., concur.  