Manifestly the purchase price of the undivided quarter conveyed by May E. White to Fred L. White has never been paid by him to her, or to her appointee for her benefit. When the conveyance was made by her, her deed contained the covenant on the part of her grantee, Fred L. White, that the purchase price to the extent of $2,500 should be paid to her creditor, the plaintiff, who held her personal covenant as well as her mortgage to secure the sum upon her undivided half of the premises mentioned in the mortgage. As soon as Fred White accepted the conveyance from his sister, May E. White, with the conditions and covenants as to payments of the purchase price mentioned in the deed, the plaintiff became entitled to receive the purchase money mentioned in said deed, and to main*660tain an action against Fred L. White for the payment of the purchase price, inasmuch as May E. White was personally liable to the plaintiff for the debt secured by her to the plaintiff. Carrier v. Paper Co., 73 Hun, 287, 26 N. Y. Supp. 414; Vrooman v. Turner, 69 N. Y. 282; Lawrence v. Fox, 20 N. Y. 268; Pardee v. Treet, 82 N. Y. 389. It was said in Burr v. Beers, 24 N. Y. 179, and in Garnsey v. Rogers, 47 N. Y. 242, that the liability of the grantee to the mortgagee rested upon the equitable right of subrogation; and, in referring to that doctrine, Finch, J., says, in Gifford v. Corrigan, 117 N. Y. 264, 22 N. E. 756, viz.:
“It was held that, where the mortgagor acquired a new security for his indemnity against the debt which he owed to the mortgagee, the latter might, in equity, be subrogated to the right of his debtor; and, under the statute permitting any person liable for the mortgage debt to be made defendant, and charged with the deficiency in the foreclosure, the new covenant became available to the mortgagee.”
And the same judge, later on, in the same case, seems to approve of the suggestion of Andrews, J., given in the following language:
“After all, does not the direct right of action rest upon the equity of the transaction!”
The doctrine stated in Gifford v. Corrigan, supra, was approved and restated in Townsend v. Rackham, 143 N. Y. 522, 38 N. E. 731. See Gifford v. Corrigan, 105 N. Y., near the close of the opinion, at page 229, 11 N. E. 498. In Insurance Co. v. Aitken, 125 N. Y. 660, 26 N. E. 732, it was said that a covenant in a deed, whereby the grantee assumes and agrees to pay a mortgage after it has come to the knowledge of the owner of the mortgage, and has been adopted by him as security for his own benefit, “may not be released by the grantor without the assent of the mortgage creditor, and such a release is no defense to an action brought by the latter upon the covenant.” And in Post v. Railroad Co., 123 N. Y. 580, 26 N. E. 7, it was held that:
“An undertaking in a deed on the part of the grantee to perform certain acts becomes, on delivery of the deed to and acceptance by him, effectual as a contract on his part to perform the undertaking; ' and, upon refusal on his part to perform, an action for specific performance or for damage is maintainable.”
The performance of the covenant by Fred, the grantee in the deed, by payment to the plaintiff, would have been for the benefit of the grantor, as she had a legal interest that the covenant be performed in favor of the plaintiff. Durnherr v. Rau, 135 N. Y. 219, 32 N. E. 49. In the case in hand the covenant was entered into for the benefit of the grantor, and such benefit would inure to her by the performance, and it was, therefore, within the contemplation of the parties that a benefit would accrue to her by the performance of the covenant on the part of the grantee in the deed. In King v. Whitely, 10 Paige, 468, it was said that the principle of the cases “is that, in equity, the creditor is entitled to the benefit of all collateral obligations for the payment of the debt which a person standing in the situation of a surety for others has received for his indemnity, and to relieve him or his property from liability for such payment.” See Curtis v. Tyler, 9 Paige, 435; Halsey v. Reed, 9 Paige, 451. The *661lien for unpaid purchase money which accrued in favor of May E. White at the time of the conveyance was not waived, satisfied, or canceled by the covenant inserted in the deed which she made to her grantee, Fred L. White. 2 Washb. Real Prop. (3d Ed.) p. 90, § 16, (*507); Maroney v. Boyle, 141 N. Y. 462, 36 N. E. 511. May E. White did not expressly and consciously waive her lien for unpaid purchase money; on the contrary, she inserted a clause in the deed which she gave, requiring it to be satisfied by paying the same upon an indebtedness for which she was personally liable to the plaintiff. The effect of the stipulation in her deed to Fred was to render him personally liable, as well as the land which he received from her, to pay the purchase price therefor by applying it upon an indebtedness of hers to the savings bank, the plaintiff. The recitals in her deed to Fred, and the statement that the purchase price was unpaid, were, in effect, notice to his subsequent grantees or incumbrancers of the fact that the purchase money was to be paid to the plaintiff, and that at the time she received the deed she had not paid therefor. Being notice of such facts to his subsequent grantees or incumbrancers, they are presumed to have been put upon inquiry, and, upon inquiry, to have ascertained the actual situation in respect to the nonpayment of the purchase price. Williamson v. Brown, 15 N. Y. 354; Pitney v. Leonard, 1 Paige, 461; Insurance Co. v. Halsey, 8 N Y. 272; Brush v. Ware, 15 Pet. 93; Jumel v. Jumel, 7 Paige, 591; Acer v. Westcott, 46 N. Y. 384.
Question of constructive notice was involved in McPherson v. Rollins, 107 FT. Y. 322, 14 FT. E. 411, and in the course of the opinion upon that question, it was said:
“As intending purchasers, they must be presumed to investigate the title, and to examine every deed or instrument forming a part of it, especially if recorded. They must, therefore, be deemed to have known every fact so disclosed (Acer v. Westcott, 46 N. Y. 384), and every other fact which an inquiry suggested by those records would have led up to.”
In Cordova v. Hood, 17 Wall. 1, it was held that, where a deed of land shows on its face that the consideration is yet “to be paid,” a second purchaser, who has notice of the deed, takes the land subject to the vendor’s lien, “unless such a lien has been in some way waived. In the case of such a deed it is the duty of the new purchaser to inquire; and, where inquiry is the duty, the party bound to make inquiry is affected with all the knowledge which he would have got had he inquired.” Russell v. Pistor, 7 N. Y. 171. Undoubtedly it is true that, if the trust company was a lienor or grantee without notice of the unpaid purchase money, and for a valuable consideration, it might maintain its right to the land as against May E. White, or her appointee. Maroney v. Boyle, supra It was said in Garson v. Green, 1 Johns. Ch. 308, that a vendor has a lien upon the estate sold for the purchase money while the estate is in the hands of the vendee, and that, prima facie, the purchase money is a lien, and it lies on the vendee to show the contrary. Camp v. Gifford, 67 Barb. 434. In Bradley v. Boseley, 1 Barb. Ch. 125, it was said that a person having an equitable lien upon land for the unpaid purchase money may apply to a court of *662equity in the first instance to enforce the lien without resorting to a suit at law to recover the amount. In Benedict v. Benedict, 85 N. Y. 625, it appeared that the plaintiff had sold lands to the defendant, for which he had not been paid, and that the purchase price remained due, and it was said, “Nothing more was needed to show that he had an equitable lien for such purchase price.” In Dubois v. Hull, 43 Barb. 26, it was held that a vendor’s lien upon the land sold, for the purchase money, can only be waived by taking collateral security, or by an express agreement to that effect; and it was said that the party disputing the lien must show that the vendor agreed to rest on other security, and to discharge the lien. The law presumes an intention on the part of the vendor to retain his lien for the purchase money, and imposes upon the purchaser the burden of proving the contrary. And in section 1231 of Story’s Equity Jurisprudence, it is said:
“So liens may be created on the purchase money due on the sale oí an estate, in favor of a vendee, if it is agreed that the money shall be deposited in the hands of a third person, to be applied in discharge of prior incumbrances, to the extent of such incumbrances; * * * for it is a general principle in equity that, as against the party himself, and any claiming under him voluntarily, or with notice, such an agreement raises a trust.”
In Seymour v. McKinstry, 106 N. Y. 230, 12 N. E. 348, and 14 N. E. 94, it was held that:
“The lien of a vendor of real estate for unpaid purchase money is good against the vendee and the whole world, unless waived or defeated by an alienation of the property by the vendee to the purchaser without notice.”
It seems to follow from the .foregoing views that the appointee of May E. White, the plaintiff, was properly required to exhaust the lien acquired by it upon the undivided fourth, and apply the proceeds of the sale thereof in liquidation of the mortgage held by it against the undivided half of the premises; and that such direction as was given at the special term and as has been carried in the judgment is in accordance with the principles of equity and justice. Thus the purchase price, which never has been paid, is to be asserted against the fourth before the rights of the trust company therein are asserted. May E. White’s equities, transferred to the plaintiff, her creditor, were prior in point of time. . A contrary rule would enable Fred White’s grantee to obtain the land without payment, and would work an injustice (if not a fraud) upon the rights of May E. White.
2. It is suggested by the learned counsel for the trust company that the relief accrued to May E. White could not be given in this action, and our attention is called to sections 521 and 1204 of the Code. In section 521 it is provided that a controversy between defendants shall not delay a judgment to which the plaintiff is entitled, unless the court otherwise directs. Inasmuch as no case containing the record of the proceedings at the trial is presented before us, we are not advised that any such question was raised upon the trial. If it was raised, it may be assumed the court directed the determination of the controversy between the defendants in accordance with the provisions of the section, and that *663proper relief was demanded in the answers, and that they were properly served on the several defendants. Ostrander v. Hart, 130 N. Y. 406, 29 N. E. 744. In section 1204 it is provided that judgment may be given for. or against one or more defendants, and that it may determine the ultimate rights of the parties on the same side as between themselves, and may grant to a defendant any affirmative relief to which he is entitled. In Smith v. Hilton, 50 Hun, 237, 2 N. Y. Supp. 820, a motion was made to strike out certain allegations in the answer, and it was granted upon the idea that the allegations were such as to present a new cause of action; and in delivering the opinion in that case, and commenting upon the sections of the Code, it was said:
“They were intended to follow the preserve the powers exercised by courts of equity in actions brought for their determination, as that was permitted and sanctioned by the law and practice previously existing. And by that practice, as well as by the language of these sections, the rights of the defendants to be determined between themselves must necessarily be those arising out of, or connected with, or resulting from the cause of action set forth and maintained by and in favor of the plaintiff.”
We see nothing in the case inconsistent with the course adopted on the trial of the action now before us. That case seems to be in harmony with Kay v. Whittaker, 44 N. Y. 565, where it was said that:
“Relief which defendants may have as against each other must be based upon the facts involved in the litigation of the plaintiff’s claim, and as a part of the adjustment of that claim, and not upon claims with which the plaintiff has nothing to do, and which are properly the subject of an independent litigation between such defendants.”
See Derham v. Lee, 87 N. Y. 599.
We are not persuaded that the appellant suffered any injury by having all the questions relating to the plaintiff’s mortgage, and the several rights and interests it has in the property that secures the same, determined in this action, inasmuch as Fred White and May E. White are parties to the suit, and were actors in the trial, and were heard in connection with the proofs given in regard to the appellant’s rights. We think the decision pronounced at the special term is in accordance with the rules of equity. Judgment affirmed, with costg.
MERWIN, J., concurs. MARTIN, J., not voting.