In 1897 the defendant Robbins purchased "at a foreclosure sale a leasehold interest in Certain premises ón Niagara street in the city -of Buffalo. Robbins was then the manager of the Ellicott Square Bank in that city and acquired title to the premises on behalf of that bank, which paid in cash over $1,800 on the purchase price of the premises at the time. Robbins, immediately upon becoming vested with the legal title, and in accordance with an arrangement' then made, gave his bond accompanied by a mortgage on these *247premises to secure the payment of $5,000 loaned to him by Ethan H. Howard, the mortgagée. At the same time the bank .gave to Bobbins its written undertaking to pay the said bond and mortgage and to protect him from any liability on account thereof.
On March 21, 1888, he conveyed the premises to the bank by ■quitclaim deed. By deed dated September 14, 1899, but not Acknowledged or delivered until November of that year, the bank ■conveyed the premises to Harriette E. Jones who by a clause in the ■conveyance assumed the payment of the mortgage. On November' D, 1899, Harriette E. Jones executed a mortgage on these premises -to Mary H. Ney to secure the payment of $2,000, and on that day the mortgagee assigned the mortgage to the Third National Bank of Buffalo which still holds it.
The holders of the first mortgage commenced- this action to foreclose the same,, asking for judgment for deficiency against the ■defendant Bobbins. The action was prosecuted to judgment and the premises were advertised for sale pursuant to the judgment on March 29, 1901. On the twenty-eighth day of March the defendant, the Third National Bank, paid the amount of the judgment and obtained an assignment of the same from the plaintiffs and declined to sell the property. The defendant Bobbins insisted on the sale of the property and offered to pay the amount of the judgment and take an assignment thereof, but the Third National Bank refused to assign the same, as did the attorney for the holders of the mortgage, to whom a like offer was made to pay the judgment and take an assignment thereof. The leasehold is subject to the payment of rent to the owners of the fee, and to provide for this and also to meet the taxes accruing during the pendency of this appeal a receiver was appointed.
The lease has nearly fifteen years of life and the revenues are valuable, and the Third National Bank insists that it can apply the same on its second mortgage until paid and still retain the judgment, for the payment of which the defendant is personally liable. Inasmuch as the value of the leasehold will materially lessen as the ■expiration of the term of the lease approaches, and the judgment will continue to increase by accruing, in terest, it is very important to the respondent that his rights be determined.
The respondent contends that a sale of the premises should be *248ordered pursuant to the judgment, or an assignment of the same be made to him upon payment thereof, or else that he be relieved from any personal liability for its payment, to each of which the' appellant refuses to accede.
When the bank assumed the payment of the bond and mortgage it became the primary debtor and Robbins its surety. This is ele_ meiitary. (1 Wilt. Mort. Forec. § 223; Jones Mort. [5th ed.] § 741.) It is equally fundamental that the land or the leasehold must first be resorted to before any- enforcement can be had -upon the-covenant or agreement of assumption. The grantee' or person assuming the payment of a mortgage is liable for any deficiency which may exist after the application of the avails of the sale pursuant to the judgment upon the mortgage debt. (Thomas Mort. [2d ed.] § 577.) In the present, case, therefore, Robbins can obtain no redress against the Ellieott Square Bank upon its agreement to indemnify and' save him harmless until the extent of the harm he has'suffered has been measured and ascertained by the sale of the land and payment of the avails in diminution of the judgment.
If the Ellieott Square Bank is liable on its agreement to Robbins,, then Harriette E. Jones is liable also on her assumption of the mortgage in the conveyance to her. Liability under an assumption clause is based upon the personal liability of the person for whose-benefit it is given. The contract is between the grantor and grantee and is one of indemnity, and if there is no danger, no liability to-the grantor, then there is no occasion for indemnity. ■ This principle is thoroughly settled by many adjudications in this State.. ( Vrooman v. Turner, 69 N. Y. 280; Wager v. Link, 134 id. 122.)
" But while the mortgagee is a stranger to the covenant or agreement to pay the mortgage, it inures to his benefit on the principle that the Security taken by a surety for his protection can be reached by the principal creditor even though he was not aware of its existence. (Garnsey v. Rogers, 47 N. Y. 233.) It is contended in the present case that the agreement between the Ellieott Square Bank and Robbins was a secret agreement and unknown to Harriette. E, Jones, and hence her assumption does not render her personally liable. It is also urged that tlie Third Rational Bank by an examination of the record would have found nothing upon .which to-hinge any personal • responsibility of the Ellieott Square Bank, and. *249therefore, could not know that Robbins was a surety and the bank the primary debtor. The agreement was not secret in the sense that it was concealed or hidden from any one. It was a writing entered into pursuant to a formal resolution of the board of directors of the bank, but there was no occasion to blazon it forth. Whether public or private, recordable or non-recordable, known or unknown to the subsequent grantee, makes no difference to one who has personally assumed the payment of the mortgage debt. The Ellicotfc Square Bank and Robbins had a right as between themselves to regulate their liability. Primarily they were the only parties interested in this agreement, and if it was valid and binding between them it was of sufficient strength to support an assumption of -the mortgage by the subsequent grantee. The test is, was the bank liable for the payment of the mortgage ? If so, then the undertaking by Harriette E. Jones was enforcible and there was no hiatus of personal liability in the chain of conveyances. Even a parol agreement by the grantee to pay a mortgage for which the grantor is personally responsible is enforcible. (Taintor v. Hemmingway, 18 Hun, 458; affd. on opinon below, 83 N. Y. 610; Jones Mort. [5th ed.] § 750; Thomas v. Dickinson, 12 N. Y. 364; Remington v. Palmer, 62 id. 31.)
In Wager v. Link (134 N. Y. 122) Jennie and Edward Sully gave a mortgage upon premises owned by them as collateral security to their bond accompanying the mortgage. Afterward they conveyed the premises to one Kellogg by quitclaim deed, which contained no covenant to pay the mortgage. Later on Kellogg, the owner of the premises, gave his bond to the mortgagee of the Sully mortgage, covenanting to pay whatever of the mortgage debt remained unpaid after the obligee' had exhausted his remedy against the premises. Kellogg conveyed to Link, who assumed the payment of this mortgage. The bond of Kellogg was nuc recorded and Link did not know of its existence. The referee held that he was not personally liable on the assumption clause, and the General Term sustained the referee. The ground of the decision of the General Term was the facts above recited, showing the absence of knowledge by Link of the bond of his grantor, and as the deed contained no assumption clause he had a right to believe that this grantee, his immediate grantor, was not personally chargeable with the payment of the *250mortgage. The court at G-eneral Term (58 Hun, 272) cited the ease of Vrooman v. Turner (supra) and kindred cases to uphold its decision., Upon appeal to the. Court of Appeals the judgment was reversed and Link held liable. upon his assumption covenant. The court held that neither the fact he was not aware of the bond Kellogg had given to the mortgagee, nor that Kellogg’s liability was by an instrument independent of the conveyance to him, did npt exonerT at.e Link... After a sale of the premises the pase was again before the Court of Appeals (150 N. Y. 549). The defendant Link insisted that the decision on the former appeal adjudging that the covenant in his deed inured to the advantage of the holder of the mortgage.“ is a departure from, or at least an extension of the doctrine of equitable subrogation as heretofore understood and applied.” The court disagreed with this contention, and after discussing the proposition says (p., 555): “This bond, although-given subsequently to his acquiring the title to the land, was executed and delivered before .his conveyance to Link, and it does not admit of doubt that it .created' an obligation on the part of- Kellogg which could have been enforced in the present action, if the plaintiff had made Kellogg a party, and sought relief against him on the bond. When Kellogg took the covenant from Link he had an interest to protect himself against bis. liability on the bond. It was., it is true;- a personal covenant between Kellogg and Link. But it is generally true-in cases of assumption clauses in deeds, that the covenant is.in form between the grantee and grantor only; but where the grantor is bound for the mortgage debt, then equity treats, it as a covenant of indemnity to the grantor and the grantee as a surety for the grantor against his liability for the debt, of which relation the creditor may avail himself under the general principle adverted to. This beneficent principle prevents unnecessary litigation and appropriates the security to reinforce the original obligation according to manifest justice and equity. It is urged that the fact that Kellogg’s liability was not created by his deed from the mortgagors, but by a subsequent and independent transaction between, him and the .plaintiff, fenders the doctrine of Halsey v. Reed (9 Pai. 446) and -the cases following it inapplicable. It is true that most of the cases in which the principle • has; been applied in our • courts'- have been- cases where the covenant to assume and pay the mortgage was contained in the *251■deed conveying the premises. But the principle that the creditor may avail himself of the covenant does not rest upon the fact that it was contained in or was cotemporaneous with the conveyance of ' the land. The point to be determined in each case was whether the grantor in the deed had incurred a personal liability to pay the debt. If he had, it was wholly immaterial whether the liability was created by a covenant in his deed or by an independent writing. It was necessary to establish his liability in some way, for, if he was under no liability, the covenant of his grantee did not place the latter in the position of surety for the grantor, and the grantor being under no liability to the creditor the covenant could not inure to his benefit. The deeds in those cases were only important because they contained the personal covenant necessary to create the liability. But a bond or other creditor who has no security by mortgage, but only the ■ personal liability of the obligor or principal debtor, may, for the same reason as in mortgage cases, avail himself of an indemnity held by the obligor or original debtor from a third person against his liability. So, also, the fact that Kellogg assumed no liability to his grantors for the mortgage debt, or otherwise by any agreement with them, is immaterial. He incurred a liability by his bond to the plaintiff subsequently givén, and when he conveyed to Link he imposed upon him the primary duty to discharge that obligation as a part consideration for the conveyance.”
While it appears to me that the authorities cited effectually dispose of the' contention that Harriette E. Jones was not liable because the liability of the bank depended upon an agreement which may not have been known to her and which was not recorded, there is another suggestion which is equally potential. By assuming the payment of the mortgage in the conveyance a. clear intention was manifest on her part to become liable for any deficiency which might arise. This recital in the deed for whatever it was worth was binding upon subsequent incumbrancers or purchasers. It was notice to them that she had assumed the payment of the mortgage, and it was incumbent upon them to ascertain what basis there was for this assumption of liability. They were put upon their inquiry. They must have realized that the assumption clause was not inserted in the conveyance as an idle ceremony. They could not ignore it or treat it as surplusage.• If they expected to be relieved of any *252personal responsibility founded upon a break in the chain of those liable for the payment of the mortgage debt, they must be certain that their premise was correct and the break existed. This is especially true when it is evident that personal responsibility may be made effective by an agreement separate from the conveyance and not recorded. The Ellicott Square Bank was located in the city of Buffalo, as was also the appellant, and Harriette E. Jones also resided in that city. The slightest diligence on the part either of the appellant or the grantee, Harriette E. Jones, would have apprised them of the existence of the agreement by which the, Ellicott Square Bank became- liable for the payment of this, mortgage.
If these views are correct, Robbins was entitled, upon payment of the bond and mortgage, to compel its assignment to himself. The land was the property primarily to be used to meet the indebtedness, but Robbins was personally liable to the plaintiffs on his bond, and while as to the Ellicott Square Bank he was a surety and it the principal debtor, yet the plaintiffs might maintain an action at law on the bond, or hold him primarily liable for any deficiency accruing on the sale.
It. is urged that the holder of the second mortgage had the right, as junior incumbrancer, to pay the mortgage and require its assignment, or, if not assigned, it would be subrogated to all the rights of the plaintiffs. That principle ordinarily obtains; but the rights, of the holder of the second mortgage are certainly not superior to those of Robbins. The doctrine of subrogation is available to any one who pays a debt for which he is responsible to the creditor, but who among other debtors is secondarily liable. If there had been no assumption by Harriette E. Jones or the Ellicott Square Bank, Robbins could have paid the first mortgage and compelled an assignment to hipa, or, if paid without assignment, he would have been substituted to the rights of the holders of the mortgage. Whether his grantees were personally liable or not, he could insist that the land should be the fund out of which the mortgage debt, was to be paid, as far as it would meet the indebtedness. The doctrine of sub-, rogation is founded on “equity and justice,” and a junior incunir. brancer cannot successfully assert its adoption where it will be to, the disadvantage of one whose rights are superior to those it' *253possesses. A third mortgagee may pay the first lien and stand in the place of the first mortgagee, but he may not apply the income accruing from the property in payment of the third lien to the exclusion of the second mortgage. If the contention of the appellant is correct, it has obtained by its assignment of the mortgage in suit greater rights than the plaintiffs possessed. With the plaintiffs the holders of the mortgage, Robbins could pay the lien and compel its assignment to him and require that the rents be applied toward its extinguishment, but the appellant contends that this right which is valuable to him has been lost because it has purchased the mortgage. The Third National Bank by its assignment acquired whatever rights the mortgagee or the judgment creditors possessed and no more. The rights Robbins had when the judgment was held by the plaintiffs still inure to him. They cannot be cut off or impaired against his protest. The appellant acquired its lien with knowledge of the first incumbrance. It knew that the land must first be- devoted to the extinguishment of that lien. It knew that the first mortgage was collateral security to the bond given by Robbins. It could not assert the principle of equitable subrogation to the detriment of Robbins whose rights were inherent in that first obligation before the second mortgage had any existence. The injustice of the appellant’s position is obvious. It expects, under its assignment, to apply the rents to the payment of its mortgage, a second lien, and still hold- Robbins liable for the first mortgage with its accumulation of interest while the value of the leasehold is constantly depreciating. There is no principle of equity which will uphold that transaction. The enforcement of this doctrine would make the second mortgage the better security.
The point is made by the appellant’s counsel that the judgment in the foreclosure action is a bar to the claim of the respondent, that as between him and the Ellicott Square Bank he is only secondarily liable. The complaint was the usual one in a mortgage foreclosure action and set out the bond which respondent gave and to which the mortgage was collateral and asked for judgment for deficiency against him. To this he had no defense. The allegations were strictly true. He was liable to the plaintiffs on his bond. The judgment is an estoppel in that it determined that he was liable on his bond-to the plaintiffs and the verity of that judgment to its full *254est extent he is not seeking to impair. If the plaintiffs were content to hold Robbins only for the deficiency, instead of bringing-in the Ellicott Square Bank and Harriette E. J ones, that was their privilege and called for no interference by appellant or Robbins. If one holds an obligation against half a dozen persons who are severally liable for its .payment,..he is not obliged to-sue them all. If, among themselves, some are sureties and others principals, the fact that the person to whom they are all liable recovers against one or more does not settle their rights among themselves. Furthermore, the action was proceeding exactly as the respondent desired. The sale under the judgment would establish the extent of .the deficiency which he must pay and concurrently would fix the liability of the Ellicott Square Bank to him. He desired the judgment enforced and it is the intervention of the appellant to prevent this, of which he is now complaining.
It is contended by the appellant that this matter should not be disposed of on a motion. The facts were undisputed. It is made in a pending action. So far as the record shows, there was no request to the county judge tó order a reference to ascertain the facts. Of his own motion he might have ordered this to be done but as the facts were undisputed he doubtless deemed it unnecessary. In any event, there is no. necessity for this court to pursue that course.
The order should be affirmed, with ten dollars costs and disbursements of this appeal.
Williams and Hisoock, JJ., concurred; McLennan, J., dissented, in opinion, in which Adams, P. J.. concurred on first ground stated .therein.