The complaint, in substance, alleges that during the months of July and August, 1894, the plaintiff sold and delivered unto the defendant Sarah E. Tucker lime, bricks and lath with which to erect seven buildings on a lot of land in the city of Brooklyn (describing the premises), and that such property was sold and delivered at the prices agreed upon between the defendant Tucker and the plaintiffs, which amounted in the aggregate to $528.49, no part of which has been paid, and that the same is now due and owing; that on the 13th day of August, 1894, and within ninety days after the furnishing of the materials as alleged, the plaintiff filed in the office of the clerk of the county of Kings a notice of lien in the form and manner prescribed by law; that on the 29th day of August, 1894, the defendant Tucker filed with the clerk of that county a bond duly executed by her, with the defendants O’Keefe and O’Hara as sureties, in the amount fixed by the Supreme Court, “ conditioned for the payment of any judgment which might be rendered against the said property ” in any action brought by these plaintiffs; that the bond was approved by a justice of the Supreme Court, and, after filing, an order was duly made by the court discharging the plaintiff’s lien. The complaint then demands judgment against the defendants for the sum of $528.49, with interest, and that the lien be declared a valid lien until its discharge as aforesaid, etc.
The defendants O’Keefe and O’Hara demur upon the ground that the complaint does not state facts sufficient to constitute a cause of action. It is contended on behalf of the respondents that they being sureties upon the bond are not *247primarily liable, and that they cannot be charged upon the bond until the plaintiffs have exhausted their remedy by action against the defendant Tucker and have recovered a judgment of foreclosure in form against the property described in the notice of lien.
On behalf of the appellants it is insisted that an action at law can be maintained upon the bond without first resorting to an action to foreclose the lien upon the property. Upon these questions the courts below have differed. (Sheffield v. Early, 57 State Reporter, 146 ; Lawson v. Reilly, 13 Civ. Pro. R. 290; Scherrer v. Hopper, 45 St. Rep. 638; Highton v. Dessau, 46 id. 922; Brandt v. Radley, 23 N. Y. Supp. 277; Heinlein v. Murphy, 51 St. Rep. 435; Kruger v. Braender, 3 Delehanty, 275; Garland v. Van Rensselaer, 54 St. Rep. 74 ; Cunningham v. Doyle, 5 Delehanty, 219.)
We find obstacles which prevent us from indorsing either contention.
After a lien has been discharged it may be difficult to obtain a judgment against the premises, for the owner has but to interpose the order discharging and vacating the lien in order to defeat the recovery of such a judgment.
An action at law could not well be maintained upon the bond, for the reason that the right of the plaintiffs to maintain the action might depend upon the priority of their hen and of there being a sufficient sum unpaid upon the contract with the owner with which to pay their claim, involving rights and equities of other persons who could not properly be made parties in an action at law upon the bond.
It appears to us that the proper remedy is clearly pointed out by the statute. It provides that a claimant who has filed a notice of lien may enforce his claim against the property by a civil action in the same manner and form of instituting and prosecuting an action for the foreclosing of a mortgage upon real property. That the plaintiff must make the persons who have filed notices of liens against the property, as well as those who have subsequent liens and claims by judgment, mortgage or conveyance, parties defendants ; and the court in which the *248action is brought is required to determine the equities of all the parties to the action, the counterclaims or set-offs, and the priority and amount of each lien chargeable against the land. (Laws of 1885, chap. 342, secs. 7, 8 and 17.) The action is in equity, in which the rights and equities of all the parties interested must be determined. The statute then further provides for the discharging of the liens before and after action has been commenced. At any time after the action has been commenced the owner of the property may make an offer, in writing, to pay into court any amount stated in the offer, or to execute and deposit any securities or papers which he may describe in discharge of the lien. If the offer is accepted the court in which the action is pending may make an order, upon the compliance with the offer, discharging the lien, in which case the money or securities deposited “ take the place of the property upon which such lien or liens was or were created, and shall be subject to the same.” (Sec. 18.) It will be observed that here we have an express provision of the statute by which the money paid, or the securities deposited in discharge of a lien, shall take the place of the property and become subject to the lien in the place of the property.
Then follow further provisions for the discharge of the lien either after\pr before action brought, in which a bond with two or more sureties may be given by the owner in such sum as the court may direct, but not less than the amount claimed in the notice of lien “ conditioned for the payment of any judgment which may be rendered against the property.” (Sec. 24, subdiv. 6.) The conflicting views in the courts below arise out of the construction of this provision. But it appears to us that the meaning is apparent. The sureties in the bond intended, and must be understood as undertaking, to pay the amount which it should be adjudged was due and owing to the plaintiffs and which was chargeable against the property by virtue of their notice of lien. In other words, the condition was for the payment of any judgment which might have been rendered against the property had not the bond been given. The bond, as we have seen, is given to *249discharge the lien. It is one of the proceedings provided for by the statute, and it was evidently intended that the bond should take the place of the property and become the subject of the lien in the same form and manner as is provided for in the case of the payment of money into court, or the deposit of securities under an order of the court after action brought. ( Ward v. Kilpatrick, 85 N. Y. 413-418.)
If this is so the practice is simple. The action is in equity brought under the statute in which all of the persons interested, including the sureties upon the bond, are made parties. The complaint is in the usual form, with the exception that it should allege the giving of the bond and the discharging of the lien, so far as the real estate is concerned, and instead of .asking judgment for a sale of the premises it should demand relief as against the persons executing the bond for the amount that should be determined to be payable upon the lien. The court then upon the trial can determine the rights and equities of all of the parties and award the final judgment contemplated by the statute.
The complaint in this action alleges that the material was sold to the owner of the premises. It does not appear that there was any contractor, sub-contractor or other lienor who should he made parties. So far as the appellants are concerned the complaint states all the essential facts required, and it is not apparent upon the face thereof that other persons have equities which are required to be determined herein. We think the complaint is sufficient and properly states a cause of action.
The judgment of the General Term and that of the Special Term should be reversed, with costs in all the courts; but with leave to the defendants to withdraw the demurrer and answer over within twenty days, upon payment of the costs of the demurrer and of the appeals in this court and the General Term.
All concur.
Judgment reversed.