Tlie Planters Bank and Trust Company, a corporation engaged in the business of banking, held funding and street improvement bonds issued by the plaintiff in the sum of $8,000, payable on 1 April, 1935, 1941, and 1942. On 19 December, 1931, it closed its doors and the Commissioner of Banks took charge of its assets. At that time the plaintiff had on deposit in the bank the sum of $6,831.66, which was subject to check. For a number of years prior thereto the plaintiff had deposited funds in the bank, and in 1925 had passed a resolution requiring the bank to execute a bond payable to the town to protect it against the loss of its deposits. Upon the refusal of the bank to renew the bond, the parties entered into the written contract set out in the statement of facts. The plaintiff demanded payment of its deposit and, upon the refusal of the Commissioner of Banks to make payment, brought suit to recover the amount of deposit and to get an order for a sale of the bonds it held as security. The defendants resisted judgment on the ground that the bank owned the bonds and had a right to offset against the plaintiff’s demand the amount due the plaintiff on its deposit. The plaintiff denied the asserted right of set-off or counterclaim.
There is diversity of opinion and conflict of authority concerning the effect on the right of set-off of the immaturity of a claim at the time insolvency proceedings are begun. A discussion of the question with annotations appears in the following cases: Gerseta Corp. v. Equitable Trust Company, 43 A. L. R., 320; Prudential Realty Co. v. Allen, 25 ibid., 935; Steelman v. Atchley, 32 L. R. A. (N. S.), 1060; Richardson v. Anderson, 25 L. R. A. (N. S.), 393; Nashville Trust Co. v. Fourth National Bank, 15 L. R. A., 710; Fidelity Trust and Safety Vault Co. v. Merchants National Bank, 9 L. R. A., 108.
The decisions of this Court are in accord with those which hold that a bank may offset the amount it is due for deposits against the indebtedness of a depositor if the depositor’s indebtedness to the bank has matured or if the depositor is insolvent. The principle is stated as follows in Hodgin v. Bank, 124 N. C., 540: “A bank has the right to apply the debt due by it for deposits to anjr indebtedness by the depositor, in the same right, to the bank, provided such indebtedness to the bank has matured. Bank v. Hill, 76 Ind., 223; Knapp v. Cowell, 77 Iowa, 528; Coats v. Preston, 105 Ill., 470; Bank v. Bowen, 21 Kansas, 354; Clark v. Bank, 160 Mass., 26; Bank v. Armstrong, 15 N. C., 519; Muench v. Bank, 11 Mo. App., 144; Morse on Banks, sec. 324; Bank v. Hughes, 17 Wend., 94; Eyrich v. Bank, 67 Miss., 60. Even if the in*175debtedness to tbe bank bas not matured, if tbe depositor becomes insolvent, tbe bank by virtue of tbe right of equitable set-off may apply tbe deposits with it of sucb debtor to bis indebtedness. Dammon v. Bank, 50 Mass., 194; Flour Co. v. Bank, 90 Ky., 225; Trust Co. v. Bank, 91 Tenn., 336; Seed Co. v. Talmage, 96 Ga., 254; Waterman on Set-off, 432.”
Tbe reversal of another proposition laid down in that case does not affect this statement of tbe law. Hodgin v. Bank, 125 N. C., 503. Indeed, tbe principle is approved in Moore v. Bank, 173 N. C., 182; Trust Co. v. Trust Co., 188 N. C., 766; Graham v. Warehouse, 189 N. C., 533; Trust Co. v. Spencer, 193 N. C., 745; Coburn v. Carstarphen, 194 N. C., 368. It is needless to review tbe several decisions in which tbe question is discussed. We do not regard Davis v. Mfg. Co., 114 N. C., 331, which deals with tbe cross-demands of insolvent corporations, as necessarily in conflict with these cases.
In their briefs tbe defendants seem to concede tbe general principle as declared in Hodgin v. Bank, supra; but they say that since tbe bonds at this time will not sell for more than 70 per cent of their par value, tbe plaintiff is for practical purposes insolvent. We cannot agree with tbe defendants. It is admitted that “tbe town of Lumberton is financially solvent.” Tbe market value of tbe best of securities fluctuates. Today it may be low and tomorrow it may be high; it is not always determined by the question of tbe debtor’s financial standing. Our conclusion, therefore, is this: Since tbe town of Lumberton is solvent and tbe bonds are not due, tbe right of set-off is precluded.
Tbe defendants raise another question. Tbe bank assigned tbe bonds to tbe plaintiff “to protect tbe town of Lumberton from any loss on account of deposits made by tbe town with tbe bank.” Tbe defendants say that even if tbe doctrine of offset or counterclaim is not applicable here tbe plaintiff cannot sell tbe bonds until tbe liquidation of tbe bank is completed and tbe percentage of its delinquency is determined. This position can be sustained, if at all, only upon tbe theory that tbe contract between tbe parties is strictly a contract of indemnity.
Technically tbe word “indemnify” is used in tbe sense of giving security or in tbe sense of relieving a party from liability for accrued damage. In a broad sense indemnity signifies that which is given to a person to save him from suffering damage. 31 C. J., 419. Under tbe former practice if a collateral obligation was in strickness an indemnity an action at law could not ordinarily be maintained until some actual loss or damage bad been suffered, but a suit could be prosecuted in a court of equity if it was necessary for tbe prevention of wrongs or tbe enforcement of rights growing out of tbe obligation. Hilliard v. New- *176 berry, 153 N. C., 104; Burroughs v. McNeill, 22 N. C., 297. The distinction. between actions at law and suits in equity has been abolished and under the prevailing system a civil action is a proceeding for the enforcement or protection of a right or the redress or prevention of a wrong. Constitution, Art. IV, see. 1; C. S., 399.
In the interpretation of contracts the intention of the parties as embodied in the entire instrument is the end to be attained, but the intention may be sought from the circumstances surrounding its execution, including the subject-matter, the relation of the parties, and the object of the agreement. Kirkman v. Hodgin, 151 N. C., 588; Hornthal v. Howcott, 154 N. C., 228; Wiley v. Lumber Co., 156 N. C., 210; Faust v. Rohr, 166 N. C., 187; Bank v. Redwine, 171 N. C., 559; King v. Davis, 190 N. C., 737.
The manifest purpose of the contract in question was to prevent damage to the plaintiff by the bank’s holding the funds subject to use on demand of the depositor. The plaintiff is not an individual but a municipal corporation charged with the performance of duties necessary to its government; for its functions are governmental as well as municipal. For purposes of local administration it may be deemed an agency of the State. In the conduct of its business depositing and withdrawing money may usually be regarded as a daily incident. Security for prompt payment may be demanded. In this case the bonds were accepted by the plaintiff in lieu of a “security bond.” The obvious purpose Avould be defeated if the funds were dissipated or “tied up” for the indefinite period required for the liquidation of the bank. We are, therefore, of opinion that the plaintiff is not required to await final settlement by the Commissioner of Banks but may proceed at once to sell the bonds held as collateral security. Judgment
Affirmed.