MR. JUSTICE HOLLOWAY
delivered the opinion of the court.
In 1910 J. L. Melntire, who owned a certain town lot in Poison, contracted to sell it to J. H. Campbell, who thereafter entered into a contract to sell the same lot to William Edwards. Edwards went into possession under the contract and erected a building upon the lot. The Stritzel-Spaberg Lumber Company furnished materials to Edwards for the building, and, not having been paid, filed its materialman’s lien. Shortly before the lien was filed, Edwards defaulted in the payment for the lot, and Campbell and Melntire then sold it to Esau James, who commenced an action to dispossess Edwards, and that action was pending at the time this suit to foreclose the lien was instituted by the lumber company. Edwards and Melntire failed to appear. Defendant James answered, setting forth the facts above somewhat more in detail. The trial court made findings in substantial conformity with these recitals, and, in addition, found “that the said building constructed upon the premises in question cannot be removed therefrom without injury to the realty,” and concluded “that defendant William Edwards’ interest in and to the premises herein involved was not such that any lien for materials used in the construction of said dwelling-house could attach.” Judgment for defendant James was res-*52dered and entered, and plaintiff appealed therefrom and from an order denying it a new trial.
That Edwards was in possession of, and had an equitable [1, 2] interest, in the lot at the time he contracted for the building materials, and throughout the entire time during which the materials were furnished, cannot be gainsaid. Does the fact, then, that he had but a defeasible interest in the lot, and that such interest failed before the lien was foreclosed, but after the materials were furnished, operate to defeat the lien altogether? The identical question is somewhat new in this state, but upon principle it cannot be of doubtful solution. Section 72$0, Revised Codes, gives to the lumberman a lien upon the property for materials furnished for any building, structure, improvement, etc. In the lien notice he is required to give a description of the property to be charged with such lien. (Section 7291.) Section 7293 provides that the lien extends to the whole lot or lots upon which the building or improvement is situated, if within a city or town, provided the land belongs to the person who causes the building to be constructed; but if such person has less than a fee-simple estate in such land, then only his interest therein is subject to the lien. It is argued that, since Edwards’ interest in the lot wholly failed before the lien was foreclosed, there was not anything which a decree of foreclosure could direct to be sold. The argument of counsel and the conclusion of the trial court apparently proceed upon the assumption that the lien given by section 7290, above, attaches exclusively, or at least primarily, to the land upon which the building is erected, and therefore, without some title to the land in the one who purchases the material, there cannot be a lien. We are of the opinion that the assumption is not justified, but that, on the contrary, the lien is given primarily upon the building, structure, or other improvement, and extends to the land incidentally. That this is correct seems to be borne out by the terms of the statute and its history. In the Compiled Statutes of 1887 the lien was given in terms upon the building, erection, bridge, flume, canal, ditch, etc. (Sec. 1370, Fifth Div., Comp. Stats.) *53Section 1374 provided that the lien given by section 1370 extended to the lot or land upon which the building, improvement or structure was situated, but only to the extent of the right, title or interest owned therein by the owner or proprietor of such building ,■ and if the interest was a leasehold, the forfeiture of the lease did not forfeit or impair the lien so far as concerned the building, erection or other improvement, but such building, erection or other improvement might be sold to satisfy the lien, and removed by the purchaser within twenty days after the sale. (Sec. 1375.) In case the building subject to the lien was upon land encumbered by a prior mortgage, the lien might be enforced against the building, with the right in the purchaser to remove it. (Sec. 1376.) This was the state of the law at the date of its codification. Section 2130 of the Code of Civil Procedure of 1895 granted a lien to a materialman, and corresponded in its provisions to section 1370 of the Compiled Statutes, above. However, instead of the lien attaching to the building, erection, bridge, flume, canal, etc., in terms, as under the Compiled Statutes, the Code of Civil Procedure granted the lien upon “the property upon which the work or labor is done, or material furnished,” and this phraseology has been carried forward into the Bevised' Codes (sec. 7290, above).
By comparison it is found that the legislature of 1895 adopted the lien law as prepared by the Code commissioners, and in their report the commissioners said: “There have been no material changes made by the commissioners in the proposed Code of Civil Procedure from existing statutes, except to arrange, perfect, classify and consolidate the law.” So the commissioners understood, and the legislatures must have understood, that the change in the phraseology in the lien law as indicated above was not intended to work any change in substance, but that the term “property” was used in its generic sense to avoid repeating the long list of terms “building, erection, bridge, flume, canal, ditch,” etc., which terms were all repeated specifically in the then existing statute. (Sec. 1370, Comp. Stats., above.) Added emphasis is given to this construction by the fact that the Code *54commissioners and the legislature of 1895 followed closely all the other provisions of the Compiled Statutes upon liens, and, with few changes, these same provisions are now to be found in our present Codes. A comparison of sections 1374, 1375 and 1376, Compiled Statutes, with sections 1331, 1332 and 1333, Code of Civil Procedure, as reported by the commissioners; and sections 2133, 2134 and 2135, Code of Civil Procedure as adopted in 1895, and sections 7293, 7294 and 7295, Revised Codes, will demonstrate the correctness of this conclusion. These views are in harmony with our former holding in Western Iron Works v. Montana P. & P. Co., 30 Mont. 550, 77 Pac. 413, where it was said: “By section 2130 of the Code of Civil Procedure, a lien is given upon the building or improvement, in the construction of which the labor or materials were used, and section 2133 of the Code of Civil Procedure extends this lien to the land upon which the structure or building is situated. Therefore the ‘property’ to be identified under section 2131 of the Code of Civil Procedure is the building or improvement upon which the lien is given. ’ ’
If, then, the lien of this plaintiff attached primarily to the building in the construction of which its materials entered, the failure of Edwards’ title to the lot upon which the building was situated did not affect the lien upon 'the building. At the time the materials were furnished and the lien was filed, Edwards had an equitable interest in the lot and was in actual possession of it. His default in the payment of the installment of the purchase price due before the lien was filed did not ipso facto work a forfeiture of such interest. While the right to a lien is purely statutory, and compliance with the statute is necessary to the [3] existence of a lien (McGlauflin v. Wormser, 28 Mont. 177, 72 Pac. 428), the necessary steps once having been taken, the lien law is subject to the most liberal construction; for it is remedial in character, and rests upon the broad principle of natural equity and commercial necessity. (Western Iron Works v. Montana P. & P. Co., above.).
*55The fact that some injury may result to the realty from the removal of the building is not a reason for denying plaintiff relief. The statute contemplates removal, whether injury does or does not result. Upon the showing made, plaintiff was entitled to a decree foreclosing its lien upon the building, with the right in the purchaser to remove the same within the time allowed by law.
The judgment and order are reversed, and the cause is remanded, with directions to enter a decree in favor of plaintiff in conformity with the views herein expressed.
Reversed and remanded.
Mr. Chief Justice Brantly and Mr. Justice Sanner concur.