
    [No. 3,285.]
    W. F. WHITTIER and WILLIAM P. FULLER v. J. W. WILBUR et al.
    Liens of Mechanics and Matsbial Men.—There is no constitutional objection to a statute securing a lien to material men, who, at the instance of a contractor, furnish him with materials which are used in the construction of the building, provided the aggregate liens do not exceed the contract price, as fixed by the owner and contractor.
    Idem.—If the statute gives the material man a lien on the bjiilding for materials furnished by him to a contractor who contracts with the owner, the contractor and owner cannot deprive the material man of his lien, by a clause in the contract, by which the contractor agrees to indemnify the owner against any liens taken by persons furnishing materials to be used in constructing the building.
    Idem.—If the material man obtains j ndgment against the owner, and against the property, the owner may deduct the amount of the judgment from any sum due the contractor, on the contract price.
    Appeal from the District Court, Twelfth Judicial District, City and County of San Francisco.
    On the 23d of November, 1869, Rachel B. Vamcleve, who was the owner of a lot on Post street, in San Francisco, entered into a contract with George Coffran, Joseph Ñongues and J. W. Wilbur, by which they agreed to furnish the materials and erect for her, on the lot, a building, and she was to pay them the sum of thirteen thousand nine hundred dollars. The contract contained the following clause:
    “And the parties of the second part, hereby agree to
    
      save, keep harmless, and indemnify the party of the first part, and the said building, and also the said land and the owner or owners thereof, of and from any liens, claims or notices of liens by persons performing labor upon or furnishing materials to be used in the construction of the said building, and from all costs, expenses, counsel fees, damage and injury arising, or that may arise, from the assertion of any such liens, claims, or notice of liens.”
    A large number of persons furnished Coffran; Ñongues and Wilbur, materials, which were used in the construction of the building, and 'among the number Whittier and Fuller, the plaintiffs here. Those material men filed liens under the Lien Act of 1868. The plaintiffs brought this action to enforce their lien, and madq the owner of the building, and the other lien holders, parties defendant.
    They averred in their complaint, that the building was erected under the contract, and that the goods were furnished to the contractors, and that the contractors were the agents of the owner. The other lien holders answered, setting up by way of cross complaint, their liens, and asking to have them enforced.
    The owner answered, setting up that all the work and labor done, on the building, and all the materials furnished for it, were done and furnished under- the contract, and annexed a copy of the contract to the answer. When the cause came on for trial, the owner moved for judgment in her favor on the pleadings. The Court granted the motion, holding that the Lien Act of March 30, 1868, was unconstitutional. The plaintiffs, and the defendants who claimed liens, appealed from the judgment.
    The Lien Law of 1868 gives a lien to all who labor on or furnish materials for (,he construction of a building, and provides that the contractor who has charge of the construction of a building, shall be held to be the agent of the owner, for the purposes of the Act.
    
      Porter, Holladay and Weeks, for the Appellants, argued that the contract between the contractors and owner, by which the material men were not to have a. lien, was a contract that third persons should not have the benefit of a statute made expressly for them, and therefore void as to third persons, but could be enforced as a covenant of the contractors, and was intended merely for the protection of the owner.
    They also argued that the law was not unconstitutional as impairing the obligation of contracts between contractors and owners, as the law existed before the contract, and the contract was made in view of it; and cited, Ogden v. Saunders, 12 Wheat.; and Story on Constitution, Sec. 1374.
    
      Jarboe & Harrison, for Respondents, argued that the rights of material men must be controlled by the contract between the owner and contractor; and cited, Henley v. Wadsworth, 38 Cal. 361; Shaver v. Murdock, 36 Cal. 293, and Blythe v. Poultney, 31 Cal. 233. They also argued that the law was unconstitutional, and violated sections one, eight and twenty-one of Art. I, because it prevented the owner from contracting with the builder that no lien should be created on the building, and permitted material men to compel the owner to pay more than the contract price, and made the contractor the agent of the owner; and cited, Hooker v. New Haven and Northampton Co. 14 Conn. 146; Canal Appraisers v. People, 17 Wend. 604, and Pratt v. Brown, 3 Wis. 613.
    
      Porter, Holladay and Weeks, in reply, argued that the maritime law made the master the agent of the owners in the purchase of materials, and that the lien law did no more, and that the contract between the owner and builder was an attempt to evade the law.
   By the Court, McKinstry, J.:

We can see no constitutional or other objection to a statute securing a lien to a material man for the value of the materials which have gone into a building; provided, the aggregate liens do not exceed the contract price as fixed by the owner and original contractor.

And in such cases the contractor and owner cannot deprive the material man of his lien by introducing a stipulation into the building contract, by which the contractor agrees to indemnify the owner against any lien by persons furnishing materials to be used in the construction of the building.

In case of judgment on behalf of the material man against the owner and his property, the latter is entitled to deduct from any sum due the contractor, the amount of such judgment. (Stats. 1867-8, p. 592.)

On the present appeal it does not appear that the asserted liens amount to the contract price, or that such price was paid when this action was commenced, or the liens were filed.

Judgment reversed and new trial ordered.

Mr. Justice Rhodes did not express an opinion.  