Hoar, J.
The equity in favor of the defendants Alison and Hooper is so clear and so strong, that it must prevail unlesu there is some settled rule of law or course of practice inconsistent With it.
*271The plaintiff, a mortgagor, brings his bill to redeem against Larissa, the assignee of the mortgagee, and makes parties defendant, Alison, to whom Larissa had conveyed by a quitclaim deed a lot of half an acre, part of the mortgaged premises; and Hooper, to whom Alison had mortgaged the same lot, as security for the payment for materials used in building a house upon it. Alison and Hooper now claim to be allowed for the value of the improvements made upon the land, under the provisions of the Gen. Sts. c. 134, § 19.
There can be no doubt that a mortgagee in possession is not usually entitled to allowance, in a suit for redemption, for improvements made upon the mortgaged estate. If the mortgagor has known and encouraged the making of such improvements, giving the mortgagee assurance and reason to believe that he would not redeem, this might be a bar to the right of redemption. Fay v. Valentine, 12 Pick. 40.
But Alison and Hooper do not stand upon the mere right of a mortgagee in possession. Their title was not acquired as an assignment of a mortgagee’s interest. The statement of facts before us finds that Larissa took an assignment from the mortgagee, who was in possession for the purpose of foreclosure after condition broken; that the mortgagor had left the country under such "circumstances as to give some reason to suppose that he did not intend to return, and that he had abandoned all intention of - redeeming the estate; that Alison, who was a stranger, found Larissa in the unquestioned possession of the estate, professing to have an absolute title, and was assured by him that he could convey a perfect title ; and that he purchased the half an acre in good faith, for an adequate consideration, believing that he got a good title. It is obvious that he did not take a transfer of any part of the mortgage debt.
It has been sometimes suggested that a conveyance by a mortgagee of a part of the mortgaged estate may be void ; though it is difficult to see how, as a mere transfer of legal title, this can be so. Wyman v. Hooper, 2 Gray, 141. But there can be no doubt that Alison and Hooper were rightly made parties to the suit for redemption. Gen. Sts. c. 140, §§ 13, 14, 28, 31. *272And being made parties, their equitable rights are to be ascertained, in order that there may be a complete settlement, which shall adjust finally the whole subject in controversy between all the parties in interest. It was held by Judge Story that the right of a purchaser in good faith for a valuable consideration, who had made costly improvements upon land, to be allowed for them against a paramount title, could be supported upon general principles of equity without regard to statute provisions. Bright v. Boyd, 1 Story, 478; 2 Story, 605. In New York, although Chancellor Walworth denied the full extent of the doctrine, yet he asserted that it would be applied by a court of equity whenever the owner of land was obliged to invoke the aid of a court of equity to maintain his title against a person who had acquired a legal title in good faith. Putnam v. Ritchie, 6 Paige, 390. And we can have no doubt that, whether there is any general equitaole jurisdiction or not in favor of such a purchaser, a court of equity will at least apply the rule to the full extent to which it would be carried, if the suit were at law, under the statute of betterments ; and^as, in the case at bar, the defendants would have been entitled to an allowance for improvements in defence of a writ of entry, they are not to be deprived of the same advantage where the plaintiff is obliged to resort to equity to establish his rights. He-that would have equity must do equity. And there is certainly no equity in allowing the plaintiff to take without compensation the value of improvements which Alison, a purchaser in good faith, who supposed he had a good and absolute title, has made.
The doctrine is thus stated by Mr. Washburn in his Treatise on Real Property: “ In some of the states a mortgagee is allowed to charge for beneficial and lasting improvements. And this is sometimes the case even in England. And such would probably be uniformly the rule where the mortgagee in making such improvements supposed himself to be the absolute owner, or the person who made them was an innocent purchaser, or did it by consent and agreement of the mortgagor.” 2 Washb. Rea. Prop. (3d ed.) 211.
We are of opinion that, as between Larissa and Alison, the *273conveyance must be treated in equity as transferring all the right which Larissa had to convey, which was, an equitable interest in the mortgaged estate proportionate to the amount paid; that, on the redemption of the mortgage, Hooper, as holding Alison’s right, was entitled to receive the fifty dollars which Alison had paid, and also to be allowed for the value of the improvements, with proper allowance for interest and taxes and intervening rents and profits, and that the case should be recommitted to a master to state the account between the plaintiff and Alison and Hooper, with such a settlement of the account with Larissa as thereby becomes necessary.