T. C. Swindell, sheriff of Hyde County, had on deposit in the Bank of Belhaven $1,522.12 in the name of T. C. Swin-dell, sheriff. The funds so deposited came into his hands as sheriff and as county funds which he must account for and which he was obligated to pay over- to the county of Hyde. C. S., 4270, in part is as follows: “If any clerk of the Superior Court or any sheriff, treasurer, register of deeds or other public officer of any county or town of the State shall embezzle or wrongfully convert to -his own use, or corruptly use, or shall *564misapply for any purpose other than that for wbicb the same are held, or shall fail to pay oyer and deliver to the proper persons entitled to receive the same when lawfully required so to do, any moneys, funds, securities or other property which such officer shall have received by virtue or color of his office in trust for any person or corporation, such officer shall be guilty of a felony.”
The Bank of Belhaven became insolvent and its affairs are being liquidated by defendant, Corporation Commission. At the time of closing ■ its doors, T. 0. Swindell, sheriff, as before mentioned, had on deposit $1,522.12. T. 0. Swindell in his own name had on deposit $9.99. At the time T. 0. Swindell was indebted to the bank in the sum of $800 on a note signed by him and as an endorser on two other notes, one for $500, and the other for $370.75, making a total of $1,670.75.
In an action brought by proper officials, judgment was entered against the plaintiff as surety on T. O. Swindell’s bond as sheriff on payment of a certain sum and by the judgment plaintiff was subrogated to all the rights of the county in and to the deposit in the Bank of Belhaven of $1,522.12, in the name of T. C. Swindell, sheriff, and which the sheriff was obliged to pay to the county.
It is contended by defendant, Corporation Commission of North Carolina, liquidating agent of the Bank of Belhaven, that it has the right to set-off the $1,522.12 in the name of T. C. Swindell, sheriff, and which the sheriff was obligated to pay to the county, against the personal indebtedness of the sheriff of $1,-670.75 due by him to the bank by note and as endorser. We cannot so hold.
The sheriff, if he embezzled it or wrongfully converted it to his own use or corruptly used it or misapplied it for any purpose or failed to pay over and deliver it to the proper party, was guilty of a. felony. In the present action the sheriff was obligated to pay it over to the county. This was a trust fund of the most inviolate kind — the fund of a public official.
In Marshall v. Kemp, 190 N. C., at p. 493, it is said: “The liability of a public officer differs from that of a trustee or a bailee. The general rule is that an officer who enters into an obligation to account for money received by virtue of his office insures the safety of all funds received by him in his official capacity — insures, as Justice Rodman said, against loss by any means whatever, including such losses as arise from the act of God or the public enemy. Commissioners v. Clarke, 73 N. C., 255. In Havens v. Lathene, 75 N. C., 505, Chief Justice Pearson expressed the same opinion by saying that such officer is accountable as a debtor who can relieve himself only by payment. His liability is founded on-public policy and the evil consequences which would follow from a. less rigid rule as well as on the language of his official bond.”
*565In Commissioners v. Clarke, supra, at p. 257, it is said: “It must not be inferred from this, however, that tbe money belongs to the sheriff, to be dealt with as his own, as a bank deals with its deposits, or otherwise than he is permitted by law.”
This rigid rule that public officers are insurers does not ordinarily apply to trustees and bailees, unless made so by special contract. Sams v. Cochran, 188 N. C., 731; Marshall v. Kemp, supra.
The principle as to set-offs is thus stated in 7 C. J., part sec. 357, pp. 658-9: “In order to warrant a set-off it is of course necessary that the money deposited shall belong to the depositor, and hence the rule does not apply where the bank has knowledge that the moneys are held by the depositor in trust, in his capacity as a public official, or as agent, factor or broker.” See Wilbur v. Mortgage Loan Co., 149 S. E., 262 (S. C.).
“A bank having notice that a deposit is held by one for the use of another, or as security for another, has only such right of set-off as is not inconsistent with the rights of the latter. United States v. Butterworth-Judson Corp., 267 U. S., 387, 45 Sup. Ct. Rep., 338”; 50 A. L. R., 633. See Davis v. Industrial Mfg. Co., 114 N. C., 321; Moore v. Bank, 173 N. C., 180; Trust Co. v. Spencer, 193 N. C., 745.
We think that Coburn v. Carstarphen, 194 N. C., 368, 55 A. L. R., 819, is distinguishable from the present action. In the Coburn case it affirmatively appears that the treasurer, Carstarphen, was solvent; that as treasurer he was the insurer of the deposit. It was held in Commissioners v. Clarke, 73 N. C., 255, that the sheriff was liable although the money had been placed in an iron safe and stolen therefrom. The county was not protesting against the set-off, nor did it claim the deposit. Carstarphen, with the consent of the county, had a right to make the set-off. There was no misapplication unless done with a fraudulent intent. The county looked to the solvent treasurer for payment. The true situation, therefore, was that the loss was surely to fall upon the solvent treasurer and the solvent treasurer, by reason of his proposed payment of the deposit to the county, was the substantial and equitable owner of the deposit and of the right thereunder against the bank.
In the present action the sheriff is insolvent. The county looked to this deposit, which was in the name of T. C. Swindell, sheriff, in his official capacity. It did not belong to him personally, but the county was the cestui que trust and the beneficial owner. The sheriff being insolvent, action was brought by the county against him and plaintiff corporation. The action was on the sheriff’s bond for a settlement. The county in the adjustment with the plaintiff bondsman of what the insolvent sheriff-owed the county, this deposit in the sheriff’s name belonging to the county, was taken in consideration. The rights of the county as beneficial owner., in the settlement with plaintiff, was by the judgment *566practically assigned to plaintiff or plaintiff was subrogated to tbe rights of tbe county, tbe beneficial owner. Tbe bank bas no claim against tbe county, and never did baye; its claim was against T. C. Swindell personally. Tbe plaintiff is tbe equitable owner acquiring its rights from the county in this official’s deposit, hence there can be no set-off by tbe defendant, liquidating agent. Equitable principles depend on tbe facts of tbe particular case.
Tbe judgment of tbe court below- is
Affirmed.