
    Robert S. Brown and John J. McKenna, Appellants, v. Frederick W. Danforth, Respondent, Impleaded with William J. Comerford and Others.
    
      Action to foreclose a mechanic’s lien— a prior mortgagee is not a proper pa/rty to it..
    
    A complaint in an action to foreclose a mechanic’s lien on certain premises is; properly demurrable, as not stating a cause of action against a prior mortgagee of such premises who is joined therein as a party defendant, where it alleges that, three mortgages were executed thereon by the owner and recorded prior to the filing of said lien and demands that the mortgagor and all persons claiming under him be foreclosed of all equity of redemption or other interest in the premises, and asks for a deficiency judgment against the mortgagor.
    Under section 17 of chapter 343 of the Laws of 1885 (The Mechanics’ Lien Law) only those can be made parties to such an action who are subsequent incumbrancers by mortgage or otherwise.
    Appeal by the plaintiffs, Robert S. Brown and another, from a judgment of the County Court of Erie county in favor of the defendant Frederick W. Danforth, entered in the office of the clerk of the county of Erie on the 21st day of June, 1898, upon the decision of the court sustaining the said defendant’s demurrer to the plaintiffs’ complaint.
    
      George N. Bauder, for the appellants.
    
      August Becker, for the respondent.
   McLennan, J.:

The action was commenced on the 24th day of July, 1896, to foreclose a mechanic’s lien, which was filed as against the premises owned by the defendant Comerford on the 24th day of June, 1896.

The complaint alleges the filing of such lien, and then alleges that, prior to the time when such lien was filed by the plaintiff, the defendant Comerford made and executed three several mortgages, which were all made, executed and recorded prior to the filing of such lien. The complaint demands judgment that the plaintiff be ad judged to have a lien upon the premises in question, and that the defendant Comerford, and all persons claiming under him, be foreclosed of all equity of redemption or other interest in the premises.

Thi/rd. That a determination may be had as to the validity of the liens and claims set forth in the complaint, and that an adjudication may be had as to the rights of the parties to the action.

Fourth. That the interests of the defendant Oomerford be sold as provided by law, and that from the proceeds of the sale the plaintiffs be paid the amount of their lien, with costs and expenses of the sale.

Fifth. That the plaintiffs have judgment against the defendant Oomerford for any deficiency that may remain due them after such sale.

The complaint was demurred to by the defendant Danforth, upon the ground that it did not state facts sufficient to constitute a cause of action as to him.

Section 17 of chapter 342 of the Laws of 1885, which is known as the “ Mechanics’ Lien Law,” provides :

“ Any person or persons, firm or firms, corporation or association filing a notice of lien, or the assignee of such person or persons, firm or firms, corporation or association, after the filing thereof shall be the plaintiff in such action. The plaintiff must make the parties Avho have filed notice of liens against the property, as well as those who have subsequent liens and claims by judgment, mortgage or conveyance, parties defendant.”

In the case of Alyea v. Citizens’ Savings Bank (12 App. Div. 577) the court say, per Rumsey, J.:

“The statute regulating actions to foreclose mechanics’ liens, while it is remedial in its nature, and is to be so interpreted as to permit the plaintiff to obtain all the relief which he can have under its provisions, nevertheless prescribes a scheme for the foreclosure of liens which is obligatory upon the courts and which must be observed by them. When the action is brought in a court of general jurisdiction, the court having acquired the right to act, pursuant to the statute, may give any relief which it might give in any other action to the extent of its jurisdiction. But so far as the statute has given . directions as to procedure in the action those directions are binding upon the courts. The section (17), which has been cited above, contains certain directions as to procedure in the action, and, among other things, it prescribes who shall be parties to it. It is to be noticed that the only persons who can be made parties are those who are subsequent incumbrancers by mortgage and otherwise.” To the same effect see Schillinger Cement Co. v. Arnott (152 N. Y. 591); Jacobie v. Mickle (144 id. 237).

The judgment entered upon the decision of the trial justice sustaining the demurrer of the defendant Danforth should be affirmed, with costs.

All concurred, except Ward, J., not voting.

Interlocutory judgment affirmed, with costs, with' leave to amend the complaint upon payment of the costs of the demurrer and of this appeal.  