Cropsey, J.
The action is to enforce a lien for a public improvement. The plaintiff furnished materials used in the construction of a state hospital. After its lien was filed it was bonded in the usual way, as provided by subdivision' 5 of section 21 of the Lien Law. The plaintiff’s first claim is that it is entitled to recover against the surety on that bond, regardless of its right to enforce its mechanic’s lien. But this contention is not sound. The law requires such a bond to be conditioned “ for the payment of any judgment which may be recovered in an action to enforce the lien.” Lien Law, § 21. The bond in question was so conditioned. Plaintiff contends that, as admittedly it is entitled to a judgment against the contractor, it can recover on this bond, as the judgment against the contractor can be recovered in the action to enforce the lien. But the provisions of this section allowing the substitution of a bond or the deposit of cash in place of the lien do not extend the lienor’s rights. The lienor has no claim against either the deposit or the bond unless it establishes that its lien is valid and enforcible. Berger Mfg. Co.v. City of New York, 206 N. Y. 24, 30; Milliken Bros., Inc., v. City of New York, 201 id. 65, 74, 75; Fitzpatrick v. Devlin, 81 Misc. Rep. 556. The question as to the validity of the plaintiff’s lien arises upon these admitted facts. The plaintiff’s materials were delivered to the contractor and were used in the building; the contractor failed to complete the building and it was completed by the surety on the contractor’s bond, which had been given as required by the contract, this bond containing' the provision that the surety would,, if requested so "to do by the ."state, fully perform and complete the work covered by the contract if for any cause the contractor failed to do so; the surety at first refused to complete the building, but later, upon the insistence of the state, did so under this provision *724in the bond. The surety has received large payments from the state on account of the work, and it has cost the surety far more than the amount of the plaintiff’s lien in addition to the contract price to complete the work. The plaintiff’s lien was not filed at the time the surety undertook the completion of the building (though it was filed within the time allowed by law), but the surety had notice at that time that the plaintiff claimed to have furnished material for which it had not been paid. The claim that the surety completed under a separate contract with the state and not as surety for the original contractor cannot prevail for the stipulation in evidence states that the surety “ under and pursuant to the terms and conditions of said bond entered upon the performance of said contract, ’ ’ etc., and that the surety 1 ‘ began the performance of so much of the work in connection with the contract * * * as had not theretofore been performed by the contractor because under ■ its bond it was required to do so upon the demand of the State of New York.” So.it is conclusively determined that the work was completed by it as surety, and the ques-. tian is whether this gives the plaintiff the right to enforce its lien. It, of course, is conceded that upon the failure of the contractor to complete the work and the forfeiture of the contractor’s rights under.the contract no money thereafter became due to the contractor hereunder, and if the state made a new con-. tract for the completion of the■ work the plaintiff’s lien would not be. enforcible. Herrmann & Grace v. Hillman, 203 N. Y. 435; Wexler v. Rust, 144 App. Div. 296; Upson v. United Engineering & Contg. Co., 72 Misc. Rep. 541; Johnson Service Co. v. . Hildebrand, 149 App. Div. 680; American Radiator Co. v. City of New York, 177 id. 578. These are some of the authorities relied upon by the defendants, but they do not cover the facts as here pre-. *725sented. In none of them was the work completed by an assignee or surety of the contractor. When it is completed by such an assignee or surety it is deemed to be completed by the contractor, for the work is completed under the original contract and not under any new or different agreement. And in such cases a materialman who had a claim against the contractor could enforce it by a lien against the contractor’s assignee or -surety. Harley v. Mapes-Reeves Const. Co., 33 Misc. Rep. 626; Smith v. Lange, 81 App. Div. 192; Maneely v. City of New York, 119 id. 377. The defendants claim that these cases are distinguishable in that either the liens .were filed before the surety undertook to complete the work or that the surety’s undertaking of the work was voluntary. But the time of filing the lien is immaterial so long as it is filed within the time provided in the statute. Nor is it necessary that the surety should know of the claim in question in order to make it valid, though as matter of fact in the case at bar the surety did have such knowledge. The theory and underlying principles of the authorities are that the surety stands in the place of the contractor and merely carries out his agreement, and so takes it subject to whatever burdens the contractor would have had to bear. And in Smith v. Lange, one of the cases cited, one of the liens was not filed until after the surety had undertaken the work. So long as the surety in fact undertook the completion of his principal’s contract it seems to make no difference whether it was done voluntarily or otherwise. The fact that it was undertaken is the determining element. But in the case at bar the action of the surety" was voluntary. While at first the surety objected to do it, it did finally undertake it. And this was under the provision of the bond which it had executed whereby it had obli*726gated itself to do that very thing, and the execution of that bond was certainly a voluntary act on its part. The plaintiff is entitled to judgment, with costs.
Judgment for plaintiff, with costs.