The opinion of the Court was delivered by
Rogers, J.That a surety an paying the debt, is entitled to ' *298stand in tlie place of the creditor, and to be subrogated to all his rights against the principal, is unquestionably true ; but it is equally true, that the doctrine of substitution, is founded on pure equity. When therefore, an application is made for substitution, the court will take care,, that the subrogation of the surety, shall work no injustice to the rights of others. King v. Baldwin, 2 Johns. C. R. 554. Cheeseborough v. Millard, 1 Johns. C. R. 409. In all sueh cases, the surety, is entitled to have all prior liens assigned to him for his benefit, and to have a cession of all the rights and securities of the creditors, as if he were a purchaser, either against the principal debtor or his co-sureties. Whether Mary Moore has brought herself within the benefit of these principles,- is the enquiry to which our attention has been directed. I say Mary Moore, for I cannot perceive how her assignee is placed- in a better situation. The assignment to Erb-was made, after the money was raised on the execution and paid into Court. As, then the rights of all the creditors had attached, of which he had notice, he stands precisely in the place of the assignee, affected with all the equity, whether apparent or secret, which- existed between her and Orr. I shall assume, that the judgment of Bearmond v. McCormick and Moore, did not extinguish the judgment of Martin v. McCormick, for this would seem from the case stated to have been the understanding of all1 the parties. If then, Mary Moore has paid the judgment of De-armond against herself, and McCormick, she would have had aright to be subrogated, not only as respects the latter judgment, but the judgment of Martin v. McCormick. She would be entitled to all the rights and securities of the creditors. In deci-ing on the application- of Mary Moore to be substituted, (for in this light the case must be viewed,) we must consider, that in subrogating her, or which is the same thing, her assignee, we deprive William Orr of his-debt, by taking from him a real- security, and throwing him upon the personal security of Mary Moore, who is insolvent. By the execution against John McCormick, Orr had acquired a specific lien on his property,, and- this, he consented to relinquish, on Mary Moore’s becoming security with Barnabas McCormiek for the debt. In this way she acquired part of the property, which has been sold, and which it is alleged, places her in the situation of a surety, who has been compelled to pay the debt of the principal. It is obvious that for" this property Mary Moore has paid nothing, as it is not pretended that any part of the Bond to Orr, has been paid. Nor is it likely that any part of the debt, ever will be discharged.
We do not look upon this as constituting such an equity, as entitles her to be substituted as against Orr. We view this as a payment, not with her own funds but substantially with the funds of *299•Orr. Nor does this injure her, .for by the application of the money arising from the sale, to Orr’s debt, she is relieved to the extent :of the payment. The facts of this case, are defectively found, as they have not ascertained what amount of the debt was paid, with the money arising from the sale of the property she derived from .the arrangement .with Orr, nor the proportion which came from the property .of Barnabas McCormick, nor what part was paid, with that which properly may be considered her own property. As this is in effect, an application by the assignee, for substitution., •this should be done, for otherwise we cannot fix the amount for whichhe.is.entitledto.be subrogated. But suppose the money was paid entirely out of the funds of Mary Moore, is her assignee ■then entitled .to be substituted in the place of the creditor? We think not. A court of chancery will refuse to interfere, unless in a case of pure equity, which this is not: as the direct consequence would be, that Mary Moore would take the money out of court, and Orr would be compelled to resort to her for payment of the debt, which although it might not be attended with ultimate loss, -yet would create great difficulty.- The payment of the debt at ■law, extinguishes the judgment, but a court of equity interferes .to prevent injustice to the surety on a principle of benevolence. Where the surety .is also a debtor, and but for the substitution the fund would go to the payment of his debt, he cannot incur any.loss ; and therefore, there is no call for the extraordinary interposition of the court, .to protect-his interest. It is the same to him, that his debt should be paid directly from the fund, as if .the surety was to receive .the money and pay the debt himself. And this case is a strong illustration of the principle.
If .the court refuses to permit a .substitution, Mary Moore -suffers no .injury, because the fund goes to pay her debt to Orr. But if she is allowed ,tn recover the money, and apply it to a different purpose, Orr would be injured, as it deprives him of a legal right to the money raised by-the sale, and subject to distribution by the Dourt
Decree of the common pleas affirmed.