Biggs, J.
This is, an action on the bond of George L. Drew, as sheriff of Clark county. The suit grew out of, and is based upon, the following facts, concerning *364which, there is no dispute: In October, 1882, one Joseph H. McCormick was the owner of one acre- of land situated in Clark county. Being desirous of erecting an icehouse thereon, he bought of the Carson & Rand Lumber Company various bills of lumber between the seventh day of October, 1882, and the fifteenth day of February, 1883, which lumber was used in the construction of an icehouse on the land. McCormick failed to pay for the materials, and, on the twenty-second day of March, 1883, the Lumber Company filed in the office of the circuit clerk of the county a claim and statement for a mechanics’ lien on the icehouse and land to secure the payment of their lumber bill. On the nineteenth day of June, 1883, a suit was instituted by the Lumber Company against McCormick in the circuit court of Clark county, looking to the foreclosure or enforcement of its lien. On the twenty-third day of July, 1883, pending this foreclosure suit, the icehouse was destroyed by fire. In November, 1883, while this suit was still pending and undetermined, the relator herein furnished to McCormick the lumber to rebuild the icehouse, and McCormick failed to pay the relator therefor. On the first day of April, 1884, while the Carson & Rand Lumber Company’s suit was still pending, the relator, for the purpose of securing the benefits of a mechanics’ lien on the new icehouse, and the one acre of land upon which it was situated, filed a statement of its account in the office of the circuit clerk of the county. Afterwards, on the seventh day of April, 1884, an action in which McCormick was the defendant was brought by the relator in. said circuit court to enforce the relator’s lien by the sale of the house and land. On the twenty-ninth day of April, 1884, the Carson & Rand Lumber Company obtained a judgment against McCormick for the sum of $622.02, debt, and costs of suit taxed at $93.75, and the further decree that the lien of the Lumber Company be foreclosed, and that *365the icehouse and ground be sold to satisfy the judgment and costs. An execution was issued on this judgment, and, on the seventeenth day of October, 1884, the defendant Drew, as sheriff, sold, the land and icehouse under this execution to the relator for the sum of $445. The relator paid the amount of its bid to the sheriff, without presenting any claim to him or anyone else for any portion of it. Afterwards, on the eight day of November, 1884, the sheriff, without any notice of any claim or right of the relator to any portion of the money, paid it to the plaintiff in the execution. On the' twentieth day of November, 1884, the relator first made a demand on the sheriff for a pro rata share of the proceeds realized under the Carson & Rand-Lumber Company’s execution, and subsequently, to-wit, on the twenty first day of April, 1885, the relator also obtained a judgment on its demand against McCormick, with the additional decree that its lien be foreclosed. Under the foregoing state of fa’cts, the relator claimed that, under section 6727 of the Revised Statutes of 1889, it was entitled to a pro rata division of the proceeds of said sale ; that the sheriff was1 bound to take notice of the pendency of this suit and its rights under Die law, and that, the sheriff having failed to pay after demand, a right of action accrued on his official bond in favor of the relator. A jury was waived, and the cause submitted to the court. The finding and judgment were for the defendants. The relator has brought the case to this court for review.
The section of the statute (section 6727), upon which the relator’s supposed cause of action is predicated, reads : ‘ ‘ The liens for work and labor done or things furnished, as specified in this article, shall be upon an equal footing; without reference to the date of filing the account or lien.; and in all cases where a sale shall be ordered and. the property sold, which may be described in any account or lien, the proceeds arising *366from such sale, when not sufficient to discharge in full all the liens against the same ,with out reference to the date of filing the account or lien, shall be paid pro rata •on the respective liens, provided, such account or liens shall have been filed and suit brought as provided by this article.” It is contended by the relator’s counsel that, under a proper construction of the foregoing section, his client was entitled to a portion of the money ■arising from the sale under the Carson & Rand execution, and that the sheriff is liable therefor, although he •paid the entire amount to the plaintiff in the execution without notice of the relator’s claim. On the other hand, it is insisted that the relator had no interest or ■claim to the money, and, if it ever had, that it ought to be estopped from suing the sheriff therefor, because it failed to notify him of the claim before he paid the /money to the Lumber Company.
In order to determine the rights and claims of the 'lienors' to this fund, it will be necessary to read the foregoing section in connection with sections 6705, 6706 •and 6707 of the same law. It is only in this way that •the law can be properly understood, and the respective ■■rights and interests of the parties thereunder ascertained.
“Sec. 6705. Every mechanic or other person, who shall do or perform any work or labor upon, or furnish any material, fixtures, engine, boiler or machin•ery for, any building, erection or improvements upon land, or for repairing the same, under, or by virtue of, any contract with the owner or proprietor thereof, or his agent, trustee, contractor or subcontractor, upon complying with the provisions of this article, shall have for his work or labor done, or materials, fixtures, engine, boiler or machinery furnished, a lien upon such building, .erection or improvements, and upon the land belonging to such owner or proprietor on which the same are situated, to the extent of one acre ; or’, if such building, erection or improvement be upon any lot of land in *367any town, city or village, then snch lien shall be upon such building, erection or improvements, and the lot or land upon which,the same are situated, to secure the payment for such work or labor done, or materials, fixtures, engine, boiler or machinery furnished as aforesaid.
“ Sec. 6706. The entire land, to the extent aforesaid, upon which.any such building, erection or other improvement is situated, including as well that part of said land which is not covered with such building, erection or other improvement, as that part thereof which is covered with the same, shall be subject to all liens created by this article, to the extent, and only to-the extent, of all the right, title, and interest' owned therein by the owner or proprietor of such building, erection .or other improvement, for whose immediate-use or benefit the labor was done or things were furnished.
0 ‘ ‘ Sec. 6707. The lien for the things aforesaid, or work, shall attach to the buildings, erections or improvements for which they were furnished or the work was-done, in preference to any other prior lien or incumbrance or mortgage upon the land upon which said buildings, erections, improvements or machinery have been erected or put; and any person enforcing such lien may have such building, erection or improvement sold under execution, 'and the purchaser may remove the * same within a reasonable time thereafter.”
It is admitted by both parties that the Carson &. Rand Lumber Company’s lien not only attached to the-building, but also to the land, and that this lien on the land was not destroyed by reason of the building having-burned. Hence, it must be conceded that, at the time-the relator furnished the materials for the construction of the second icehouse, McCormick’s title to the land upon which it was built was incumbered by- the first-mechanics’ lien. L In so far as this lien on the land was. concerned, the relator, in furnishing lumber for the second *368icehouse, must be held to have contracted with notice of and in subordination to it. He could no more postpone it to his after-acquired rights as a lienor, than he could have done if the Lumber Company’s debt had been secured by a mortgage. As. to the new building, the relator had the right, under section 6707, to enforce its lien against it alone, as prior in right to the claims of the Lumber Company. If this course had been pursued, the judgment would have conferred the right to remove the building, provided the Carson & Rand Lumber Company had been made a party. Coe v. Ritter, 86 Mo. 277; Crandall v. Cooper, 62 Mo. 478; Missouri Fire Clay Works v. Ellison, 30 Mo. App. 67. The relator did not see proper to adopt this course, but elected to enforce its lien against both the house.and the land. In doing this, it elected to make its lien and the proceedings for its foreclosure in all respects subordinate to that of the Lumber Company. It follows from this that the sale under the Carson & Rand Lumber Company execution was solely for the benefit of that company, and, as the property sold for a sum less than its debt, the relator, as a second lienor, could not claim any portion of it. This sale was analogous to a sale under foreclosure of a prior mortgage. Under such a sale the equity of redemption would pass, and with it would go all subsequent liens thereon.
In our opinion this conclusion is in harmony with the intention and theory of the mechanics’ lien law, and it necessarily runs counter to the plaintiff's construction of section 6727. The right to prorate under this section must be confined to cases, wherein the materials were furnished or labor was performed in the construction of one building or buildings constituting one improvement, and constructed at or about the same time. To give the law a different construction might result in great confusion and injustice. The subsequent claims of other materialmen for otherQand additional structures might be so large as to practically destroy the *369■value of the first lien. The case at bar affords a good illustration of this.
Under the view taken by us,- it will not be necessary to notice the other questions. What we have said disposes of the case, and necessarily leads to an affirmance of the judgment.
All the judges concur.