This action was brought to foreclose a mortgage upon real property, and the judgment demanded in the complaint was for the usual relief granted in such action, viz., that the property be sold, and the proceeds applied to the payment of the amount due to plaintiff, and that the defendant pay any deficiency. The case was tried, and the plaintiff recovered a judgment as prayed for, which was affirmed by this court, (6 N. Y. Supp. 144,) and subsequently by the court of appeals, (28 N. E. Rep. 255, mem.) It appears that there was also a mortgage upon the same premises, which was a prior lien to the mortgage foreclosed in this action, and that, pending the appeals from the judgment in this action, such prior mortgage was foreclosed, and the property sold under a judgment in the action brought for that purpose, and that there was a surplus over the amount required to the *370amount due on such prior mortgage which was paid to the plaintiff, leaving a balance due to the plaintiff of $3,081.28, for which sum this court at special term directed a deficiency judgment to be entered against the defendant. In determining this question it is important to bear in mind the distinction between this action and an action upon the defendant’s bond, to secure which the mortgage was given. An action upon the bond would be an action at law, to which the plaintiff would be entitled to a trial by jury. This action is in equity, and the court of equity obtains jurisdiction because the aid of that court is necessary to direct a sale of the mortgaged property, so that the hen of the mortgage can be enforced; and, having acquired such jurisdiction, the court tiien gives to plaintiff all the relief to which he is entitled, including a judgment for any deficiency which would arise because of the insufficiency of the proceeds of such sale to pay the amount due to the plaintiff. An action to foreclose such a mortgage, and the power of the court to order a personal judgment for sucli deficiency, are regulated by sections 1626-1637 of the Code. By section 1626 it is provided that, in an action to foreclose a mortgage upon real property, if plaintiff becomes entitled to final judgment, it must direct the sale of the property mortgaged; and by section 1627, that any person who is liable to the plaintiff for the payment of a debt secured by a mortgage may be made a defendant in the action, and, if he has appeared, or has been personally served with the summons, the final judgment may award payment by him of the residue of the debt remaining unsatisfied after the sale of the mortgaged property and the application of the proceeds pursuant to the directions contained therein. This section contains the only provision by which the court is authorized to award judgment in an action of foreclosure for the recovery of the money against any defendant. It seems to me clear that in an action to foreclose a mortgage no judgment could be entered except one directing the sale of the property. If, before the entry of final judgment, the property had been sold under the foreclosure of the prior lien, so that the lien of the mortgage sought to be foreclosed had been destroyed, no judgment could be entered in favor of the plaintiff for the amount due upon the bond, because, the lien sought to be foreclosed having been destroyed by virtue of the foreclosure of the prior lien, there could be no sale of the property mortgaged, as provided in section 1626. The jurisdiction of a court of equity, which was acquired in order to sell the property and apply the proceeds to the payment of the mortgage, ended when such a sale was impossible, and there could be no judgment against the defendant for the residue of the debt remaining unsatisfied after a sale of the mortgaged premises and the application of the proceeds, as there could be no sale, and no proceeds to apply. Nor does the fact that, prior to the destruction of the lien of the mortgage, to foreclose which the action was brought, a judgment had been entered directing the sale of such property, give the court power to direct by a subsequent order a personal judgment against a defendant for the whole or any part of the amount due on the bond to secure which the mortgage was given. This would be turning an equity action into a common-law action when the facts which alone gave the court of equity jurisdiction had ceased to exist, and would be contrary to the provisions of the only judgment that the court has authority to enter in such an action. The judgment as actually entered in the action provides that, if the proceeds of the sale thereby directed be insufficient to pay the amount and interest, the defendant pay to plaintiff the amount of such deficiency. It is only in the event of the sale, and a failure of the proceeds realized therefrom to pay the amount due, that the defendant was ordered to pay anything to plaintiff; and, there having been no sale of the premises in this action, according to the terms of the judgment there was nothing that the defendant was required to pay plaintiff; and, as before stated, the court had no power in this action to grant any other personal judgment against the defendant except the one contained in the judg*371merit, and which does not in terms make the defendant liable for the amount of the bond until there has been a sale of the mortgaged premises under the judgment, and the application of the proceeds realized upon such sale of the amount due on plaintiff’s mortgage. It is evident that Mr. Justiee Barrett, who granted this order, did so only because he considered himself bound by the case of Siewert v. Hamel, 33 Hun, 44, and it would seem that that case was an authority for the order. The contrary view, however, has been taken by this court in the case of Loeb v. Willis, 22 Hun, 508. In the opinion in the case of Biewert v. Hamel, supra, no reference is made to the sections of the Code under which the judgment in this action was granted; and, as it is clear that the court had no power to grant the order, I think we should follow the earlier case of Loeb v. Willis. It follows, therefore, that the order appealed from should be reversed, and the motion below denied. As, however, the application was justified by the case above cited, it should be without costs. All concur.