Brady, J.
Mrs. Mack, by agreement, dated June 15,1864, employed Hammond, one of the defendants, to build a sewer. The work was finished on the 5th July following. During the period between the dates mentioned, Mrs. Mack commenced an action against Hammond and another to recover the damages sustained by her, in consequence of the removal by them of certain flagging from the premises on which the sewer was built, and insisted that she had a right to retain the money due to Hammond as an indemnity for the trespass committed. On the 5th July, 1864, it was agreed between her and Hammond, that she should pay all of the contract price but §100, which sum she was to retain as security for the payment of any judgment she might obtain in the suit alfeady mentioned. The plaintiff, on the 3d October, 1864, having performed work for the contractor, Hammond' in the construction of the sewer, filed his lien, and subsequently commenced this action to enforce it against the property of the defendant Mack. The justice rendered judgment in favor of the plaintiff, finding as conclusion of law, that no such agreement as the one mentioned to *98have been made between Mrs. Mack and Mr. Hammond, could be entered into “ by which the just claim of the laborer and material man could be defeated.” It is not pretended that at common law such an agreement was prohibited, and no evidence of collusion or fraud was given on the part of the plaintiff. The appeal, therefore, presents the abstract question whether the agreement mentioned is invalid by reason of any provision contained in the act of the legislature, passed May 5, 1863 (Laws 1863, p. 859). It is conceded that the only section of that act applicable to the facts disclosed, without reference to the general scope and design of the act, is the thirteenth, which provides that “ no transfer or assignment of his interest in the contract by the contractor shall be valid as against parties entitled to file liens under said contract against said contractors.” The object and design of the statutes relating to mechanics’ liens was to protect the mechanic and laborer to the extent of his service toward the completion of the work done, and the material man to the value of the merchandise furnished by him. These laws have been administered generally upon the principle that the equities of the persons named are superior to those of the owner, unless his equities arose out of the contract itself, affecting the right of the contractor to recover the contract price, and as well the amount that might be due to the contractor. If the contractor, in other words, had performed his contract, and the compensation agreed upon were due to him, the lienors absorbed it, if sufficient in amount to produce such an effect. The legislature evidently intended that, if the money to be paid under the contract had been earned, the material man, laborer, and mechanic must be paid, although, extrinsic of the contract, the owner might have some claim upon the contractor, which, if allowed, would lessen the sum actually due to the latter; the reason for1 such an intention being, that, as the contractor’s engagement were based upon the amount of his contract, his workmen and inaterial men had the right to rest in security upon it, and the means provided by law to insure its application to their demands. In other words, the contract became at once a letter of credit and a security. (See Telfer v. Kierstead, 2 Hilton Eep. 577.) It was not absolutely so, however. The *99statutes required, and still require, proof that money is due to the contractor, in order that the owner shall, in no case, be compelled to pay more than the contract price. The statutes in question, including that of 1863, more particularly mentioned, in their operation are transfers to the lienors of the money due to the contractor, at the time of the filing of their respective liens, against which nothing should prevail except that which should spring out of the contract itself, such as omissions from, or violations of, its obligations affecting its performance, and consequently the amount due to the contractor. The sum retained by the defendant Mrs. Mack, was not detained by her in reference to any such matter or violation. It related to a claim founded on a different combination of facts, and which is, therefore, subordinate to the rights of the mechanic, laborer, and material man, whose payment by the statute is secured out of the thing he has created in whole or in part—the result of his skill, industry, or enterprise—and that agreement was, therefore, of no avail against him. This may seem greatly in derogation of the right of set-off and counter-claim, but the statute was intended so to operate. The provision of the act of 1863 extended the protection to the mechanic and others, by declaring that no transfer of the contractor’s interest should affect the right of any person entitled to file liens, thus securing to the persons named all their rights during the period allowed for filing then- respective claims. It is true, that the agreement set up by Mrs. Mack is not an absolute transfer or assignment, although it might become so, if she succeeded in her action against the contractor, but its effect, if sustained, would be to hold the lienors in statu quo until her action was determined, without any obligation, on her part, either to give notice to them of the agreement, until an action was commenced against her to enforce the lien claimed, or to expedite the determination of her action against the contractor. For these reasons the agreement made between Mrs. Mack and the contractor must be regarded as a transfer within the spirit of the act of 1863, which the contractor had no right to make, and which cannot destroy the equitable assignment of the fund due to the contractor, created by the operation of the statute.
*100I am aware that some decisions of this court, while determining the construction to be placed upon, and the effect to be given to, the act of 1851, in relation to mechanics’ liens (Laws of 1851, chap. 513) have upheld a set-off (Allen v. Carman, 1 E. D. Smith, 693; Gourdier v. Thorp, Id. 697; Miller v. Moore, Id. 742; Owens v. Ackerson, Id. 691), but it has not been decided in any case that I have been able to find, that a defense, by way of set-off or counter-claim, would be available to the owner in an action against him by a sub-contractor (see opinion of Judge Woodruff in Miller v. Moore, supra, pp. 741-742), but in Miner v. Hoyt (7 Hill, 525), which was an action predicated of the lien law of 1830, Senators Lott and Sherman expressed the opinion that it could not be. In Owens v. Aelcerson, supra, the plaintiff was the contractor, and the right of the owner to abate his claim could not well be disputed. In Miller ,v. Moore, the set-off existing on the contract was made before the passage of the law, and the owner’s claim was allowed on th^t ground; in Gourdier v. Thorp, the action wa!s by the contractor against the owner, and the answer to the plaintiff’s demand was, that the work was not skillfully performed, and the defense, therefore, grew out of the contract itself; and in Allen v. Garma/n, the rule established was, that crediting the contractor with the amount of his debt to the owner existing when the contract was made, before the lien was filed, was equivalent to a payment. It must be borne in mind, however, in relation to these cases, that the act of 1851, supra, under which they were instituted, provided, by its fifth section, that “a bill of particulars of any offset which might be claimed should be served on the laborer, &c.,” and thus impliedly declared that the owner should be protected as to any such demand. There is no such provision in the act of 1863. The word offset is not employed in that statute, and it would seem from its general character that it was the intention to exclude it as a defense by the owner, at least when prosecuted by a sub-contractor, whose lien attaches when the work to be done by him is commenced. In rendering his services he secures his compensation by a lien upon the thing done, as before suggested. It will appear, also, that by the first section of the act of 1863, the lien of the la*101borer, mechanic, and material man is declared, “ notwithstanding any sale, transfer, or incumbrance made or incurred at any time after the commencement of the work, or furnishing of materials; provided, that all mortgages given in good faith for full value, which shall have been executed and recorded at any tim% prior to any actual work done or materials furnished, shall not be affected or impaired by such lien ”—provisions which exhibit an intention on the part of the legislature to place a guard around the lien, which, though it may be oppressive in some respects to the owner, is certainly liberal to the lienor. It will be found, also, that Senators Lott and Sherman, in the case of Miner v. Hoyt, supra, expressed views of the general design of the mechanics’ lien law corresponding with those herein uttered; and that this case stands alone, from the fact that there was no absolute application of the money in Mrs. Mack’s hands to any purpose. Her claim was not admitted by the contractor, and whether it ever will be established is a matter about which no opinion can be expressed here.
Daly, F. J., concurred.