delivered the opinion of the court.
The appellant, G. H. Dickenson, is the receiver of The First National Bank of Grundy, which closed its doors and was placed in liquidation in December, 1929. Among the assets coming into the hands of the receiver were three notes of the appellee, BL G. Charles, reduced to judgments since the bank’s failure, and aggregating the principal sum of $4,206.11.
The receiver has appealed from a decree which allowed Charles to set off against his indebtedness to the bank on the judgments on these notes a claim for reimbursement due him by the bank for certain amounts which he is obligated to pay upon two certificates of deposit issued by the bank and endorsed or guaranteed by him.
It appears from the agreed statement of facts that in 1928 The First National Bank of Grundy issued two certificates of deposit, one in the principal sum of $9,761.29, payable to Wiley Justus, and the other in the sum of $4,000, payable to W. R. Fletcher and Cynthia Fletcher. Each certificate was payable after thirty days’ notice and bore interest at the rate of 4% per annum.
Subsequently the holders of the certificates became uneasy as to the ability of the bank to pay their deposits and threatened to withdraw them. In order to satisfy the depositors and to prevent the withdrawal of their funds, each of the certificates was endorsed by H. G. Charles, A. M. Ratliíf and D. M. Charles. All of the endorsers were directors of the bank, H. G. Charles being the president and A. M. Ratliff being the vice-president.
In 1929 the two certificates of deposit were renewed in like amounts and were similarly endorsed by the said of*398fleers and directors of the bank to prevent the withdrawal of the funds therefrom.
The bank closed its doors on December 11, 1929, and on December 31st of that year was placed in the hands of a receiver, who began the liquidation of its affairs.
Subsequently the holders of the two certificates of deposit obtained judgments against the three endorsers thereon. The receiver has already paid 66-2/3%' on account of the certificates, and according to the agreed facts will pay another dividend of approximately 20%, making about 86-2/3% in all. However, as these dividends were not paid until some years after the bank closed, it is evident that by reason of the accumulation of interest a considerable loss will fall upon the endorsers. A. M. Ratliff, one of the endorsers, is insolvent, and the loss must be borne by the remaining endorsers, H. G. Charles and D. M. Charles.
In the meantime, on April 28, 1938, the Board of Supervisors of Buchanan county recovered a judgment against A. C. Stacey, former treasurer of the county, and H. G. Charles and others, as sureties on his bond, for the sum of approximately $136,500. In a chancery suit instituted for the purpose, the lands of H. G. Charles were subjected to the payment of his proportionate share of this judgment, leaving ah excess to be applied to subsequent judgments docketed against him. In this latter class fall the three judgments in favor of the First National Bank of Grundy against H. G. Charles, aggregating the principal sum of $4,206.11, and with which we are concerned.
H. G. Charles is hopelessly insolvent and has been adjudicated a bankrupt. The numerous judgments docketed against him will more than exhaust the balance of the proceeds derived from the sale of his lands. He, therefore, has no further interest in this litigation.
But certain of the inferior judgment lien creditors are vitally interested in maintaining the set-off of Charles’ claim for reimbursement against the bank’s judgments against him. Obviously if this set-off is allowed the payments to *399the junior lien creditors will be pro tanto larger. If the set-off is disallowed the payments to them ^yill be correspondingly smaller.
It is too well settled to require the citation of authority that in liquidating the affairs of an insolvent bank a debtor of the bank may set off the bank’s debt to him against his debt to it where his claim against the bank has been acquired prior to insolvency. Conversely the set-off is not allowed where the debtor’s claim against the bank has not been acquired until after insolvency. See Michie on Banks and Banking (Perm. Ed.), Vol. 5, section 162, p. 312; Stegal v. Union Bank, etc., Trust Co., 163 Va. 417, 176 S. E. 438, 95 A. L. R. 582.
Moreover, “it is well settled that in order to warrant a set-off the debts must be mutual; that is, must be owing between the same parties.” Elswick v. Combs, 171 Va. 112, 114, 198 S. E. 501, and authorities there cited.
The able briefs filed on behalf of the respective parties in the instant case agree with these principles. They differ only in their application. The vital question is, Was Charles’ claim against the bank for reimbursement on account of his endorsements on the certificates of deposit acquired prior or subsequent to the closing of the bank?
While Charles’ endorsements on the certificates of deposit were made many months prior to the closing of the bank, the payments to be made by him are subsequent to the bank’s failure.
A certificate of deposit is, in effect, the bank’s promissory note. 5 Michie on Banks and Banking (Perm. Ed.), section 313, pp. 599, 600; 7 Am. Jur., section 492, p. 352. The liability of an endorser thereon is the same as upon the endorsement of any other promissory note. 5 Michie on Banks and Banking (Perm. Ed.), section 322(c), p. 613.
An accommodation endorser of a negotiable note stands in the position of a surety for the maker. State Savings Bank v. Baker, 93 Va. 510, 514, 25 S. E. 550; Burton *400v. Slaughter, 26 Gratt. (67 Va.) 914, 920; 8 Am. Jur., section 464, p. 212.
It is elementary that one secondarily liable on an obligation, such as a surety or an accommodation endorser, who has satisfied the demands of the holder, is entitled to reimbursement from the party primarily liable, such as the principal or maker of the obligation.
“A surety who pays the debt of his principal, upon the plainest principles of natural reason and justice, has a right to be" reimbursed by him. And this principle is recognized by both courts of law and equity. There is an implied contract of indemnity between the principal and his surety, which obliges the former to reimburse the latter who has paid his debt; and the courts of equity will substitute him to the remedies and securities of the creditor for his indemnity; and this not upon the ground of contract, but upon a principle of natural equity and justice.” Kendrick v. Forney, 22 Gratt. (63 Va.) 748, 749, 750.
For numerous other decisions to this effect see 2 Michie’s Va. and W. Va. Digest, p. 958.
In 4 Williston on Contracts (Rev. Ed.), section 1274, p. 3637, that distinguished author says: “The implied obligation to indemnify a surety arises when the suretyship relation is created but matures only when he has been injured by being compelled to make payment of the debt.”
In Scott v. Norton Hardware Co. (C. C. A. 4), 54 F. (2d) 1047, 1050, Judge Parker, speaking for the court, said: “The implied contract to indemnify a surety arises, not when he sustains his loss, but when he contracts his obligation.”
See also, Wayland v. Tucker, 4 Gratt. (45 Va.) 267, 268, 50 Am. Dec. 76.
In 50 C. J., section 394, p. 242, the author says: “While many of the rights of a surety depend upon payment by him, he possesses many before payment; and such rights have their inception as soon as he executes the instrument, and are fixed by the law in force at that time. Thus, although in some cases the contrary has been asserted, it is generally held that the relation of debtor and creditor exists *401between the principal and surety from the time the contract of suretyship is made.”
In Rice v. Southgate, 16 Gray 142, 143, the Massachusetts court said: “Upon well settled prniciples, it is clear that the contract of a principal with his surety to indemnify him for any payment which the latter may make to the creditor in consequence of the liabilty assumed takes effect from the time when the surety becomes responsible for the debt of the principal. It is then that the law raises the implied contract or promise of indemnity. No new contract is made when the money is paid by the surety, but the payment relates back to the time when the contract was entered into by which the liability to pay was incurred. The payment only fixes the amount of damages for which the principal is liable under his original agreement to indemnify the surety.”
See also, Smith v. Young, 173 Ala. 190, 55 So. 425; Fidelity & Deposit Co. v. Duke (C. C. A. 9), 293 F. 661; United States Fidelity & Guaranty Co. v. Centropolis Bank (C. C. A. 8), 17 F. (2d) 913, 53 A. L. R. 295; Jackson v. McKeown, 79 Colo. 447, 246 P. 277.
Following this reasoning the decided weight of authority is that in equity a surety may set off the claim which he is required to pay for an insolvent principal against his indebtedness to the principal, although the payments are not actually made by the surety until after the insolvency of the principal.
In Feazle v. Dillard, 5 Leigh (32 Va.) 30, 34, 35, we held that a surety on the bond of an insolvent principal was entitled in equity to set off the amount of such bond, although not yet due, against the surety’s debt to the principal. This holding has been reaffirmed and applied in Gordon v. Rixey’s Adm’r, 86 Va. 853, 858, 11 S. E. 562; Barnes v. Barnes’ Adm’r, 106 Va. 319, 323, 56 S. E. 172; Childress v. Jordan, 107 Va. 275, 277, 58 S. E. 563.
See also, Belcher v. Bays (W. Va.), 197 S. E. 732, 117 A. L. R. 897; Waugh v. Hood (W. Va.), 198 S. E. 515; Scott v. Timberlake, 83 N. C. 382; State v. Bank of Magdalena, *40233 N. M. 473, 270 P. 881; Merwin, Trustee v. Austin, 58 Conn. 22, 18 A. 1029, 7 L. R. A. 84; Chenault v. Bush, 84 Ky. 528, 2 S. W. 160; Kilby v. First Nat. Bank, 32 Misc. 370, 66 N. Y. S. 579; Craighead v. Swartz, 219 Pa. 149, 67 A. 1003; Nolan Bros. Lumber Co. v. Dudley Lumber Co., 128 Tenn. 11, 156 S. W. 465, 46 L. R. A. (N. S.) 62, Ann. Cas. 1914D, 744; Leach v. Bassman, 208 Iowa 1374, 227 N. W. 339; North Side State Bank v. United States F. & G. Co., 127 Wash. 342, 220 P. 822; Momsen v. Noyes, 105 Wis. 565, 81 N. W. 860; Barney v. Grover, 28 Vt. 391; Fidelity & Deposit Co. v. Duke, supra; 21 R. C. L., section 151, p. 1115; 117 Am. St. Rep., p. 38, note; 134 Am. St. Rep., p. 566, note.
The basis of these decisions is that the payments made by the surety will, in equity, be deemed to relate back to the date of the suretyship contract, at which time the surety became bound for the principal’s debt and the principal in turn impliedly agreed to reimburse the surety for what he might thereafter be called upon to pay on his behalf.
This principle has been applied in a number of decisions where a guarantor or surety, for the payment of sums deposited in a bank, was permitted in equity to set off against his indebtedness to the bank the payments made by him subsequent to the bank’s failure.
In Waugh v. Hood, supra, recently before the highest court of West Virginia, Hood, the receiver of an insolvent bank, sued Waugh and Young on a note held by the bank. Waugh and Young filed a suit in equity against the receiver alleging that they and others were sureties on the bank’s bond guaranteeing the payment of public deposits, and that judgment had been rendered on the bond against the sureties, some of whom were insolvent. The bill prayed that the receiver’s action against the complainants be stayed until it could be ascertained what amount the complainants must ultimately pay as sureties on the bond, and that such amount be set off against the complainant’s debt to the bank. The lower court sustained a demurrer to the bill.
*403In reversing the decree of the lower court the Supreme Court of Appeals said: “We understand the law to be settled that the surety of an insolvent principal may retain the amount of his own indebtedness to the principal by way of indemnity against the suretyship liability, and that equity will afford protection and relief to the surety. Mattingly v. Sutton, 19 W. Va. 19; Johnson’s Ex’rs v. Johnson’s Heirs, 83 W. Va. 593, 98 S. E. 812*; Hughes v. McDermitt, 86 W. Va. 86, 102 S. E. 767.”
The same conclusion was reached in the following cases involving the guaranty of bank deposits: State v. Bank of Magdalena, supra; Kilby v. First Nat. Bank, supra; Leach v. Bassman, supra; North Side State Bank v. United States F. & G. Co., supra; Fidelity & Deposit Co. v. Duke, supra.
These decisions are grounded upon the principle that the payments made by the surety for an insolvent bank will in equity be deemed to relate back to the date of the surety-ship contract, at which time the surety became bound for the bank’s debt, and the bank in turn impliedly agreed to reimburse the surety for what the latter might thereafter be called upon to pay on the bank’s behalf. In other words, the implied obligation on the part of the bank to reimburse its surety exists from the beginning of the relationship. The effect of the payment by the surety after the bank’s insolvency is merely to determine the extent of the surety’s liability, but no new or separate indebtedness arises at that time.
Opposed to this view is a line of cases holding that the surety is not entitled to set off the amount which he pays on account of his principal’s indebtedness subsequent to the latter’s insolvency. This is on the theory that until the surety makes actual payment he has no claim against his principal which may be set off against the principal’s claim against him. See United States F. & G. Co. v. Maxwell, 152 Ark. 64, 237 S. W. 708; Mack v. Woodruff, 87 Ill. 570; Richardson v. Anderson, 109 Md. 641, 72 A. 485, 25 L. R. A. *404(N. S.) 393, 130 Am. St. Rep. 543; Huse v. Ames, 104 Mo. 91, 15 S. W. 965; Gilbertson v. Northern Trust Co., 53 N. D. 502, 207 N. W. 42, 42 A. L. R. 1353; Pugh v. Conklin, 44 Ohio App. 272, 184 N. E. 847; Farmers’ & Merchants’ State Bank v. Roark, 172 Minn. 80, 214 N. W. 792; Lion Bonding & Surety Co. v. Austin (Tex. Civ. App.), 208 S. W. 542; United States F. & G. Co. v. Wooldridge, 268 U. S. 234, 45 S. Ct. 489, 69 L. Ed. 932, 40 A. L. R. 1094; McCandless v. Dyar (D. C., S. D.), 34 F. (2d) 989.
We think the majority view allowing the equitable set-off in favor of the surety is based on the sounder reasoning. Unquestionably the surety becomes bound for the principal’s debt as soon as the contract of suretyship is executed, and in turn the principal at the same time becomes bound to reimburse the surety for what he may thereafter have to pay. After the execution of the suretyship contract the surety does nothing to improve his situation.
All of the authorities agree that if the surety actually pays the debt before the insolvency of the principal, he is entitled to set off the amount so paid against his debt to the principal. We see no reason in equity why the rights of a surety should not be protected in the case where he makes payment subsequent to the insolvency of the principal on a liability actually incurred prior thereto.
Moreover, the allowance of the set-off in the instant case is quite in accord with the principles heretofore laid down by this court in Feazle v. Dillard, supra; Gordon v. Rixey’s Adm’r, supra; Barnes v. Barnes’ Adm’r, supra; Childress v. Jordan, supra; Wayland v. Tucker, supra.
See also, Stegal v. Union Bank, etc., Trust Co., supra (163 Va. at pp. 435, 436, 176 S. E. at p. 445, 95 A. L. R. 582), in which we noted that, “The trend of all modern decisions is toward liberality in the allowance of set-offs in the case of the insolvency of the party against whom the set-off is claimed to the end that only the true balance may be required to be paid to the representative of the estate of the insolvent.”
*405It is argued that the allowance of the set-off in the instant case will operate to create a preference. But this is merely another way of saying that the set-off should not be allowed. In a sense every set-off allowed against the claim of a receiver of an insolvent creates a preference. If A owes an insolvent bank $500 and has a deposit therein of the same amount, all of the authorities agree that these two debts may be set off the one against the other. The effect of this is to allow A to use the full amount of his deposit in order to pay his indebtedness to the bank. Thus A, in a sense, is paid his debt in full by the insolvent bank while the other depositors who do not owe the bank anything must receive only their pro rata share of the dividends paid in distribution of the bank’s assets.
And yet it has long since been settled that the allowance of a set-off in the situation just mentioned does not result in an objectionable preference, because the receiver merely stands in the shoes of the insolvent bank and holds its assets subject to the same rights and equities to which the bank would have been subject. Scott v. Armstrong, 146 U. S. 499, 13 S. Ct. 148, 36 L. Ed. 1059; 7 Am. Jur., section 473, p. 339, citing numerous cases.
It is next said that the set-off should be disallowed because the bank did not request Charles to endorse' the certificates of deposit, and hence he was a mere volunteer in doing so.
While it is true that there was no formal resolution of the board of directors of the bank requesting Charles and his associates to endorse the certificates of deposit in question, the record unquestionably shows that such endorsements were for the benefit of the bank and in order to prevent a withdrawal of large deposits therefrom during a critical period. The bank, of course, knew of this action and in effect ratified it.
The precise situation was before the court in Scott v. Norton Hardware Co. (C. C. A. 4), 54 F. (2d) 1047, 1051. There certain directors of a bank signed a bond guaranteeing the sufficiency of the assets which were being transferred *406to another bank. Having made good on their guaranty, they sought reimbursement of the bank for which they had become sureties and were met with the claim that they were mere volunteers. The court speaking through Judge Parker, said:
“Little need be said as to the contention made that Scott and Maiden are to be denied the rights of reimbursement or subrogation on the ground that they are volunteers. Certainly a guarantor who is held to liability under a bond which he has executed is not a volunteer in any sense in which that term has ever been used in the law. The fact that appellants were under no legal obligation to sign the bond in the first place is, of course, immaterial. A surety is not to be denied reimbursement or subrogation because he signed for accommodation rather than for profit. On the contrary, the accommodation surety has always been one of the favorites of the law.”
The next contention is that the guaranty of these deposits by the bank’s officers violated the principle that a bank has no power to pledge its assets to secure deposits of private funds, and was hence contrary to public policy and null and void.
On this point it is said in 7 Am. Jur., section 490.5, p. 351: “The fact, however, that the bank may have no power to guarantee repayment of deposits by a pledge of its assets does not preclude its officers or stockholders from entering into an agreement with depositors by which they bind themselves as individuals to repay deposits, for such a personal guaranty in no way increases or alters the bank’s obligation to the depositor. The validity of such agreements has been sustained in a number of cases; and other cases, which have considered a guaranty of a deposit by a stockholder of the bank of deposit as affected by the Statute of Frauds, have apparently assumed that otherwise the contract is valid.”
See also, Citizens State Bank v. Schmitz, 219 Wis. 552, 263 N. W. 702, 704, 103 A. L. R. 1027, in which the validity of a guaranty of bank deposits by stockholders of a bank was upheld. The court there pointed out that the guaranty did *407not violate the State statute providing that “No bank or bank officer shall give preference to any depositor or creditor by pledging the assets of the bank as collateral security,” because no asset belonging to the bank was pledged as collateral security by virtue of the guaranty in question.
In the recent case of Looney v. Belcher, 169 Va. 160, 192 S. E. 891, this court upheld the validity of a guaranty of deposits by the officers and directors of a bank, holding that the forbearance by the depositor to withdraw his money from the bank was a sufficient consideration to support the guaranty.
After the trial court had announced its decision to allow the set-off here involved, Charles wrote the receiver requesting that the set-off be applied to a judgment which the bank had obtained against Charles and the latter’s wife.
The failure of the court to follow this request is assigned as error.
This action of the trial court was plainly right. It applied the set-off to those judgments in favor of the bank which were prior liens on Charles’ lands. The judgment against which Charles requested that the set-off be applied is inferior to the judgments in favor of the creditors who have successfully maintained the offset.
Charles having been adjudicated a bankrupt has no further interest in the disposition of the proceeds derived from the sale of his lands. The action of the trial court merely results in the application of the proceeds of the sale to the several judgments in the order of their priority. This is proper.
On the whole our conclusion is that there is no error in the decree appealed from, and it is accordingly
Affirmed.