delivered the opinion of the court.
Assuming the deed from Valle’s administrator in 1838 to be void, by reason of the failure of the administrator to comply with the requirements of the statute, as was held by this court when the case was here before, the only question for our determination now is, whether the defence set up in the answer is a valid one in equity.
The maxim of the common law “ nemo debet locupletari ex alterius incommodo” is one of those general principles of natural equity which receive at once, without examination or discussion, the approbation of every cultivated and well regulated mind. The same maxim, expressed more fully, is found in the civil law: “ Jure natwrce aequum est, neminem cum alterius detrimento et injuria fieri locupletiorem.” The exact application of this principle, the same essentially in each system, has however been more extensively and more definitely illustrated and. enforced in the Roman law than it has *158been unde/the common law and chancery system of English jurisprudence. The limits, within which it will be held applicable under our system.of equity jurisprudence, are not so well settled as they seem to be under the Roman law and Spanish law, and under that modification of the civil law which prevails in Scotland,
To what extent this maxim has been practically adopted in the English and American equity law is a question which was very carefully and elaborately considered and discussed by Judge Story in a case very analogous to the present. In the case of Bright v. Boyd, 1 Story, 478, the real estate of a testator was sold by the administrator with the will annexed to pay the debt of the deceased. The property brought its full value, and the purchaser supposed himself to have obtained a good title, and accordingly made large and expensive improvements on the lots. It turned out that the administrator had not complied with the statute, and the sale was held bad and no title passed. The devisee sued in ejectment and recovered upon his legal title, which of course had not been divested by this invalid sale, and the purchaser and occupant brought his bill to compel the devisee, before he should be permitted to take possession under his judgment in ejectment, to pay for the improvements and for money advanced in buying up outstanding claims. Judge Story hesitated. The case was heard in 1841. In 1835, when his Treatise on Equity Jurisprudence was first published, Judge Story had intimated that such cases were beyond the reach of our equity courts, except when the party seeking to recover the estate required and called for aid from a court of equity, or unless there was some fraud; and that, where the party could recover the estate at law, a court of equity could not, unless there was some fraud, relieve the purchaser. (2 Story Eq. § 1238.) Chancellor Walworth, in Putnam v. Ritchie, 6 Paige, 390, had expressed the same opinion,- although he admitted that, after a careful examination of English and American authorities, he had found no case where the point had been decided either way. Judge Story, *159strongly impressed as he was with the natural equity of the plaintiff’s claim, declared himself unwilling to lead the way in making such a precedent as Chancellor "Walworth had been unable to find. He examined tire. Roman law, the Spanish law, and the Scotch law, and in all these systems he found the question left beyond dispute; and after a postponement of the case and a mature deliberation, he came to the conclusion that the plaintiff was entitled -to the full value of his improvements. His language" in his final opinion is emphatic: “I wish, in coming to this conclusion, to be dis-. tinctly understood as affirming and maintaining the broad doctrine,, as a doctrine of equity, that so far as an innocent purchaser for a valuable consideration-witliout notice of any infirmity in his title has, by his improvements and meliora-tions, added to the permanent value of 'the estate, he is entitled to a full remuneration, and that such increase of value is a lien and charge on the estate, which the absolute owner is bound to discharge before he is to be restored to his original rights in the land. This is the clear result of the Roman law; and it has the most persuasive equity, and, I may add, common sense and common justice, for its foundation.” ,(2 Story R. 607.)
' This case of Bright v. Boyd is not, it is true, in all respects the same with the one now under consideration. There is a difference between the two cases, and perhaps an essential one; but the only point of difference there is serves to place the case we have under consideration on less debatable ground. In that case, as in this, the sale and purchase was in good faith on both sides, but turned out to be void by reason of a noncompliance with the provision of the statute law; but, in that case, the occupant was plaintiff in equity, and desired compensation for improveme'nts which he had in good faith made; in this case, the defendant asks for the purchase money, which has become, as itwere, incorporated in the land by paying off a lien on it-which the true owner was bound to pay. The owner insists on having the land and the money both. Now, by the common law, the maxim *160was, “ cujus est solum, ejus est usque ad codumj’’ and there was at least - some plausibility, though no substantial equity, in the claim of the owner to the improvements as well as the land. It might have been urged that the true owner, if ignorant of his title and not aware of the improvements which the actual occupant was putting on the land, ought not to pay for improvements which he had not directly or indirectly authorized, and which might not at all suit his wants or his fancy. But such an argument could not be used in the case now before us. The purchase money has gone to extinguish a mortgage which the owner was bound to extinguish before he could get the land. It was not a matter of taste or fancy. The debt was a lien on the land, and that lien could only be removed by paying off the debt. There is no escape from .the equity here, unless the plea should avail that defendant was a stranger, a volunteer, one who paid a debt without being ashed, and who therefore upon legal principles shall not by such an act of folly be allowed to make himself a creditor of another person’s debtor. We will examine this plea presently.
In the case of Bright v. Boyd, Judge Story said: “ There is still another broad principle of the Roman law which is applicable to the present case. It is, that where a bona fide possessor or purchaser of real estate pays money to discharge any existing encumbrance or charge upon the estate, having no notice of any infirmity in his title, he is entitled to be repaid the amount of such payment by the true owner seeking to recover the estate from him. Now in the present case it can not be overlooked that the lands of the testator, now in controversy, were sold for the payment of his just debts, under the authority of law, although the authority was not regularly executed by the administrator in his mode of sale by a noncompliance with one of the prerequisites. It was not therefore, in a just sense, a tortious sale; and the proceeds thereof paid by the purchaser have gone to discharge the debts of the testator; and so far, the lands in the hands of the defendant have been relieved from a charge to which they were *161liable by law; 'so that he is now enjoying the lands free from a charge which, in conscience and equity he, and he only, and not the purchaser, ought to bear. .To the extent of the charge from which he has been thus relieved by the •purchaser, it seems to me that the plaintiff, claiming umder the purchaser, is entitled to reimbursement, in order to avoid a circuity of action to get back the money from the administrator, and thus subject the lands to a new sale, or at least in equity to the old charge. I confess myself to be unwilling to resort to such a circuity in order to do justice, where, upon the principle of equity, the merits of the case can be reached by affecting the lands directly with a charge to which they are, ex cequo et bono, in the hands of the present defendant, clearly liable.”
I have transcribed this strong and decided view of Judge Story in the case of Bright v. Boyd, because, meeting in every respect the question we have to decide here, and applying mutatis mutandis to. the precise facts of the case, we shall at least be relieved from any imputation of rashness or innovation if we follow the precedent made by so distinguished a jurist. And now Judge Story’s doctrine, in Bright v. Boyd, has been made statute law in Missouri, whatever doubts may have existed hitherto of its right to a place among the principles of equity law. (R. C. 1855, p. 694.)
But the principle, apart from its undoubted and undeniable prevalence in the civil law and the’codes which have grown out of this system of jurisprudence throughout continental Europe, does not, as an established principle of American equity law, rest upon the single authority of Judge Story. In Hudgins v. Hudgins’ executor, 6 Gratton, 320, the court of appeals of Yirginia applied the same principle to a case essentially like the present. In that case, there had been a proceeding against an executor to subject-the land of his testator to the payment of a debt, and a decree was made for a sale of the land, and commissioners were appointed to make the sale and convey the land. The title acquired under the sale of the commissioners was held *162to be void against the devisees under the will, but, as the purchase money had been applied to the payment of the testator’s debts, which by the will were a lien on the land, the court would not permit the devisees to disaffirm the sale without paying back the purchase money. The equity in this case was administered by substituting the purchaser to the rights of the creditors.
It is immaterial under what form the equity in such cases is administered; whether under the name of compensation, as it was done in the case of Bright v. Boyd; or under the name of substitution, as in the case of Hudgins v. Hudgins; or, as it is sometimes more conveniently effected, by reviving the encumbrance, which the purchase money has extinguished, and permitting it to be used as a shield against a recovery at law. (Peltz v. Clark, 5 Peters, 482.)
In the case of Howard v. North, 5 Texas, 315, the principle was applied to sheriff’s sales. There the sale and deed were held totally void, but the court would not allow the debtor or defendant in the execution to get back the land from the purchaser at the void sale without reimbursing him for the , amount paid as purchase money, and which went to discharge the judgment which was a lien on the land. The doctrine of substitution was resorted to by the court to effect the object in view here, but the amount of it was that the purchaser was not compelled to restore the property until equity was done to him. This principle, thus applied to sheriff’s sales, is recognized and acted on in Kentucky in numerous cases, and is there applied, not only to cases where the conveyance is ineffective, but to cases where the title of the defendant in the execution fails. The case of McLaughlin’s Adm’r v. Daniel, 8 Dana, 182, is a case of this kind. The courts of Kentucky and South Carolina (Bently v. Long, 1 Stroth. Eq. 43) will give a purchaser at sheriff’s sale, who loses his property by paramount title, a redress against the defendant in the execution for the amount paid on his purchase, which has gone to discharge the defendant’s debts, by substituting him in the place of the creditor. In *163our state, where the doctrine of caveat emptor has been maintained with strictness in its application to judicial .sales, it may be that the courts would not be at liberty to go to the extent of the Kentucky and South Carolina cases, though recent legislation here, as well as recent decisions of this court, show a tendency to the same equitable doctrines. (R. C. 1855; p. 967; Magwire v. Marks, 28 Mo. 196; Heath v. Daggett, 21 Mo. 69.) In these cases of failure of title in the defendant in the execution and consequent failure of title in the purchaser at the sheriff’s sale, the Kentucky courts base the equitable rights of the purchaser, not upon his knowledge or ignorance of the condition of the title, but upon the ground that the purchaser has discharged a judgment against the estate or debtor, for which the one or the other stood chargeable, by a purchase of property made under the process of the law, and therefore has the equitable right to be reimbursed out of the estate or property of the debtor. The purchaser, in such cases, might be called a volunteer or a stranger with as much propriety as the purchaser here could be, for he gets no title, either because the execution debtor has none, or because the process used to transfer' it was illegal and void. The case of Peltz and others v. Clark, 5 Peters, 482, although unlike the present in the essential particular that the sale in that case was a valid one, shows that a purchaser, under the circumstances of this case, could hardly be regarded as a volunteer, so as to exclude him from the right of substitution, or the right to use a mortgage, which his money had satisfied, as a protection pro tanto against the ejectment.
In Louisiana, the courts have not hesitated, but disposed of this question as one too plain for argument under the laws of that state. In Dufour v. Campane, 11 Martin, 615, there was an irregular sale, just as there was in this case, and the title of the purchaser failed, not by reason of any want of title in the person from whom he supposed himself to be buying, but because of some informality in the conveyance or the proceedings which led to it. The court say, *164in a few words : “ Nothing could be more unjust than to permit a debtor to recover back his property because the sale was irregular, and yet allow him to profit by that irregular sale to discharge his debts.”
This is all indeed which could be or need be said upon the subject. “ Nothing could be more unjust,” we may repeat, than to permit a person to sell a tract of land and take the purchase money, and then, because the sale happens to be informal and void, to allow him, or, which is the same thing, his heir, to recover back the land and keep the money. Any code of law which would tolerate this would seem to be liable to the reproach of being a very imperfect or a very inequitable one. We think that, upon well established principles of equity law, the owner of the land should, if he wishes to get it back, repay the purchase money, which he has received, or which he will receive if he gets the land. This may be done upon the compensation doctrine of courts of equity, with which, as it is settled on all hands, it is not inconsistent, if we regard the claim of the owner under such circumstances, as the Eoman law treated it, as a case of fraud or ill-faith. But whether this equity be administered under the name of compensation or by substituting the purchaser in the place of the creditors whose debts he has paid, or by giving him the benefit of the mortgage which his money has paid off, is not material. The answer put in by the defendant should not have been stricken out, and, in order that the answer may be reinstated and the case may be tried upon these equitable principles, the judgment is reversed and the case will be remanded.
Judge Ewing concurs.