Simonson furnished materials to Barton, a subcontractor. At the time when he filed his notice of lien Barton had been paid in full, and had made default, and had abandoned his contract, and Barry, the main contractor, had been paid in full for all that he had then done, and was also in default. By reason of these facts Simonson had no claim at that time against Genin, the owner.
It has been held in this court, where the owner had, after the completion of the building, paid the contractor in full before the filing of a lien, though the lien was filed within the time provided by the statute, that the owner was not liable. (Carman v. McIncrow, 13 N. Y., 70.) The result must be the same where the owner has, before the filing of the lien, paid the contractor, in pursuance of the contract, for all that he has done, and he has made default and abandoned the contract. Barton did no more work under his contract. But Barry, after that, did work upon the premises, and was paid therefor by Genin a sum greater than the amount claimed by Simon-son ; and the latter insists that he thereby had and has a lien for the amount left due and unpaid to him from Barton. A like question arose in Lumbard v. Syracuse Binghamton and New York Railroad Company (55 N. Y., 491), and the decision there is an authority against the appellant here unless the cases may be distinguished. It is claimed that the question there arose under an act (chap. 366, Laws of 1864) peculiar in its provisions, and differing materially from the Hew York'city act.
The amendment to the act of 1864 (chap. 788, § 1, Laws of 1866, p. 1693), that: “ When such labor or material is performed or furnished to a contractor or sub-contractor, all payments made by the owner to either, in good faith, to apply on his contract, shall operate to extinguish the lien aforesaid, unless written notice of the lien is served on the owner of *130the premises before such payment, and stating that the same is then, or immediately thereafter will be, claimed,” it is insisted makes that material difference, and that it was the foundation for the decision in that case. But the opinion is otherwise. It holds that the amendment of 1866 was declaratory of the existing law; that it had no bearing on that case; and that no lien can be acquired by a material man to a sub-contractor by filing notice after payment to the latter pursuant to the contract. The Lumbard Case, in that view, is but an application to the case of a sub-contractor and his material man of the principle applied in Carman v. Mclncrow (supra), to a contractor and his material man. And it must be so. Clearly, as between the attempting lienor and the main contractor, the latter is in no default, and no lien attaches against him. He has, in good faith, paid to the subcontractor all that is due to him, before notice of lien. It would be unjust to him that, in such a case, he should be deprived of his right to payment from the owner, under his contract, for the benefit of a material man who has not been diligent in affixing his lien to the payment about accruing to the sub-contractor who had immediately dealt with him. (See Donaldson v. Wood, 22 Wend., 395.) The main contractor had then a right to demand and enforce payment from the owner for work thereafter done under the contract; nor could the owner resist. It would, then, be unjust to the owner if he must pay to the main contractor, and again to the material man of the sub-contractor. He has no privity of contract with them or either of them, and is affected by their relations to each other to the premises only through this lieu law. It is to be administered upon principles of equity. The judgment or decree shall be made as to the rights and equities of the several parties among themselves andagainst the owner, as may be just. (Laws of 1863, chap. 500, p. 859, § 47.) The appellant avoids this result by claiming that it is not the owner who must lose, for he may not be made liable in any event for more than the contract-price of the first contract, or for the value of the materials where there *131is no specific contract. He insists that it is the chief contractor who must suffer. And the third section of the act is relied upon which, in case of successive liens, prefers that of one furnishing materials to that of the contractor. This is not a case within the letter of that section, and the equities of Barry, the main contractor, takes it without the spirit of it. Nor is it true that the law looks to the interests of but two parties, the laborer or material man, and the owner. It does look to protection for the former, but not at the expense of the rights of the contractor and others interested. Nor does it look to protection for the former even save through his diligent action whereby he. shall put others on their guard, and shall intercept moneys which would otherwise be paid in pursuance of agreement. Where this has been lacking, and others have so acted in good faith as to acquire an adverse right, legal or equitable, it would be going too far to say that this statute subordinates it to the claim asserted by a dilatory notice of lien.
The settled construction of the lien law is that, except in case of fraud, the owner cannot, under any of its provisions, be compelled to pay any greater sum for the completion of a building than by his contract he has agreed to pay. The effect of the statute is simply to take from the owner money actually owing by him on his contract and to apply it in payment for the labor and materials which sub-contractors or material men have contributed toward the performance of the same contract. (Ferguson v. Burk, 4 E. D. Smith, 760, and cases cited.) Where is the reason that the same rule should not be applied to the case of a contractor who has paid to a sub-contractor all that the latter is entitled to ? Whatever may be the comprehensive nature of the general words of the statute they cannot be interpreted so as to result in such injustice to a contractor.
The opinion in the Lumbard Case meets another suggestion of the appellant, viz., that the material man may not be compelled to look through and examine each link of the chain of liability between him and the owner. It says: “A *132party furnishing materials or doing work, relying upon the lien given by the statute for security, must examine the contract with the owner; for it is only to the extent of what is due or to become due upon this contract that his lien can attach. If he does the work or furnishes the material for a sub-contractor in like reliance, he should not only examine the contract with the owner but also that of the sub-contractor, for if the sub-contractor fails to perform or is paid in full, according to its terms in case of performance, there can be no lien within the principle of Carman v. Mclncrow.” (Supra.)
It should be understood that the court does not express the opinion, if there was money due from Barry to Barton when the lien of Simonson was filed, that the lien would not attach to moneys becoming payable to Barry thereafter for further work done under his contract with the owner. All that we hold is, that the sub-contractor, having been paid in full by the contractor, and having abandoned his contract, a material man to the former cannot, after that, and that state of things continuing, intercept moneys after that due and payable to the contractor from the owner in pursuance of the contract.
It is also insisted that the appellant is entitled to his lien for so much thereof as is for lumber furnished at the express request and by direction of the owner. And if the fact is that the owner gave that direction, the appellant is right. (Laws of 1803, supra, § 1.) The referee has found that the desire and request of the owner was under a written agreement and not otherwise. The written agreement does not sustain the allegation of the appellant, that the lumber was furnished at the request and by the direction of the owner. It was an option offered by the owner to Simonson, that if be would furnish lumber, in quantity named, Genin would pay him a specific sum. The liability of Genin was limited and could not, by the terms of the writing, exceed the limit. The sum specified he has paid. The fact does not exist which would bring the owner within the clause of the act *133relied upon. There was no direction or request by the owner, but a specific proposition limited in its terms, which Simonson accepted, and Genin carried out to the letter, and the former gave a receipt in full.
The appellant relies also upon the act of 1866. (Laws of 1866, chapter 752, p. 1634.) That act is in pari materia with the one of 1863 ; it is, indeed, a professed and actual amendment of it. It is to be read with the act amended, and the whole act is to operate, and not the amendment alone. So considered, there is nothing in it to vary the views which we have herein expressed.
There was another ground upon which judgment went for the respondent in the court below. We do not consider that at this time.
The judgment appealed from should be affirmed, with costs.
All concur.
Judgment affirmed.