Frankenthaler, J.
Defendants Margolies and Margolies & Co. move to dismiss the cross-motion brought by defendant Keister against defendant Kelley, and also to cancel the Us pendens filed by plaintiff in so far as it may inure to the benefit of Keister. The second branch of the motion is consented to by Keister, but he opposes the dismissal of his cross-action as against Kelley. The theory of the motion is that the filing of a bond by the moving defendants, the contractors, to discharge the mechanic’s lien claimed by Keister obviated the necessity of further action on the latter’s part against Kelley, the owner of the property. The fact that the motion is not made by Kelley, but by the other defendants, would seem in itself to furnish sufficient reason for its denial. However, there are more substantial grounds compelling that disposition of this application. The bond filed by the defendants Margolies and Margolies & Co., in accordance with the provisions of section 19 of the Lien Law, was “ conditioned for the payment of any judg*895ment which may be rendered against the property for the enforcement of the lien.” (Italics mine.) In order to obtain a judgment against the property for the foreclosure of the lien it was still necessary for Keister, despite the filing of the bond, to continue with his cross-action for that relief. The only effect of the filing of the undertaking was to substitute the latter for the property itself. The action, however, still remained one to foreclose a lien and the obligation of the lienor to obtain a judgment of foreclosure persisted. (Morton v. Tucker, 145 N. Y. 244; Breen v. Lennon, 10 App. Div. 36; Sklar & Cohen Woodworking Co., Inc., v. Owen, 177 id. 796; Atlantic Terra Cotta Co. v. Rubenfield Const. Corp., 126 Misc. 279.) It is well established that the owner of the realty is a necessary party to an action for the foreclosure of a mechanic’s lien. (Lien Law, §§ 43, 44; Spitz v. Brooks & Son, Inc., 210 App. Div. 438; Maltby & Sons Co. v. Boland Co., 152 id. 596; Atlantic Terra Cotta Co. v. Rubenfield Const. Corp., supra; Von Den Driesch v. Rohrig, 45 App. Div. 526.) The filing of an undertaking to discharge the lien does not obviate the necessity of keeping the owner of the realty as a party to the action. Thus, in Harley v. Plant (210 N. Y. 405) an action had been commenced against the city and a contractor to foreclose a hen on funds in the former’s possession. The lien was discharged by an undertaking and the action proceeded to a judgment of foreclosure on the moneys due from the city to the contractor. The trial court directed that the action be discontinued as against the city on the theory that after the filing of the bond the city was no longer a necessary party. The Court of Appeals, however, thought otherwise, Collin, J., writing for the court as follows (at p. 409): “ Section 42 of the Lien Law authorizes the enforcement of the hen against the contractor hable for the debt and the funds of the municipal corporation by an action in the same-court and in the same manner as a mechanic’s lien on real property. Section 44 declares the necessary parties defendant in the action and section 43 makes apphcable to the action the provisions of the Code of Civil Procedure relating to actions for the foreclosure of a mortgage upon real property, except as otherwise provided in the article of the Lien Law containing the sections already mentioned. For obvious reasons and by virtue of the statutory provisions, the contractor Guthy and the city of New York were necessary parties to the action to foreclose the lien. (Lien Law [Cons. Laws, ch. 33], sect. 44; Hawkins v. Mapes-Reeve Const. Co., 178 N. Y. 236.) The contents of the judgment reveal that they were parties, and the provision of the judgment discontinuing the action as to the city of New York, although erroneous, did not affect the establishment *896of the hen by the judgment.” (Italics mine.) Similarly, in Maneely v. City of N. Y. (119 App. Div. 376) the Appellate Division, Laughlin, J., writing the opinion, said at page 393: “ The same parties are necessary to the foreclosure of a lien, after a bond or undertalcing has been substituted for the fund, as to ah lienors, as if the fund had not been paid over.” The motion is, therefore, granted only to the extent of cancehng the lis pendens in so far as it may inure to the benefit of Keister. The other branch of the motion is denied. Settle order.