delivered the opinion of this court.
This is an appeal from a decree of the Chancellor, of the 1st June, 1846, by which it was ordered, that the specific legacy which had been delivered to the defendant by the complainant, should be returned to the complainant, to be applied by him as the executor of Edward Buchanan, in satisfaction of tlie testator’s debts.
From this decree, the present appeal has been taken; and the counsel of the appellant in the argument in the cause have contended, that the decision of the Chancellor was erroneous, and ought to be reversed, mainly, upon two grounds:
First, because it plainly appears from the will of Edward Buchanan, executed on the 16th June, 1843, and the codicil to the will, which was executed on the 25th July, 1843, that the testator intended to charge his real estate with the payment of his debts, in exoneration of his personal estate, the whole of which he had specifically bequeathed to the appellant, by the codicil of the 25th July, 1843.
And secondly, that inasmuch as the legacy thus specifically bequeathed has been voluntarily delivered by the appellee to the appellant, and was accepted by her, the appellant is now precluded under the circumstances of this case from demanding a return of it.
In the case of Walker vs. Jackson, 2 Atk. 624, the Lord Chancellor said:
“ That the personal estate is to be applied for the payment of debts in the first place, is the general rule, and it is as certain that a testator cannot, as against his creditors, exempt his personal estate.
“ But against his heir at law, or the devisee of his real estate, he may substitute the real, in the room of the personal estate, *116and charge his debts upon another fund not in its nature primarily liable.”
This is the acknowledged doctrine on this subject, and it is to be received as an established principle, that although a testator may, as between the devisees of his real and personal estate, prescribe the mode in which his debts shall be discharged, and the dispositions made by the will, will be obligatory’ upon those who accept it; yet he has no power to withdraw from the creditors the personal estate, to which by the law they are authorized to resort, as the natural and primary fund for the satisfaction of their claims.
In the case of The State of Maryland vs. The Bank of Maryland, 6 G. & J. 230, the Court of Appeals said:
“An executor or administrator takes the funds of the deceased, to be distributed according to law, subject to such preferences as the law allows. The moment the debtor dies, the law asserts the rights of the creditors, and takes the property into its hands, and makes or directs a distribution of it, according to their priority. That being the law of the deceased persons’ estates, which a testator cannot by his will defeat.”
In the case now under consideration, a bill was filed by the complainant, as the executor of Edward Buchanan, for the purpose of reclaiming from the defendant, the legacy which he had delivered to her, that it might be appropriated as the personal assets of the testator to the payment of his debts ; and it must be obvious, that in a controversy of this kind, the question agitated by the counsel for the appellant, with respect to the estate which the testator intended to be charged with the payment of his debts, does not arise, and cannot be properly adjudicated.
If the construction placed by the counsel for the appellant upon the will of Edward Buchanan is correct, and they can maintain the proposition, that it was the intention of the testator to exempt his personal estate from the payment of his debts, there is no doubt that the appellant, as the specific legatee of the personal estate, would be subrogated to the rights of the *117creditors, and might claim to be reimbursed by the devisees of the real estate. But the devisees of the land are not before us, and we forbear, therefore, to intimate any opinion with respect to the true interpretation of this will. The position taken by the counsel for the appellant, on this branch of the case, certainly interposes no obstacle to the successful prosecution of the complainant’s bill.
With respect to the second point made by the counsel -for the appellant, we are of opinion there is no circumstance in this case which precludes the appellee from reclaiming this legacy in a court of equity.
It has not been pretended, that the insufficiency of the assets to satisfy the debts of the testator has been caused by the fraud or misconduct of the executor. The fund created by the sale of the farm in Baltimore County has been faithfully applied to the purposes designated by the will of Edward Buchanan; and after having been exhausted in the payment of his debts, there still remains outstanding debts amounting to the sum of nineteen hundred dollars, in addition to the sum of three hundred and forty-five dollars and thirty-eight cents, due to the executor for disbursements made, and debts paid by him, on account of the estate. And, we think, that as it is evident in this case that the legacy was delivered by the appellee to the appellant upon the entire confidence, sincerely entertained, that the assets would be sufficient for the payments of the debts of the testator, but have proved to be inadequate, without the fault of the appellee, he was entitled to coerce a return of it, through the instrumentality of a court of equity. Upon this subject, there appears to have been some contrariety of opinion in the early cases, but the principle we have announced will be found to be sustained by the weight of authority, both in England and in this country.
In the case of Davis vs. Davis, reported in 8 Viner Abrgt. 423, it was held :
“ That an executor may institute a suit against a legatee, to refund a legacy voluntarily paid, as well as a creditor; and for this reason, an executor paying a debt of the testator out of *118his own pocket, stands in the creditor’s place, and has the same equity against the legatee to compel him to refund.”
In Hawkins vs. Hay, decided in 1753, Ambler's Rep. 160, Lord Hardwicke said:
“ The rule in this court, to grant prohibitions in case legatees sue in the spiritual courts, and refuse to give security, is out of use; but the court will decree a legatee to refund.”
In Edwards vs. Freeman, 2 P. Wil. 446, Lord Chief Justice Raymond declared:
“ That if an executor pays a legacy on supposition that there are assets to pay all the other legacies, and there happens a deficiency, the court will make the legatee, who is paid his full legacy, refund.”
The principle thus announced in the cases to which we have referred was recognized by Lord Alvanley, in the case of Johnson vs. Johnson, 3 Boss, & Pul. 169; by Chief Justice Marshall, in Riddle vs. Mandeville, 5 Cranch, 330; and has been directly adjudicated by Ihe Supreme Court of New Jersey, in the case of Harris vs. White, 2 Southard's Rep. 425, and by the presiding judge of the Court of Appeals of Virginia, in Galligo's Exec'rs vs. The Attorney General, 3 Leigh. Rep. 489. And Judge Story, when treating of this subject in the 1 stvol. of his Equity Jurisprudence, sec. 90, says:
“ In the course of the administration of estates, executors and administrators may often pay debts and legacies upon the entire confidence, that the assets are sufficient for all purposes. It may turn out from unexpected circumstances, or from debts and claims made known at a subsequent time, that there is a deficiency of assets. Under such circumstances, they may be entitled to no relief at law. But in a court of equity, if they have acted with good faith, and with due caution, they will be clearly entitled to it, upon the ground that they will be otherwise innocently subject to an unjust loss, from what the law itself deems an accident.”
The same doctrine is maintained in Walker vs. Hill, 17 Mas. Rep. 385.
*119It is proper to state, that the view we have taken of this question is entirely unaffected by the agreement, said to have been entered into between the appellant and appellee, at the time this legacy was delivered. That agreement cannot be regarded as changing, in any respect, the rights of the parties. They stand precisely where they remained before the contract was made; because we understand the appellant only to have stipulated that she would refund the legacy, provided, she was under a legal or equitable obligation to do so. We place the right of the appellee to maintain this suit, upon the plain and acknowledged principle, “That the payment of the legacy was made on a mistaken ground, with respect to the facts of the case, and that therefore it would be unjust and inequitable in the legatee to withhold it.” Hutchins vs. Hope, 12 G. & John. 256.
The codicil executed by Edward Buchanan on the 25th July, 1843, contains the following bequest:
“ In consideration of the particular care and attention shown me by my sister, Priscilla Buchanan, during my protracted sickness, I give and devise to her, her executors and administrators and assigns, all my household and kitchen furniture, and likewise my stock of horses, cattle, grain, provender, farming utensils, and other chattels personal, belonging to me, that may be on my said farm in Baltimore County, at the time of my decease. I also give to my said sister Priscilla, her heirs, executors, administrators and assigns, my house and lot of ground and premises fronting on Fleet Street, Fells Point, in the said city of Baltimore.”
The counsel for the appellant have relied on the expressions, “ in consideration of the particular care and attention,” &c. as indicating that the testator treated the appellant as his creditor ; and that the property in controversy was bequeathed to her—not as a mere matter of testamentary bounty, but in payment of what he considered to be a debt, founded upon a valuable consideration, and justly due from him to the legatee.
But an insuperable answer to this argument is, that no claim has as at any time been preferred by the appellant against the *120estate of the testator for these services; and her counsel have repudiated the supposition, that she was influenced by sordid motives in the care and attention which she bestowed upon her brother during his protracted illness.
The services rendered on this occasion by the appellant, were in the highest degree meritorious, but they were confessedly gratuitous; and it is impossible to place the appellant in the position of a creditor, or to impart to the legacy the character of a purchase, in a case where it is perfectly plain, and has indeed been conceded that there was no legal claim.
The rule upon this subject is thus laid down by Roper, in his Treatise on Legacies, 1 vol. 297:
“ When a general legacy is given in consideration of a debt owing to the legatee, or of his relinquishing any right or interest since the bequest, is not made as a bounty like other general bequests, but as purchase money for the collateral right or interest, it will be entitled to a preference of payment, to other general legacies, which are merely voluntary.” And the author says:
“ It must be remarked, that, as it is the surrender of existing rights or claims which gives the preference to the legatee, it is necessary that those rights or claims should be subsisting at the testator’s death.”
It is not pretended that there was any debt or claim due and subsisting, or account of these services, from the testator to the appellant, at the time of his death; and it is clear upon all the cases, that she cannot be treated as a purchaser of this legacy. But as this is a contest between the executor and the legatee, and not between co-legatees, we desire to be understood as not meaning to intimate, that this fact, even if had been established, would have changed, in any respect, the aspect of this controversy.
DECREE AFFIRMED.