February 10, 1930, defendant executed and delivered to plaintiff county of Oakland a depository bond in the penal sum of $50,000, which bond was continued in force to a date subsequent to June 13, 1931. The bond was given to entitle the Pontiac Commercial & Savings Bank to qualify as a depository of moneys and funds of the county of Oakland, pursuant to 1 Comp. Laws 1929, §§ 1193-1202.
June 13, 1931, the bank closed its doors and defaulted in the performance of the conditions of said bond by refusing to pay the funds of the county then on deposit with the bank. When the bank failed it had depository bonds running to the county in the total sum of $825,000 and the total deposits subject to withdrawal by the county treasurer amounted to $2,160,860.53. The county has received dividends from the insolvent bank in the amount of $183,000.
*440Defendant’s bond contained tbe following paragraphs :
“If tbe amount of tbe obligee’s deposit at tbe time of tbe default of tbe principal does not exceed tbe amount of tbis bond, tbe surety shall be subrogated to all rights of tbe obligee against tbe principal and any other person or corporation, as respects such default; and the obligee shall execute all papers required, and shall co-operate with tbe surety to secure to the surety such rights.
“If the amount of tbe obligee’s deposit at tbe time of tbe default of tbe principal exceeds tbe amount of tbis bond, tbe surety shall be entitled to share with tbe obligee tbe amount of any dividend or payment received from tbe principal in tbe proportion that the amount of this bond bears to tbe total .amount of tbe deposit at the time of the default of tbe principal. Tbe surety shall be subrogated in tbe same proportion to all tbe rights of tbe obligee against any other person or corporation as respects the default on tbe part of tbe principal; tbe obligee shall execute all papers required, and shall cooperate with tbe surety to secure to tbe surety such rights.”
Upon refusal of defendant to pay, tbe plaintiffs brought suit and the lower court awarded judgment for the plaintiffs in tbe amount of tbe bond together with interest from tbe day of the bank’s default.
Defendant contends that under the terms of the bond the guaranty covers only funds of Oakland county and that moneys held by the county temporarily as custodian only are not covered. This contention of the defendant is without force, as the case of County of Muskegon v. Michigan Surety Co., 264 Mich. 65, decided that moneys collected by the county treasurer and deposited in the depository bank are protected by the depository bond, although they be*441long to other governmental agencies and must eventually be paid over to them.
Defendant next contends that the subrogation clause in the bond is valid and enforceable. This clause provides that if the amount of the obligee’s deposit at the time of default exceeds the amount of security, the surety shall be entitled to share with the obligee dividends received in the proportion that the amount of the bonds bears to the total amount of the deposit at the time of default, and that the obligee shall execute all papers required to secure to the surety such rights. The effect of this clause is to require as a condition precedent to defendant’s liability the execution of documents by plaintiffs directing the receiver to pay defendant a certain proportion of the dividends paid by the bank before full reimbursement has been received by the county.
The real question is whether such a subrogation clause is valid under the facts as shown in this case.
In determining this question we must have in mind that there must be read into every statutory bond the provisions of the statute and that stipulations and conditions at variance with the statute must be read out of the bond. The parties are held to know the law and to have made the contract with that knowledge in mind. County of Muskegon v. Michigan Surety Co., supra; Lawrence v. American Surety Co. of New York, 263 Mich. 586 (88 A. L. R. 535).
The applicable statute (1 Comp. Laws 1929, § 1195) prescribes:
“Before any deposit shall be made with any bank or banks as aforesaid, such bank or banks shall execute and deliver * * * a good and sufficient bond in an amount at least equal to the maximum amount to be deposited in such bank, and with such sureties as shall be approved by such board and the prose*442cuting attorney of the county. Such bond shall be made to the county and shall be conditioned for the safekeeping and repayment of such moneys or any part thereof on demand and the payment of said interest, and shall contain such other conditions as may be required by the board of supervisors or the board of county auditors, not inconsistent with the provisions of this act.”
Under the principles of equitable subrogation, one who has paid another’s debt is not entitled to subrogation until the claim of the creditor has been satisfied in full. Stearns on Suretyship (3d Ed.), § 245; 9 A. L. R. 1596. Where the principal debtor is insolvent (as in the instant case), a creditor who is secured for part of his claim by a surety may prove the full amount of his claim against the bankrupt, in addition to enforcing payment from the surety to the limit of the surety’s liability, but any dividends received by the creditor above the total amount of his claim are held in trust for the surety. Arnold, Suretyship and Guaranty, § 216. In other words, where the surety is liable for only a part of the debt, he is not entitled to participate in dividends until the creditor is paid in full. Commissioner of Banking v. Chelsea Savings Bank, 161 Mich. 691.
The defendant relies upon the case of Lawrence v. American Surety Co. of New York, supra, to support its contention that the subrogation clause is valid and enforceable. The issue involved in that case was the validity of the “pro rata” clause under which the liability of the surety was limited to a proportionate amount of the total loss based on the ratio of the defendant’s bond to the total of all bonds insuring the loss. It was held that this clause merely specified a maximum liability without qualifying the obligation of the bond. The decision in the *443 Lawrence Case, supra, was based upon the following statute (1 Comp. Laws 1929, § 348):
“Sec. 3. The State treasurer is her.eby further instructed to require of any bank, before he shall have made it a depository of surplus funds belonging to the State, good and ample security, to be approved by the said State treasurer, the auditor general and the secretary of State, for the safekeeping and reimbursement of such surplus funds, whenever called for, and the payment of such rate of interest as the State treasurer, in his discretion, shall deem best for the interest of the State.”
In the instant case the subrogation clause deals, not with a limitation on the amount of liability, but with a refunding or canceling of a portion , of the initial liability as a condition for the payment of the remainder. In short, it means contracting with the county officials to permit the surety to share with the county in the dividends from the assets of the principal before the county has been reimbursed in full.
While the statute does not expressly forbid a clause of the kind in question, neither does it expressly authorize it. The purpose of the statute is to provide full protection for public funds, and such purpose would be frustrated by permitting public officials to agree to conditions in depository bonds limiting the liability of the surety and depriving the public of the full measure of protection contemplated by the statute. It is argued by the defendant that the inadequate protection was due to the failure of the county' officials to secure bonds equal to their total deposits. This argument overlooks the possibility of insolvency of one or more of the surety companies. In such a case, the county would, by means of the subrogation clause in defendant’s bond, *444be deprived of substantial rights. It is not unjust that the county have the double protection of liability of the surety and dividends from the insolvent bank. Commissioner of Banking v. Chelsea Savings Bank, supra; Buhrer v. Baldwin, 137 Mich. 263. Moreover, a violation of statute by the public officials cannot be complained of or relied upon by the surety. Buhrer v. Baldwin, supra; People v. Bankers’ Surety Co., 158 Mich. 30; Commissioner of Banking v. Chelsea Savings Bank, supra; People of Sioux County, Nebraska, v. National Surety Co., 276 U. S. 238 (48 Sup. Ct. 239); Scotts Bluff County v. First National Bank of Gering, 115 Neb. 273 (212 N. W. 617); State v. United States Fidelity & Guaranty Co., 210 Wis. 178 (246 N. W. 434); Village of Wyoming v. Citizens Trust & Guaranty Co. of West Virginia, 9 Ohio App. 225; Western Casualty & Guaranty Insurance Co. v. Board of Commissioners of Muskogee County, 60 Okla. 140 (159 Pac. 655, L. R. A. 1917B, 977).
In Montana, under a statute substantially like that in Michigan, a late case held such a subrogation clause as we have before us void and inconsistent with the statute. American Surety Co. of New York v. Clarke, 94 Mont. 1 (20 Pac. [2d] 831). The requirements of our statute constrain us to take the same view.
The plaintiff claimed, and the lower court allowed, interest on the face amount of defendant’s bond from the time the bank defaulted. Defendant claims that its liability, if any, is limited to the penal sum of the bond. The better rule seems to be that interest should be allowed upon the obligation of the surety to the amount accrued from its own default in unjustly withholding payment after being-notified of the default of the principal. United States v. United States Fidelity & Guaranty Co., *445236 U. S. 512 (35 Sup. Ct. 298); New Amsterdam Casualty Co. v. United States Shipping Board Emergency Fleet Corp., to use of United States (C. C. A.), 16 Fed. (2d) 847; Stearns on Suretyship (3d Ed.), § 70.
A number of cases have been cited by defendant to show that the law in Michigan limits the recovery to the penalty named in the bond. Fraser v. Little, 13 Mich. 195 (87 Am. Dec. 741); Spencer v. Perry, 18 Mich. 394; Grand Lodge of Independent Odd Fellows v. Morrison, 42 Mich. 521; White Sewing Machine Co. v. Dakin, 86 Mich. 581 (13 L. R. A. 313); People’s Savings Bank v. Campau, 124 Mich. 106.
In none of these cases was the precise issue of the instant controversy involved. Fraser v. Little was an action against a gratuitous surety on a replevin bond. The statute required a bond for double the assessed value of the chattel and might well have been supposed to furnish ample protection. Nevertheless, -there was a strong dissenting opinion by Christiancy, J.
Spencer v. Perry, Grand Lodge of Independent Odd Fellows v. Morrison, and White Sewing Machine Co. v. Dakin did not involve questions of interest at all but of the principal sum. Recovery was naturally limited to the penalty of the bond.
People’s Savings Bank v. Campau was an action on a bond given by stockholders as sureties for the corporation. The principal and interest of the debt amounted to more than the face of the bond. Eecovery was limited to the penal sum of the bond, the court feeling itself bound by the cases cited above although conceding the better rule to be otherwise.
Another case not cited in the briefs is People v. Hanaw, 106 Mich. 421, an action on a criminal recognizance. The disallowance of interest in this case *446depended on the statutory provision that judgment should be for the penalty of the recognizance.
It appears to us that none of the Michigan cases relied upon have determined that a commercial surety is not liable for interest on its obligation due to its own default. A bond is no more than a contract under seal and should bear interest from the date due like every contract obligation. Of course no liability of the surety exists until the default of the principal, but upon default of the principal and notice to the surety, the debt becomes the obligation of the surety and should bear interest from that date.
In the instant case the record is not clear as to the time the surety was notified of the default of the principal. The cause will be remanded to the trial court for further proof as to the date of such notice. Judgment may be entered in favor of plaintiff for $50,000 together with interest from the date defendant was notified of the bank’s default. Costs to plaintiff.
Nelson Sharpe, C. J., and Potter, North, Fead, Wiest, Butzel, and Bushnell, JJ., concurred.