specially presiding,
. . . The securities deposited with the Harrisburg Trust Company under the agreement between Union Trust Company of Pennsylvania and Union Indemnity Company, dated November 3, 1932, are claimed by three parties: (1) The trustees and receivers in bankruptcy of various estates who had deposits in Union Trust Company of Pennsylvania and were therefore creditors of that bank; (2) the liquidating trustees of trusteed assets of the Union Trust Company of Penn*48sylvania, who stand in the position of the debtor bank; and (3) the Insurance Commissioner of the Commonwealth of Pennsylvania, ancillary receiver and receiver of Union Indemnity Company in the Commonwealth of Pennsylvania, who stands in the position of the surety on the depository bond of Union Trust Company of Pennsylvania as depository for bankruptcy funds, appointed by the District Court of the United States for the Middle District of Pennsylvania.
The liquidating trustees of the debtor bank contend that the securities were pledged merely as security for any loss which the surety might sustain, and that they are entitled to have returned to them all of the bonds, or all of the bonds which are not required for the purpose of indemnifying the surety. The Insurance Commissioner, as receiver of the surety, likewise contends that the securities were pledged as security for any loss which the surety might sustain and that he is therefore entitled to receive an amount sufficient to indemnify the surety for the dividends already paid on account of its liability and for dividends hereafter to be paid on that account. It is contended by the trustees in bankruptcy, as creditors, that they are entitled to receive all the securities to be applied on the debt due them by the debtor bank regardless of the terms of the agreement under which such securities were deposited.
In the early case of Maure v. Harrison, 1 Eq. Cas. Abr. 93, 21 Eng. Repr. 904 (1692), the court said:
“A bond creditor shall, in this court have the benefit of all counter-bonds or collateral security given by the principal to the surety; and if A. owes B. money, and he and C. are bound for it, and A. gives C. a mortgage or bond to indemnify him, B. shall have the benefit of it to recover his debt.” ’ This case was cited with approval in Cornwell’s Appeal, 7 W. & S. 305, 307 (1844), where the court said that the creditor, had he not been paid, might have claimed the benefit of the bond and judgment “upon the well-established principle in equity that *49a creditor is entitled to all the securities taken by the surety of his debtor, either for the purpose of securing the payment of the debt to the creditor, or for the purpose of indemnifying himself against the payment of it.” These two cases were cited with approval in Kramer & Rahm’s Appeal, 37 Pa. 71, 77 (1860). It is there stated that the authorities place the principle upon the- ground that as the security is a trust created for the better securing of the debt, it attaches to it, hence it is that it may be made available by the creditor, although unknown to him at the time of the purchase of the security for which it may have been given as indemnity. “The effect of such a transaction is the placing of means in the hands of the surety by the principal debtor to meet liability on account of his contract of suretyship. It is consequently a trust for that specific purpose, and equity will control the legal title to it in the hands of the surety, so that it may be applied to the object intended, viz, the payment of the debt to the holder”: Kramer & Rahm’s Appeal, supra, p. 77.
These authorities definitely establish the principle that where a surety for the payment of a debt receives from the debtor a security for his indemnity or for the purpose of discharging the indebtedness, the creditor is, in equity, entitled to the full benefit of that security. The same principle is adopted almost uniformly by textbook writers: See Stearns, Suretyship (1934), sec. 255; 4 Pomeroy’s Equity Jurisprudence (3rd ed.) sec. 1419, p. 2795; 50 C. J. 227, §370; 21 R. C. L. 1094, §132.
In the Pennsylvania cases above cited the reason given for the rule is that the security becomes a trust for the better securing of the debt, but this doctrine was repudiated, in part, in Worrall’s Appeal, 41 Pa. 524, 527 (1862), and Fertig v. Henne, 197 Pa. 560, 568 (1901), for the reason that if a trust was created when the securities were deposited the securities could not be returned to the principal without applying to the *50creditor and obtaining his consent to the surrender, a conclusion which was stated to be “so extreme as to show that the principle which leads to it must be an error.” However, in Worrall’s Appeal, supra, it was stated (p. 527) : “ ‘But while such securities are not in any just sense of the word trusts, unless made so expressly, they are, notwithstanding, charged with duties and obligations which may render it necessary to award them to the creditor, as the only means of doing justice between the principal and the surety, For although the surety may, under ordinary circumstances, consent that they shall be applied to other debts of the principal, instead of that which they were meant to secure, or the principal release all claim upon them in favour of the surety, without giving any just ground of complaint to the creditor; this is true only so long as the parties are solvent, and the securities remain in the hands of the parties, and subject to their disposition, and ceases to be so when they are turned into a fund for the payment of debts by an assignment or execution.’ ”
In other jurisdictions the principle that the creditor may reach securities in the hands of the surety is sometimes based upon the theory that the creditors’ rights arise through subrogation to the exact position of the surety: Meeker, Trustee, v. Waldron et al., 62 Neb. 689, 87 N. W. 539 (1901). Under this theory, however, the creditors’ rights in the indemnifying security are restricted to those of the surety therein: See Constant v. Matteson et al., 22 Ill. 546 (1859). Other courts base the creditors’ rights in indemnifying securities on the insolvency of the principal or surety or both: New Martinsville Bank et al. v. Hart et al., 103 W. Va. 290, 137 S. E. 222 (1927). In that case the decisions in some of the States, holding that the creditor will not ordinarily be entitled to the benefit of securities given by the principal debtor to indemnify the surety, unless they are also made subject to the payment of the debt, are discussed and it is stated that most, if not all, of *51the courts adhering to that doctrine recognize an exception in cases where the debtor is insolvent, or where both the debtor and surety are insolvent. Still other States place the doctrine squarely upon the trust theory under which a creditor can reach the securities whether the surety has been damnified or not and irrespective of the question whether the surety or the principal, or both, are insolvent: Morrill v. Morrill, 53 Vt. 74 (1880).
In the present case it is immaterial, as between the liquidating trustees of the debtor bank, and the creditor trustees in bankruptcy, which of the three doctrines is applied, since the surety has been damnified by being compelled to pay a dividend on account of its liability, and both the debtor and the surety are insolvent. Under the Pennsylvania authorities above quoted and under any of the three rules, the creditor trustees in bankruptcy are entitled to the securities in preference to the liquidating trustees of the debtor bank.
The question remains whether the receiver of the surety is entitled to be reimbursed out of the securities for the amounts heretofore paid and hereafter to be paid on account of the surety’s liability to the creditors. His claim is based on the theory that the agreement under which the securities were deposited was an agreement to indemnify the surety.
The liability of the surety on the depository bond is $20,000, while the securities deposited are worth approximately $5,000. If the receiver’s contention is sustained, the surety will be fully reimbursed for any dividends paid by it up to 25 percent of its total liability. Up to that amount its liability would be paid by the debtor’s own property and the surety would have paid nothing on account of its own liability. Clearly, if the trust fund theory is applied or if the theory that a trust arises upon the insolvency of either or both the *52principal and surety, the surety would not be entitled to reimbursement until the creditor has been paid in full.
Upon the authority of WorralPs Appeal, supra, we believe the latter rule is applicable. It was there stated at page 531 that the equitable principle forbids “a joint debtor, who is insolvent, to divert a fund from a creditor to whom he owes it, into his own irresponsible pocket.” In Bank v. Douglass, 4 Watts 95 (1835), Chief Justice Gibson stated:
“It is customary with banks to take a bond and warrant, to be used not only for its own protection, but that of the indorsers, who usually direct the application of it. If, however, it be taken directly to the indorsers, the form of the transaction cannot effect [sic] its fiduciary character, if the security be in fact taken for the common benefit of all who have reposed on the credit of the drawer.”
The court held that the bond could be enforced before the surety was prejudiced and that the right of the bank (creditor) was not affected by the equities between the surety and his principal. It would therefore follow that the surety should not receive reimbursement until the creditor, for whose ultimate benefit the entire transaction was entered into, has been paid in full.
This conclusion is supported by the terms of the agreement under which the securities were deposited. It is therein provided that upon notice of default the trustee shall collect all interest and all securities as they shall become due and shall hold the same until the liability of the depository shall have been discharged, or adjudicated according to law. “Upon an adjudication of liability of the depository upon said bond and demand by surety, the trustees shall sell said securities or so much thereof as may be necessary at the best price reasonably obtainable and pay the amount of such adjudication to surety and pay the balance or de*53liver the unsold securities to the depository.” Payment to the surety is not predicated upon the surety’s being required to pay, or upon an adjudication of its liability upon the bond, but is directed to be made immediately upon an adjudication that the depository is liable thereon. The application of the proceeds of the securities under the agreement, therefore, is not to reimburse the surety for amounts it has been compelled to pay, but to exonerate it to the extent of the value of the securities. Upon an adjudication of liability of the depository the trustee would transfer the funds to the surety who would thereupon be obligated to transmit that amount to the creditors. The surety would then remain liable for the unpaid liability of the depository up to the face amount of the depository bond. Neither the surety nor the debtor may benefit by reason of the insolvency of both, and the court will direct the application of the security as originally intended by the parties.
It follows that the fund to be realized from the deposited securities, being less than the total liability of the debtor bank, must be applied to the claims of the creditors, and that the surety is not entitled to reimbursement. ...