The effect of these several conveyances was to convey the legal estate of Russ and wife to Jones (or Thompson, the trustee for his use) and the equity of redemption to J. B. Batchelor, and imperfect equities, first to Carter, the plaintiff’s intestate, and then to Moore and Adams, the defendants.
*481The releases of Jones and Batchelor endorsed on the deeds from Russ and wife not being under seal did not convey the legal estate to Moore and Adams, but left it in Jones or Ins trustee. Linker v. Long, 64 N. C., 296. So that the deed of bargain and sale executed by Russ and wife to Moore and Adams passed only such an interest as the vendors had at the time, which was a subsequent equity. The purchaser of an equitable title always takes it subject to prior equities. It is only the purchaser of the legal title, without notice of a prior equity, who can take it against such equity, Winborn v. Gorrell, 3 Ired. Eq., 117, .But whether the estate conveyed by Russ and wife to Adams and Moore was legal or equitable, the mortgage to Carter had been previously executed and registered, and the -registration of a mortgage is notice to all purchasers from the mortgagor subsequent to such registration, not only of the existence of the mortgage, but of everything contained in it, which is as much an integral part of his title as if it had been inserted in his deed from the mortgagor. Parker v. Banks, 79 N. C., 480.
After the liens of Jones and Batchelor were put out of the way by releases, Garter acquired a first lien upon the lot. Russ and wife by their deed of mortgage to him were estopped from disputing his title, and Adams and Moore claiming title under them, especially-as they were affected with notice and acquired only an "equitable title, were also estopped. Gilliam v. Bird, 8 Ired. 280. Sikes v. Basnight, 2 Dev. & Bat. 157,
Whatever title Moore and Adams derived through their deed from Russ and wife, was subject to the equity of Carter. He had a lien upon the lot as a security for his debt, and the defendants must pay his debt before they can acquire the absolute estate. This then to all intents and purposes established between them the relation of mortgagor and mortgagee,
*482Having ascertained the relation of the parties to the lot in question, the next inquiry is, how shall the proceeds-of the sale be appropriated ? The whole of the lot was sold and-did not bring more than enough to satisfy Carter’s debt,The land in the unimproved state when Carter received his mortgage was worth only two hundred and fifty dollars) and improvements were' put on it by Moore and Adams after the conveyance to them, which enhanced its value at least one thousand dollars. Carter’s administrator contends that he is entitled to the whole of the proceeds, and Moore and Adams insist that by reason of their improvements they have a right to so much of the proceeds as the lot has been enhanced thereby.
This right to betterments is a doctrine that has gradually grown up in the practice of the courts of equity, and while-it has been adopted in many of the states, it is not recognized in others. But it may now be considered as an established principle of equity, that whenever a plaintiff seeks the aid of a court of equity to enforce his title against an innocent person, who has made improvements on land, without notice of a superior title, believing himself to be the absolute owner, aid will be given to him, only upon the terms that he shall make due compensation to such innocent person to the extent of the enhanced value of the premises, by reason of the meliorations or improvements, upon the principle that he who seeks equitj^ must do equity. Story's Eq. Jurisp. § 799; 2 Qreenleaf on Mor § 549'. But it was only in these cases where the right has been set up by way of defence that the courts have lent their aid. It had not been given to a party seeking affirmative relief, before the case of Bright v. Boyd, 1 Story Rep., where Judge Stokt? held, that a plaintiff, after a recovery at law against him of a tract of land by reason of illegality in the proceedings of an administrator to sell, under which he had purchased, could recover bjr bill in equity the value of lasting improve-*483anents put by him on the la&d. The case of Matthews v. Davis, 6 Humphrey 324, and Henry v. Polland, 4 Humphrey, 362, (Tenn.) soon followed and were to the same effect, relying upon Judge Stobf’s decision as authority. But these cases pressed the doctrine further than we have found it carried in any other state except in this. In the case of Albea v. Griffin, 2 Dev. & Bat. Eq., 9, which was a bill filed by the vendee for a specific performance of a contract for-the sale of land, and the defence was the act of 1819 avoid' ing parol contracts for the sale of land, Judge Gaston, giving the opinion of the court, says; “ Although payment off the purchase money, taking possession, and making improvements, will not entitle the vendee to a specific execution of a parol agreement for the sale of land, yet he has¡ in equity a right to an account of the purchase money and the value of his improvements, deducting therefrom the-annual value during his possession.”
This court in several cases has recognised the doctrine of betterments to the extent of the enhanced value of. the land, in cases where the contract for the sale of land has been rescinded, or the title has failed by reason of the contract not being in writing. Wetherell v. Gorman, 74 N. C., 603; Hill v. Brower, 76 N. C., 124; Smith v. Stewart, 83 N. C. 406.
But we have been unable to find any case- in which the doctrine has been held to apply to mortgagors. In our act of 1871-2, providing a remedy to recover- betterments for innocent defendants against whom a recovery may be had in an action in nature of ejectment, it is expressly declared in the act that its provisions shall not apply to any suit, brought by a mortgagee against a mortgagor to recover the mortgaged premises. It is very probable the legislature in. making the exception had in view the generally admitted! principle that the right to betterments is not conceded to> mortgagors, for the current of authorities is to the effect *484that it has no application to them. In 2 Washburn on Real Prop., it is laid down that, “ if the mortgagor or any one standing in his place enhances the value of the premises bjT improvements, they become additional security for the debt, and he can only claim the surplus, if any, upon such sale being made after satisfying the debt.”
In Martin v. Beatty, 54 Ill. Rep., 100, it is held that money expended in improvements upon mortgaged premises by the mortgagor or his grantee subsequent to the mortgage cannot be given a lien prior to that of the mortgagee. And in Rice v. Dewey, 54 Barb., 455, (N. Y.) it was decided that ‘•'where lands sold and conveyed by mortgage are charged with the mortgage debt, improvements that constitute a part of the realty, irrespective of the question by whom made, are equally subject to the lien of the mortgagee as the land upon which they are made.”
In Massachusetts it is held that the owner of an equity •of redemption is not entitled as against the mortgagee to •be allowed for improvements made upon the premises. Childs v. Dolan, Allen’s Rep., 319.
There is no error. Let this be certified to the superior ■court of Wake county that proceedings may be there had in accordance with this opinion.
No error. Affirmed.