
    M. TEAHEN, Appellant, v. A. H. NELSON, Respondent.
    Mechanic’s Lien. — Sub-Oontbactor.—Section 3806, 2 Comp. Laws 1888, p. 406, gives a lien to every person who performs labor upon or furnishes material to be used in the construction of, any building, whether done at the instance of the owner or his agent, but the aggregate amount of such liens must not exceed the amount which the owner would be otherwise liable to pay. Section 3807 provides that any sub-contractor, material man, or laborer performing labor or furnishing materials for the contractor, who is entitled to a lien under the provisions of Section 3806, may within thirty days after beginning work or furnishing materials serve upon the owner or his agent written notice of the amount due him or-to become due him, and have a lien for such amount, provided he file his notice of lien with the county recorder within the time required by the statute, held, that the lien of the sub-contractor •'ttaches from the time he begins to perform labor or furnish materials if he gives notice to the owner of thirty days, but the amount of all liens for contractor, sub-contractors and others cannot exceed the amount of the contract with the owner, and the amount of the sub-contractor’s lien cannot exceed the amount of the contract with the owner after deducting the amounts paid before the sub-contractor’s lien attached.
    Id. -Id. — Pleadings.—The complaint of a sub-contractor upon his lien should allege the amount of the contract with the owner, less any payment for labor performed and materials made before the sub-contractor began work or commenced to furnish materials. , "
    Appeal from a judgment of tbe district court of tbe first district.
    Tbe demurrer to tbe complaint was general, that tbe complaint did not state facts sufficient to constitute a cause of action. Tbe demurrer was sustained and plaintiff electing to stand thereon, judgment was entered and plaintiff appealed.
    
      Messrs. Miller and Maginnis for the appellant.
    Tbe defendant, Mr. A. H. Nelson, in person.
   Zane, C. J.:

Tbe appellant filed bis complaint in tbe district court, in wbicb be alleged, in substance, that tbe respondent was tbe owner of tbe lot described; that he made a contract with one Y. H. Harding to erect a building thereon; that, in pursuance of a contract with the latter, appellant performed labor on tbe building to tbe amount of $207, no part of wbicb bad been paid; that he served on respondent notice of tbe amount due him as such sub-contractor, and also filed for record bis claim, as required by tbe statute. The usual prayer was added, and tbe action was commenced within ninety days after tbe claim was filed for record. Tbe court sustained a demurrer to tbe complaint, because it did not contain an averment of any amount due on tbe contract with the owner at tbe time tbe alleged lien of tbe plaintiff attached. This ruling tbe appellant assigns as error.

To decide the question raised, it is necessary to construe certain provisions of Chapter 1 of the Compiled Laws of Utah of 1888 defining mechanics’ liens, and providing for their enforcement. Section 3806 of that chapter is as follows : “ Every person performing labor upon or furnishing materials to be used in the construction * * * of any * * * building lias a lien upon the same for the work or labor done or materials furnished, * * * whether done or furnished at the instance of the owner of the building * * * or his agent, but the aggregate amount of such liens must not exceed the amount which the owner would be otherwise liable to pay.” The provisions of this section, giving the person performing the labor or furnishing the materials a lien, whether the same is done or performed at the instance of the owner or his agent, manifests an intention to confine the lien to such persons as have express or implied contracts with the owner; or, in other words, an intention not to include in its provisions a lien in favor of a sub-contractor or in favor of persons performing- labor or furnishing materials at the instance of such sub-contractor. The language of the last clause of the section, viz., “ but the aggregate amount of such liens must not exceed the amount which the owner would be otherwise liable to pay,” indicates an intention to include the liens o£ sub-contractors, and the liens of persons furnishing materials or performing labor at his instance, provided for in section 3807 of the chapter, as well as the lien of the contractor with the owner given in the section above quoted. The aggregate amount of all liens for work done or materials furnished under contracts with the owner or his agent would be limited by those contracts, and the clause would be of no effect if intended to refer to those; but the amount of the liens for labor performed or materials furnished under sub-contracts, or under contracts between other persons and the sub-contractor, -would not be limited by the contracts with the owner by what he would otherwise be liable to pay. Hence the necessity for the clause. When a provision of an act is susceptible of two meanings, one of which gives effect to it, and the other does not, the rule of construction is that the one giving to it effect shall be adopted. The application of this rule to the limiting provision authorizes the inference that the legislature intended it to embrace the three classes of liens. Section 3807 is as follows: “ Any sub-contractor, material-man, laborer, or other person performing labor or furnishing materials for the contractor, who is entitled to a lien under the provisions of the last section, may, * * within thirty days after commencing to perform the labor or furnish the materials, serve upon the owner or his agént * * * written notice of the amount due him, or contracted to become due him, for such labor or materials; and such sub-contractor, material-man, laborer, or other person, may have a lien for such amount; or performing labor for the contractor, may, by like notice to the contractor, be subro-gated to the rights of such sub-contractor; and by filing notice with the county recorder, shall likewise have a lien for the amount due him, although the building may not be finished: provided, that he file notice of such lien within the time mentioned in section 1U62 of this act.” This section gives the sub-contractor a lien, and it also gives a lien to the person who performs labor on the building, or furnishes material under a contract with such sub-contractor. The sub-contractor is required to serve upon the owner, within thirty days after the performance of labor or the delivery of materials by him commenced, written notice of the amount due him, or contracted to become-due him; and that amount is the entire compensation for such labor and materials —not the whole amount, less such payment as the owner may have made to the contractor with him, after the work commenced or the delivery of materials begun, and before the service of notice. The lien is given to secure the entire compensation for the labor and the materials from the beginning.

If the owner may pay the contractor in advance the full amount of the contract, he may in that way defeat the subcontractor’s lien, because, as we have seen, the owner cannot be compelled to pay more than that amount. While the owner may pay the contractor for labor when performed and materials when delivered, as payment therefor becomes due before the subcontractor or other person at his instance commenced work or the delivery of materials, he cannot by payment in advance, or by payment of any kind to the contractor after the subcontractor commences work or the delivery of materials, defeat or diminish the amount of the subcontractor’s lien, or the amount of the lien of any person performing labor or furnishing materials at his instance. When the contractor has performed the labor or delivered the materials, and is entitled to his pay therefor, the owner ought to pay him, if the right of the subcontractor has not intervened. The owner of premises, contracting with a builder for the erection of a house thereon, is required to anticipate the rights of subcontractors, and persons performing labor and furnishing-materials at their instance, before paying the contractor in advance. The owner is presumed to observe the presence of subcontractors and other persons performing labor upon his building, or delivering materials therefor; and the law requires him to know that he cannot defeat or diminish any lien in their favor by any payment to the contractor-in advance, or by any payment he may make to him after the subcontractor or other person doing work or furnishing-materials at his instance has commenced work or the delivery of materials. As labor is performed and materials, are furnished upon the owner’s contract with the builder, he may pay for it as the pay becomes due, but after the subcontractor commences the execution of his contract his lien commences to run, and it is beyond the power of the owner to defeat or affect it, except by payment of the amount to the sub-contractor. The latter may lose it by failing to serve the requisite notice within thirty days after the execution of his contract begins, or by not filing the required claim within thirty days alter the building is completed, or by not commencing suit to foreclose within ninety days after filing that claim. When the performance of the labor or the delivery of materials begins, the lien attaches and increases in proportion as the labor performed and materials delivered increases. If the legislature had understood that the lien would not attach until notice given, it should have required its service when the performance of labor or the delivery of materials commenced. The law, in effect, says that, in order to secure the amount due for the labor and materials, it is sufficient to serve the notice at any time within thirty days after the work or delivery of materials begins; but if the owner may defeat the security by payment to the contractor at any time before notice, then there is no security against the action of the owner and the contractor.

The lien is maintained by the service of notice within thirty days after the work or the delivery of materials commences, but the work may be done and the materials delivered before that time; and if the owner may make payment to the contractor during that time, and in that way the sub-contractor may be deprived of his lien, the service would be an idle performance. The legislature could not have intended a construction that would probably be attended with such consequences. Section 3,810 of the same chapter prefers the lien given in the chapter to any other that may have attached or been created subsequent to the time when the building, improvement or structure was commenced; also to any such lien of which the lienholder had no notice, and which was unrecorded at the time the-building was commenced. This section requires other lienholders, by mortgage or otherwise, to take notice o£ the commencement of work on the building. And section 3815 declares that all persons entitled to liens on the structure or improvement, except those who contract with the ownex-, are sub-contractors, and requires the court, in its judgment, to direct the amount due sub-contractors to be paid out of the proceeds of sales before any part thereof is paid to the contractor. And section. 3816 of the chapter limits the recovery of the contractor upon a lien filed by him to such amount as may be due him according to his contract, after deducting all claims of sub-contractors and other parties under them, for work done and materials furnished. And section 3817 of the chapter declares the order in which the liens shall take precedence when there is more than one class, viz.: First, all persons other than the original contractor and sub-contractor; second, the sub-contractor; third, the original contractors.

We are of the opinion that the aggregate amount of liens of the contractor, sub-contractor, and of the persons performing labor and furnishing materials at the latter’s request, cannot exceed the amount of the contract with the owner; that the owner may continue to pay the contractor for labor done and materials furnished, as payment therefor becomes due, until the sub-contractor commences work, or the delivery of materials; and that the owner can make no other payments that will affect the amount of the subcontractor’s lien, or the lien of other persons performing labor on the building, or delivering materials therefor, at his request; and that the amount of the sub-contractor’s lien, and the lien of those performing labor and delivering materials at his request, cannot exceed the amount of the contract with the owner, after deducting from that the amount paid by the latter upon such contract, for labor performed and materials furnished, as before stated. We hold that the complaint should contain an allegation of the amount of the contract with the owner, less any payment for labor performed and materials furnished under the same, made before the plaintiff commenced work or the delivery of materials on his sub-contract. For the reasons stated, the judgment of the court below is affirmed.

AndeRSON, J., concurred.

Blackburn, J.

I concur in tbe affirmance of tbe judgment in this case. But I do not concur in tbe construction of tbe lien law of tbis territory, as stated in tbe opinion of tbe chief justice; for I tbink tbat tbe sub-contractor is entitled to claim a lien for tbe work and labor and material furnished by him for the amount due tbe contractor at tbe time be commenced furnishing the materials or doing tbe work, or tbat should subsequently become due, and for no more, and tbis right to a lien is waived if tbe sub-contractor does not give tbe notice required by tbe statute.  