
28 Cal.2d 627 (1946)
HERBERT C. JONES, Appellant,
v.
FRANK C. MORTIMER, as Building and Loan Commissioner, etc., et al., Respondents.
S. F. No. 17174. 
Supreme Court of California. In Bank.  
July 23, 1946.
 Kenneth R. Malovos and Herman J. Mager for Appellant.
 Robert W. Kenny, Attorney General, John J. Dailey, Roy D. Reese and Lenore D. Underwood, Deputies Attorney General, for Respondents.
 CARTER, J.
 This is an appeal from an order denying plaintiff's petition to enforce the payment of a judgment. The appeal is upon an agreed statement.
 In February, 1933, the California Mutual Building and *629 Loan Association became insolvent and was taken over by the state Building and Loan Commissioner (a successor commissioner is defendant herein) and since that time has been in the process of liquidation. In December, 1933, plaintiff commenced an action against the association and commissioner to recover for services rendered to the association. In 1938, the commissioner levied an assessment against all of the stockholders of the association of $100 per share for the purpose of paying the debts of the association. Plaintiff, being the holder of four shares, was assessed $400. The assessment became payable in December, 1938, and was not paid by plaintiff. During the period from December, 1935, to December, 1939, the commissioner paid creditors' claims to the extent of 50 per cent of the amount approved by him against the association. In 1940 plaintiff obtained a judgment, which has become final, against defendants commissioner and the association in his action commenced in 1933 for services in the sum of $1,536.10 and costs, the judgment being payable in the course of liquidation. The assessment of $400 levied against plaintiff was not pleaded as a counterclaim by the commissioner in that action. A claim based upon the judgment was set up in the records of the liquidation proceeding as an approved claim payable in the course of liquidation. The commissioner set off the assessment of $400 against the liquidating dividends of 50 per cent theretofore declared, leaving a balance on his records of $368.05 and costs, as payable to plaintiff on his judgment from such dividends. Upon being notified of the set-off plaintiff refused to accept it. In 1941 the commissioner commenced an action against the stockholders including plaintiff to recover the assessment levied but it has not been prosecuted. In 1944 plaintiff filed the proceeding here involved in the action in which he obtained judgment asking for a writ of execution or other relief to obtain enforcement of the judgment.
 [1] To support his claim that the commissioner may not set off the assessment against his judgment, plaintiff contends that the right was lost by virtue of the commissioner's failure to file a counterclaim for the amount of the assessment in plaintiff's action, relying upon section 439 of the Code of Civil Procedure. That section provided in 1940 (the time that plaintiff obtained judgment in his action), and at the present time: "If the defendant omits to set up a counterclaim upon a cause arising out of the transaction set forth *630 in the complaint as the foundation of the plaintiff's claim, neither he nor his assignee can afterwards maintain an action against the plaintiff therefor." (Emphasis added.) Aside from any other reason the italicized portion of that section prevents its application here. As far as appears from the record, the transaction involved in plaintiff's action was for services rendered to the association, whereas the assessment against plaintiff was based on his liability as a stockholder of the corporation. Giving the word "transaction" its broadest meaning we cannot bring the two claims here involved within its meaning. They arose out of two separate and wholly independent transactions. Indeed plaintiff's only argument to support his contention is that the transaction which is common to both claims is the liquidation of the association. That liquidation led to the assessment because of plaintiff's stockholder's liability, but there is no apparent connection between it and plaintiff's claim for services.
 [2] It is asserted that by reason of a provision in the Building and Loan Association Act (Stats. 1931, p. 483, as amended; 1 Deering's Gen. Laws, 1944, Act 986) the assessment levy cannot be offset against plaintiff's creditor's claim, and in that connection, that to permit such offset would deprive plaintiff of his right to attack the validity and to resist the collection of the assessment or present whatever defenses he might have to it. The act provides that the stockholders of a building and loan association shall be individually liable equally and ratably for the debts of the association. (Stats. 1931, p. 483,  7.01.) The liability so imposed "shall be enforced exclusively pursuant to this section and the next succeeding three sections of this act." (Emphasis added.) (Id.,  7.02.) When an association is in the hands of an appropriate officer for liquidation he may enforce the imposed liability and to that end may levy assessments "without previous judicial ascertainment of the necessity of such action and the action of such officer in levying such assessment shall be conclusive on the stockholders as to the necessity for such assesmsent." (Id.,  7.02.) If the stockholder fails to pay the assessment on the date due "a right of action shall immediately accrue to the commissioner ... to recover the amount of said assessment or the amount remaining unpaid thereon from the stockholder or stockholders failing to pay said assessment in full. Such officer shall have full power to maintain an action or actions in this state, or in any other state *631 or country, to enforce and collect any sum or amounts due and payable and remaining unpaid upon any such assessment from any stockholder or stockholders failing to pay the same in full; and in any such action such officer may join as defendants one or more stockholders; and in any such action such officer shall have the right of attachment as in other actions upon unsecured debts; ..." (Emphasis added.) (Id.,  7.03.) The other two of the three sections to which reference is made refers to matters not here pertinent. (Id.,  7.04, 7.05.) Properly interpreted those provisions do not exclude the right of the commissioner to set off a claim on his records against an assessment. The liability that is to be enforced exclusively as therein provided is that of the stockholders for the debts of the association. The method of enforcement that must be followed is the ascertainment of the necessity therefor and the levying of an assessment on the stockholders by the commissioner, that is, he is not required to resort to court action to levy the assessment and the use of the word exclusive eliminates that method. The mere fact that a right of action accrues for the collection of the assessment when it is imposed does not indicate that collection by action is the only method for taking the additional step of collecting the assessment. The reference to maintaining an action for the enforcement of the assessment after it is levied is merely an empowering and permissive provision and does not purport to be exclusive of other methods of collection. There can be no doubt that the commissioner could undertake to collect the assessment by making a demand on the stockholder. He is not compelled to bring an action. Nor can it be doubted that the commissioner could have set up the assessment by way of counterclaim against plaintiff in his action on his claim. (Code Civ. Proc.,  438.) Indeed, plaintiff so asserts in his argument that the claim to the assessment is lost by the failure of the commissioner to set it up, but as above seen, section 439 of the Code of Civil Procedure providing for the loss of a counterclaim is more restricted than section 438 which authorizes counterclaims inasmuch as it requires that the claim be based on the transaction in the complaint as the foundation of plaintiff's claim while the latter section imposes no such limitation. There is no reason why the setoff should not be permitted on the books of the commissioner when he may set it up as a counterclaim. The only difference would be the lack of opportunity, when there *632 is no court action, of contesting the assessment, a matter later discussed herein.
 [3] There is authority in the general law for a setoff in the instant case. It is provided that: "When cross-demands have existed between persons under such circumstances that, if one had brought an action against the other, a counterclaim could have been set up, the two demands shall be deemed compensated so far as they equal each other, and neither can be deprived of the benefit thereof by the assignment or death of the other." (Code Civ. Proc.,  440.) The cross-demands in the instant case are of such a character.
 Plaintiff complains, however, that if a setoff is permitted he is denied the opportunity to present any defense he may have to the assessment. He had such opportunity in the instant proceeding. He endeavored to force the commissioner to pay his judgment without deducting the assessment of $400. Neither his pleading in this proceeding nor the answer of the commissioner is before this court, but presumably the latter set up the assessment and the claim of offset. Manifestly, the plaintiff's petition was an attack upon the offset. Nothing appears from the agreed statement of facts which would justify a refusal to recognize the assessment. [4] There is the matter of the statute of limitation having run on the assessment. Assuming that to be true the assessment is still a proper setoff. It has been held generally or assumed without discussion that a counterclaim in its setoff aspects may be defeated by the defense of the statute of limitation. (Bliss v. Sneath, 19 Cal. 526 [51 P. 848]; Lyon v. Petty, 65 Cal. 322 [4 P. 103]; Curtiss v. Sprague, 49 Cal. 301; Griffin v. Porter, 54 Cal.App.2d 254 [128 P.2d 820]; Estate of Clifford, 16 Cal.App.2d 123 [60 P.2d 302]; Andrade v. Azevedo, 9 Cal.App.2d 495 [50 P.2d 80]; Murphy v. Davids, 55 Cal.App. 416 [203 P. 802]; see Estate of Cates, 195 Cal. 319 [232 P. 972]; In re Smith, 108 Cal. 115 [40 P. 1037]; Estate of Schaeffer, 53 Cal.App. 493 [200 P. 508]; 73 A.L.R. 574; 16 A.L.R. 326.) On the other hand it has been intimated that where claims are compensated under section 440 of the Code of Civil Procedure the statute of limitations is not a bar. (Moore v. Gould, 151 Cal. 723 [91 P. 616].) But none of these cases, holding the statute to be a bar, except Lyon v. Petty, supra, mention section 440 of the Code of Civil Procedure heretofore quoted. The cross-demands here, in the language of section 440, "have existed between persons"-- *633 plaintiff and defendant. They existed between them at least at the time the assessment became due and plaintiff's action on his claim was pending. They have existed under circumstances where if either brought an action thereon the other could have set up a counterclaim. Defendant could have set up the assessment as a counterclaim when the two coexisted and there was no question about the statute of limitation on either claim. The next step is that the demands are compensated. That can mean nothing more or less than that each of the claimants is paid to the extent that their claims are equal. To the extent that they are paid, how can the statute of limitation run on either of them? There is no outstanding claim upon which the statute may run. It is discharged. In Lyon v. Petty, supra, the court was concerned with section 438 requiring that the cross-demands coexist at the time of the commencement of the action. Since the amendment of that section that is not necessary. (Bond v. Farmers & Merchants Nat. Bank, 64 Cal.App.2d 842 [149 P.2d 722].) Of course, if there is some defense to one of the claims, that is a matter which the one having the defense is entitled to have determined. The instant proceeding afforded plaintiff such an opportunity.
 [5] There is an additional principle which prevents the statute of limitations from defeating defendants' setoff. The statute of limitations is not available to plaintiff as to defendants' counterclaim if the period has not run on it at the time of commencement of plaintiff's action even though it has run when the counterclaim is pleaded. (Union Sugar Co. v. Hollister Estate Co., 3 Cal.2d 740 [47 P.2d 273]; Whittier v. Visscher, 189 Cal. 450 [209 P. 23]; McDougald v. Hulet, 132 Cal. 154 [64 P. 278]; Perkins v. West Coast Lumber Co., 120 Cal. 27 [52 P. 118]; Estate of Schaeffer, 53 Cal.App. 493 [200 P. 508].) Defendants' counterclaim here did not arise until after the commencement of the action, but that did not make it improper as a counterclaim. (Bond v. Farmers & Merchants Nat. Bank, supra.) The proceeding instituted by plaintiff, although after final judgment, was in his action--to enforce the judgment without regard to the counterclaim. "... A judgment debtor who has ... become the owner of a judgment or claim against his judgment creditor, may go into the court in which the judgment against him was rendered and have his judgment offset against the first judgment. ... The fact that the demand *634 of the plaintiff has not been reduced to judgment is no obstacle to its allowance as a set-off against a judgment." (Harrison v. Adams, 20 Cal.2d 646, 649 [128 P.2d 9].) Hence, for the purpose of the running of the statute of limitations, where the procedure followed is like that in the instant case, the commencement of plaintiff's action tolled the running of the statute on defendants' counterclaim. In a sense the procedure pursued is a continuation of plaintiff's action.
 Plaintiff asserts that because the payment of dividends to him was withheld wrongfully by reason of the improper offset, he is entitled to interest. Inasmuch as we hold the offset proper that issue need not be decided.
 The order is affirmed.
 Gibson, C.J., Edmonds, J., Traynor, J., and Schauer, J., concurred.
