
37 Cal.App.2d 551 (1940)
H. R. JACKSON (Substituted Plaintiff), Appellant,
v.
EMMA L. LACY, Executrix, etc., et al., Respondents.
Civ. No. 2513. 
California Court of Appeals. Fourth Appellate District.  
February 29, 1940.
 P. E. Keeler for Appellant.
 Meserve, Mumper, Hughes & Robertson and Lawler & Felix for Respondents.
 Griffin, J.
 This is an appeal from a judgment of dismissal after an order sustaining demurrer to amended and supplemental complaint without leave to amend. Plaintiff and appellant, on October 10, 1934, filed an original complaint. Several amendments followed. In the second amended complaint denominated "Complaint to Establish Claim to Sequester Funds and for Declaratory Relief", filed on January 13, 1937, the Farmers & Merchants National Bank of Los Angeles, a banking corporation, hereinafter referred to as the bank, was, by order of court, made a party defendant. After the interposition of demurrers by both defendants, and following an amendment to the second amended complaint, the court sustained the several demurrers without leave to amend. A judgment of dismissal followed. Plaintiff appealed from the judgment. The second amended complaint alleges generally that on May 20, 1930, the Whitlock Manufacturing Company, a corporation, made, executed and delivered to the Farmers & Merchants National Bank of Los Angeles a certain 30-day promissory note in the sum of $25.000, which note contained an endorsement and guarantee by N.W. Stowell, together with William Lacy and one F. V. Gordon; that thereafter on the 25th day of September, 1931, a suit was filed in the Superior Court of Los Angeles County by the Farmers & Merchants National Bank of Los Angeles against N.W. Stowell upon certain promissory notes hereinafter mentioned, including said note for $25,000, said action being numbered 328288; that one of said notes was for the principal sum of $95,775.26, dated February 18, 1931, due 30 days after date, and was executed by and was the personal and principal obligation of N.W. Stowell; that upon each of the other notes above mentioned, *554 Whitlock Manufacturing Company was the maker and the amount, date and maturity of each of said notes, together with the guarantee upon each, are as follows, to wit:
 Tabular Material Omitted
 The second amended complaint further alleges that the interest on all of said notes executed by Whitlock Manufacturing Company at the time of the commencement of said action by said bank against said N.W. Stowell was paid down to the 6th day of May, 1931, and there was remaining due and unpaid on said individual note of said N.W. Stowell the sum of $27,603.12; that prior to the execution of any of said notes said N.W. Stowell, together with E. D. Reiter, H. S. Haffer and H. P. Usher, executed and delivered to said Farmers & Merchants National Bank of Los Angeles their joint and several guaranty in writing, dated December 7, 1929, wherein and whereby they and each of them guaranteed to said bank the prompt payment of all indebtedness which said Whitlock Manufacturing Company did then or at any time thereafter might owe to said bank up to, but not to exceed the sum of $350,000, which said written guaranty continued in full force and effect at all times from and after the date thereof; that on April 7, 1930, said N.W. Stowell and his wife executed and delivered to said Farmers & *555 Merchants National Bank of Los Angeles an instrument in writing in form a grant deed, but actually intended as a mortgage, wherein and whereby said guarantors conveyed to said bank legal title to certain real property in Los Angeles, which said deed was given to secure the obligations and indebtedness of said N.W. Stowell, as evidenced by the promissory notes hereinbefore described; that in said action No. 328288, judgment was duly given and made in favor of the plaintiff therein, said bank, against the original plaintiff herein, N.W. Stowell, for the sum of $514,867.40 on the 27th day of September, 1932, and by said judgment it was further ordered that said deed be foreclosed in the manner provided by law or the foreclosure of mortgages on real property, and that the proceeds derived from the sale thereof should be applied in the satisfaction and/or reduction of the amount due thereon; that thereafter such proceedings were had pursuant to said judgment; that the real property was sold on November 15, 1932, at public sale for the sum of $400,000 and after deducting therefrom the fees, etc., amounting to $466.50, the balance of said purchase price remaining, to wit, the sum of $399,533.50 was applied upon said judgment, leaving a balance at that time of $120,740; that on August 10, 1931, Stowell conveyed to Corona Development Co. all his right, title and interest in the property described in the deed to the bank which was being held as security for the loan; that said F. V. Gordon is, and ever since said foreclosure sale has been insolvent and unable to contribute any part of his proportionate share of the principal and interest on said promissory note of $25,000 upon which he, said N.W. Stowell, and William Lacy, now deceased, were coguarantors; that on the 12th day of January, 1933, N.W. Stowell caused to be filed with the defendant Emma L. Lacy, as executrix of the estate of William Lacy, deceased, a creditor's claim, setting out a $130,000 note in addition to the $25,000 note and the guarantee above mentioned, together with the following statement: "The claimant likewise files his claim against this estate for the purpose of charging said estate with all and any legal rights of contribution to which this claimant may be entitled under and by virtue of the above endorsement and guarantee." The claim was rejected on July 10, 1934. The cause of action on the $130,000 note was dropped from the *556 amended complaint. Plaintiff prays for an order sequestering sufficient funds in the estate of William Lacy, deceased, for the payment of his claim.
 For a second cause of action plaintiff alleges that on January 12, 1933, defendant Emma L. Lacy, as executrix of the estate of William Lacy, deceased, approved and allowed the claim of defendant Farmers & Merchants National Bank of Los Angeles for the sum of $25,000 and interest, the same being a claim in due form for the full amount of the note dated May 20, 1930; that an actual controversy exists between the parties hereto with reference to the amount remaining due and unpaid upon said note for $25,000 since the foreclosure sale mentioned in the first cause of action, as well as the amount which the bank is entitled to receive by reason of said promissory note from said executrix, and as to the amount which said executrix can allow and pay upon said claim of said bank; that an actual controversy further exists as to the amount, if any, which said executrix should allow and pay the substituted plaintiff herein upon and by reason of the claim of N.W. Stowell heretofore filed in said estate as hereinbefore alleged, and whether the liability set forth in said claim has now become absolute, and if so, for what amount, by reason of the facts hereinbefore alleged and the law applicable thereto. The prayer for judgment is that the bank be required to prorate the amount received by it upon the foreclosure sale hereinbefore alleged, to wit, the sum of $399,533.50, between each and all of the several notes included in the judgment of foreclosure herein, aggregating the sum of $514,867.40 on the 27th day of September, 1932, and in particular to apply as a credit upon the said note for $25,000, dated May 20, 1930, the proportionate share of the proceeds of said foreclosure sale which the amount due thereon bore to the total amount of said judgment on the 27th day of September, 1932; that the plaintiff's contingent claim hereinbefore referred to be allowed as an absolute claim against the estate of William Lacy, deceased, for one-half of the credit allowed upon said $25,000 note; and that the court declare the rights of the parties hereto in accordance with the facts and the law applicable thereto.
 In brief, the plaintiff seeks to establish a claim against the defendant executrix for contribution upon a note executed *557 to the defendant bank by a corporation upon which her testator was a coguarantor with the plaintiff, and upon which the plaintiff claims to be entitled to a credit by reason of a mortgage executed by N.W. Stowell securing his obligation as a guarantor upon this and other notes executed by said corporation maker to the defendant bank, which mortgage was foreclosed by the bank and a sum realized by it thereon which plaintiff claims should be prorated upon all of the obligations so guaranteed and secured.
 Respondents, in support of the judgment, contend (1) that no cause of action is stated because it is nowhere alleged nor shown that Stowell paid or satisfied the judgment or any part of the indebtedness guaranteed by Stowell, Gordon and Lacy, and that hence no right of contribution in Stowell existed; that the proceeds of the foreclosure sale cannot constitute payment of satisfaction by Stowell, and hence, cannot raise a right of contribution in him, because Stowell, long prior to foreclosure, conveyed the mortgaged property away to a third person; (2) that no cause of action is stated because nothing is alleged entitling plaintiff to application of foreclosure sale proceeds on the note guaranteed by Stowell, Gordon or Lacy; that the law, as applied to the facts set forth, requires application upon other obligations, that is, that the application of payments must be pursuant to the equities of the case; that plaintiff has, and has shown, no equities; that the equities appearing preclude the application sought; (3) that plaintiff's action, as against the bank at least, is barred by the statute of limitations which was one of the grounds of demurrer; (4) that there is a fatal variance between the complaint and the claim filed in the estate of William Lacy, deceased; (5) that the complaint is insufficient for the reason that the allegations are uncertain and ambiguous when tested by both the general and special demurrers and that plaintiff did not, prior to the final order, ask permission to amend the second amended complaint.
 [1] First considering the question of the statute of limitations as applied to the claim of relief as against the bank, it will be noted that the original action against the executrix was instituted October 10, 1934. From the pleadings it appears that the bank, after foreclosure of the mortgage (deed) and sale of the property on November 15, 1932, was ordered *558 to apply the proceeds "in the satisfaction and/or reduction of the amount due ..." The specific manner of application of the proceeds, however, is not alleged or disclosed by the pleadings except that they were applied upon the judgment. Hence, if a cause of action ever existed in Stowell against the bank to obtain a judicial application of payments independently of the foreclosure decree, that cause of action arose and came into being on November 15, 1932. As against the bank this action was not commenced until January 13, 1937, when for the first time the bank was made a party by the filing of plaintiff's second amended complaint. [2] It is of course settled that where a defendant is brought into an action for the first time upon the filing of an amended or supplemental complaint, the filing of the amendment constitutes the commencement of the action in so far as such defendant is concerned. The statutory period runs until the time of the filing of the amendment, and if at any time the action is barred, a party thus subsequently brought in may avail himself of the plea. (16 Cal.Jur., p. 545, sec. 142.) Thus it is shown by the amended and supplemental complaint and the record in this action that more than four years elapsed between the time the cause of action, if any, arose, and the time this action was commenced as against this defendant. Hence, plaintiff's action as against the defendant bank is clearly barred. (Sec. 343, Code Civ. Proc.; Barnes v. Glide, 117 Cal. 1, 6, 7 [48 P. 804, 59 Am.St.Rep. 153]; Grattan v. Wiggins, 23 Cal. 16, 34.)
 [3] Appellant argues in this connection that the bank was a trustee and that limitations do not run against a trustee until repudiation of the trust. There was no trust either before foreclosure or afterwards. Before foreclosure, the status of a mortgagor-mortgagee was in no sense a trust. And after foreclosure (since there was a deficiency, and the sale price was insufficient to satisfy all the secured obligations) the bank held all of the proceeds of the sale as its own. To these it was entitled at the moment the foreclosure sale was completed. The right to obtain and retain such proceeds was of course an elementary incident of the mortgagee's position. It is to be noted that payment was in fact actually made and applied upon the judgment. A mortgage is merely an incumbrance created to pay a debt and not a conveyance *559 in trust. (41 Cor. Jur., p. 290; 37 Cor. Jur., pp. 905, 907, 908, 909 and 910.)
 In Navajo-Apache Bank, etc., v. Desmont, 19 Ariz. 335 [170 P. 798], cited by appellant, a mortgage with power of sale had been foreclosed by exercise of the power, and a surplus over and above the amount necessary to satisfy the secured obligation had resulted. The court held that the mortgagee became a trustee as to the surplus so received. In the instant case the Stowell mortgage provided no power of sale. It was foreclosed under decree of court and sale was held by a commissioner. Upon foreclosure there was no surplus but on the contrary there was a deficiency. It is thus obvious that the Navajo-Apache case, supra, can have no application here. Therefore, the demurrer of the bank to plaintiff's second amended complaint and supplemental complaint was properly sustained as to this ground.
 [4] It is elementary that a party acquires a right of contribution as soon as he pays more than his share but not until then. (Richter v. Henningsan, 110 Cal. 530, 537 [42 P. 1077].) Section 1432 of the Civil Code provides that "A party to a joint, or joint and several obligation, who satisfies more than his share of the claim against all, may require a proportionate contribution from all of the parties joined with him." The right given by this section of the code to a joint obligor is based on the principle of equity that when he has paid money which in equity and good conscience should be paid by another, he should be reimbursed therefor. (Backer v. Grummett, 39 Cal.App. 101 [178 P. 312].) There is no allegation in the complaint that upon any particular method of application of the proceeds of the foreclosure sale the $25,000 note guaranteed by Stowell together with Gordon and Lacy, would have been completely satisfied. The judgment was and ever since has been unsatisfied. At the time the property was taken by foreclosure Stowell had no right, title or interest in it. Therefore, there would be no right of contribution on the part of Stowell until he had satisfied more than his share of the claim against all (Richter v. Henningsan, supra), and a surety has no claim to contribution before he has paid the principal obligation. (6 Cal.Jur., p. 504, sec. 5.) See, also, Taylor v. Reynolds, 53 Cal. 686, 687; Booth v. Friedman, 82 Cal.App. 174 [255 P. 222]; Arp v. Blake, *560 78 Cal.App. 713 [248 P. 750]; Arp v. Blake, 63 Cal.App. 362, 367 [218 P. 773].
 In Consolidated Coach Corp. v. Wright, 231 Ky. 713 [22 S.W. (2d) 108], it was said:
 "The cross-petition was demurrable also because it did not show that the petitioner had paid or satisfied any claim arising from the charges against it ... There must have been a satisfaction of the judgment before suit can be entertained, as the right of contribution or indemnity rests on the theory of an implied contract and is enforced accordingly ... The right of contribution accrues at the time of payment."
 [5] Payment by anyone other than Stowell, even though for Stowell's benefit, would give Stowell no right of contribution. (San Joaquin Valley Bank v. Gate City Oil Co., 36 Cal.App. 791 [173 P. 781]; Worthington v. Keely, 64 Colo. 91 [170 P. 194]; De Paris v. Wilmington Trust Co., 7 Boyce (Del.), 178 [104 Atl. 691, 1 A.L.R. 1352], 6 Cal.Jur., p. 504, sec. 5.) 6 Ruling Case Law, section 2, pages 1036, 1037, recites the rule:
 "Contribution presumes the payment and extinguishment of the debt by one for the benefit of all (Dillenbeck v. Dygert, 97 N.Y. 303 [49 Am. Rep. 525]), and it has been held that the whole debt must have been paid before the action for contribution could be maintained, though the contrary doctrine has also been laid down. If, however, the party making payment pays no more than his proportion, he cannot recover contribution, even though his codebtor has paid nothing. And so, if the payment of the original debt is realized, not from the property of the debtor claiming contribution but from property which he has conveyed, no right to contribution arises."
 [6] The demurrers, therefore, on this ground were properly sustained. Appellant repeatedly refused to amend his complaint with respect to material allegations which were uncertain and ambiguous and with respect to which both general and special demurrers have been sustained. Possibly plaintiff could have amended to cure the uncertain and ambiguous defects, but his repeated refusal to so amend was of itself grounds for sustaining the demurrer without leave to amend. (Billesbach v. Larkey, 161 Cal. 649 [120 P. 31].) Plaintiff did not ask permission to amend. He therefore *561 had no positive right to amend his complaint after the demurrer had been sustained to it, and it cannot be held to be an abuse of discretion to refuse to allow further amendments after a demurrer has been sustained to a second amended and supplemental complaint. (Billesbach v. Larkey, supra.) This action was pending when section 472c of the Code of Civil Procedure was enacted and therefore that section has no application to the instant case.
 [7] Declaratory relief has for its purpose an eclaircissement or a liquidation of doubts with respect to uncertainties or controversies which might otherwise result in subsequent litigation. In view of the opinion expressed as to the above-mentioned grounds for demurrer, the general prayer for declaratory relief in the amended complaint adds nothing to the cause of action. (Welfare Investment Co. v. Stowell, 132 Cal.App. 275, 278 [22 PaCal.2d 529].) Without deciding the other grounds stated in the demurrers, some of which are meritorious, we are impelled to hold, for the reasons expressed, that the court did not err in sustaining the demurrers without leave to amend.
 The judgment is affirmed.
 Barnard, P. J., and Marks, J., concurred.
