
83 Wis.2d 852 (1978)
266 N.W.2d 411
MOSER PAPER COMPANY, Plaintiff-Appellant,
v.
NORTH SHORE PUBLISHING COMPANY, Defendant-Respondent:
CITY OF MILWAUKEE, and another, Garnishees-Respondents:
MIDLAND NATIONAL BANK, and others, Impleaded Defendants-Respondents.
MOSER PAPER COMPANY, Plaintiff-Appellant,
v.
NORTH SHORE PUBLISHING COMPANY, Defendant-Respondent:
NORTHWOODS PUBLISHING COMPANY, INC., and others, Garnishees-Respondents: MIDLAND NATIONAL BANK, and others, Impleaded Defendants-Respondents.
Nos. 75-700, 75-701.
Supreme Court of Wisconsin.
Submitted on briefs January 5, 1978.
Decided June 6, 1978.
*854 For appellant the cause was submitted on the briefs of Arthur L. Ebert, Jr., and Ebert & Ebert of Milwaukee.
For respondent the cause was submitted on the brief of Charne, Glassner, Tehan, Clancy & Taitelman of Milwaukee.
CALLOW, J.
This appeal is taken from the unified judgment in two garnishment actions which were tried together. The issue is which of two judgment creditors is entitled to the garnished funds. The plaintiff and appellant in both actions is Moser Paper Company, a Wisconsin corporation which manufactures paper products. Moser holds a $36,469.57 judgment against the North Shore Publishing Co., the principal defendant in both garnishment actions. North Shore is a Wisconsin corporation which published five suburban newspapers and a shopper in the Milwaukee area until it ran into financial difficulties and sold its assets to another publisher. However, the corporation has not been dissolved.
Moser attempted to realize upon its judgment by commencing these two actions against several garnishee defendants. The garnishee defendants in both actions owed debts to North Shore which were part of North Shore's accounts receivable. In both actions North Shore impleaded the Midland National Bank of Milwaukee, the respondent on this appeal, and several taxing authorities, alleging that the impleaded defendants had a right to the funds that were the subject of the garnishment action superior to that of Moser. The nature of Midland's prior claim to the garnisheed funds is not in dispute. In December, 1970, Midland loaned North Shore $60,000, secured by an interest in North Shore's accounts receivable and other property. North Shore's obligation was also guaranteed by its officers and principal shareholders, Eugen Polka and Charles Frey.
After the initial loan to North Shore of $60,000, Midland from time to time renewed the original obligation and advanced North Shore new funds. On August 23, *855 1973, North Shore executed a promissory note evidencing a then total outstanding indebtedness to Midland of $100,000.00.
In 1970 Midland also loaned $40,000 to Polka and Frey as individuals which was used for working capital for North Shore. For this loan Polka and Frey executed a promissory note due upon demand. This note was not secured.
In November, 1973, North Shore defaulted on its obligations to Midland. On November 30, 1973, Midland (1) called due the notes of North Shore, (2) demanded payment of Polka and Frey, (3) offset North Shore's checking account against its obligations, and (4) began to collect some of North Shore's accounts receivable.
Following these steps by Midland to foreclose upon its security, Midland and the officers of North Shore attempted to work out some solution to keep North Shore in business. As a result of these negotiations, on December 7, 1973, Midland agreed to reinstate the existing North Shore indebtedness of $100,000 and the Polka and Frey indebtedness of $40,000. In return, Midland demanded additional security for this loan. Accordingly, North Shore gave Midland a general security interest in all of its property not covered by the previous security agreement. In addition, Polka and Frey again guaranteed the obligations of North Shore, and North Shore guaranteed the obligations of Polka and Frey. These guarantees were to become absolute upon "default" by the obligor. Further, Polka and his wife and Frey and his wife executed mortgages on their respective residences. Each mortgage stated that "This mortgage shall secure any advances made by the mortgagee [Midland] to the mortgagors [the Polkas and Freys], or North Shore Publishing Company, Inc., . . ., for any purpose, at any time before release and cancellation of this mortgage." Each mortgage was made in consideration of $140,000 and would be satisfied upon the payment *856 of $140,000. Polka, Frey, and their wives also executed collateral pledges in which they pledged personal and real property to secure the debts of North Shore, Polka, and Frey.
This renewal of the outstanding indebtedness failed to solve North Shore's financial difficulties, and in the spring of 1974 North Shore again defaulted on its obligations and decided to go out of business.
On May 2, 1974, Community Newspapers, Inc., entered into an agreement with North Shore to purchase all of its intangible assets (its title to and interest in the newspapers, advertising service contracts, subscription lists and accounts, mailing rights, rights to news services, newspaper files, etc.) for $50,000. It also entered into a separate noncompetition agreement with Polka and Frey. Polka and Frey each received $50,000. Midland and other secured creditors also executed releases of their security interests in the assets sold.
As a result of these agreements, Community Newspapers issued $150,000 in checks to various creditors of North Shore, Frey, and Polka, including a $48,471.20 check to Midland. Frey testified that during these negotiations the understanding with Midland was that the proceeds of the $48,471.20 check were to be applied first against the personal obligations of Polka and Frey and second upon the corporate obligations by North Shore. Midland applied the $48,471.20 as agreed, satisfying the personal indebtedness and reducing the corporate indebtedness with the balance.
By August, 1975, North Shore's remaining corporate debt to Midland was $19,332.50. Midland reduced this debt to judgment on August 25, 1975, prior to the commencement of the Moser garnishment actions.
The record does not disclose the nature of North Shore's debt to Moser, other than the fact that it is unsecured and that it was not reduced to judgment until July 31, 1974.
*857 In the garnishment actions, as a defense to the claim that Midland's right to the garnisheed funds is superior to Moser's, Moser claimed (1) that Midland should have applied the $48,471.20 check from Community Newspapers to satisfy the corporate indebtedness of North Shore rather than the individual indebtedness of Polka and Frey, thereby leaving Moser free to satisfy its judgment out of the garnisheed funds; and (2) in the event that Midland's application of the $48,471.20 check first to the corporate debt was proper, Midland should be ordered to resort to other security available to Midland instead of the accounts receivable which have been garnisheed by Moser. This other security, Moser claimed, included the residences of Polka and Frey. The trial court rejected both claims, and on January 13, 1976, ordered the garnisheed funds in the amount of $14,048.17 to be disbursed to Midland and not Moser. From this judgment Moser appeals.

I. Midland's Application of the Community Newspapers, Inc., Payment

The $48,471.20 check received by Midland was its share of the proceeds of the multiple transactions between Polka, Frey, North Shore, and Community Newspapers, Inc. Both sides agree that, if Midland had applied this payment to the outstanding debt of North Shore rather than to the outstanding debts of Polka and Frey, then North Shore's debt to Midland would have been completely satisfied by the time of the commencement of the garnishment actions, and Moser could have been free to recover part of its judgment against North Shore out of the garnisheed accounts receivable. Moser contends that in applying the $48,471.20 as it did Midland violated the rules for the application of payments.
Where a debtor owes a creditor multiple debts, a payment by the debtor should be applied to one or another *858 of the debts as the debtor directs. F. A. Patrick & Co. v. Deschamp, 145 Wis. 224, 129 N.W. 1096 (1911). Where the debtor fails to direct the application of the payment to a particular debt, the creditor may apply the payment as he chooses. Earl v. Napp, 218 Wis. 433, 261 N.W. 400 (1935); Debelak Bros., Inc. v. Mille, 38 Wis.2d 373, 157 N.W.2d 644 (1968). If neither the creditor nor the debtor applies the payment, then the court makes the application in accordance with equitable principles. Theiler v. Consolidated Indemnity & Ins. Co., 213 Wis. 171, 250 N.W. 433 (1933). These well-accepted rules regarding the application of payments are subject to an equally well-recognized exception, the so-called "identical property" exception. Sorge Ice Cream & Dairy Co. v. Wahlgren, 28 Wis.2d 220, 223, 137 N.W.2d 118 (1965). This rule is that, when a payment made to a creditor is known by the creditor to be derived from a particular source or fund, the creditor must apply it to the exoneration of the debt related to that source or fund, at least where the rights of third parties are concerned.
Thus in Masten v. Cummings, 24 Wis. 623 (1869), the court held that a debtor may not direct that the moneys received from the sale of collateral securing one debt be applied to satisfy another debt, secured by different collateral, where the effect is to leave the first debt unsecured and to defeat the rights of the creditor of the first debt to his security in that debt.
Similarly, in Sorge Ice Cream & Dairy Co. v. Wahlgren, supra, a debtor purchased some equipment with a note guaranteed by the debtor's sister. When this equipment was eventually sold and a payment made to the creditor, the creditor applied the payment to unguaranteed obligations of the debtor, pursuant to an agreement between the debtor and creditor. This court held that, even though the debtor and the creditor *859 agreed otherwise, the proceeds of the equipment should have been applied to satisfy the debt incurred in purchasing that equipment and for which the guarantor was bound. See also: Restatement of Contracts, secs. 388 and 389 (1932).
The "identical property" exception thus requires the court to determine what was the source of the $48,471.20 that Midland received from Community Newspapers. Moser contends that the source of the $48,471.20 payment was the sale of North Shore's intangibles, and therefore Midland should have applied it to North Shore's corporate debt. On the other hand, Midland contends that the source of the payment was the $100,000 received for the noncompetition agreements by Polka and Frey, and therefore it was properly applied to the individual debt.
The trial court's findings of fact on this question are ambiguous. In one portion of its memorandum opinion, it states that "The funds involved in the $48,000 payment by Community were undesignated monies of Frey and Polka and North Shore . . . ." But this finding cannot be reconciled with a statement later in the opinion that Moser failed to prove that "these funds," apparently the $48,471.20 payment, "were not the personal property of Frey and Polka."
However under the circumstances presented here, the source of the funds disbursed by Community Newspapers to Midland is irrelevant. By the time this payment was made, all three of the debtors had defaulted on all of their obligations to Midland. Even if the $48,471.20 was in a technical sense North Shore's funds, those funds were properly applied to the personal indebtedness of Polka and Frey because North Shore's guaranty of the personal obligations of its officers had ripened to direct and absolute liability for that debt upon the officers' default. Therefore the proceeds from *860 the sale of North Shore's intangibles were applied to a debt that those intangibles secured.
[1-3]
This court will only interfere with the application of payments agreed upon by the parties where the rights of third parties are injured. The propriety of an application of payment by a creditor must be determined from the facts existing at the time the payment was applied. On May 2, 1974, when Midland received and applied the $48,471.20 check, it had no reason to know of the rights of Moser. The record does not disclose whether Moser was a creditor of North Shore on that date. Even if Moser was in fact an unsecured creditor of North Shore at that time, Moser had not reduced its claim to judgment. As an unsecured general creditor, Moser had no interest in the proceeds of North Shore's intangibles at the time the application of payment was made which equity should enforce contrary to the agreement of the debtor and the creditor. Thus, although we disagree with the trial court's analysis, we agree with its ultimate conclusion that Midland's application of payment was proper.

II. The Doctrine of Marshaling Assets

The doctrine of marshaling assets is a familiar and equitable doctrine, providing that where a creditor has a lien on or interest in two funds or properties in the hands of the same debtor, and another creditor has a lien on one of those funds or properties, equity at the request of the latter creditor will compel the creditor with two funds to satisfy his debt out of that fund to which the other creditor cannot resort. C. Gotzian & Co. v. Shakman, 89 Wis. 52, 61 N.W. 304 (1894); Dahlman v. Greenwood, 99 Wis. 163, 170, 74 N.W. 215 (1898); Andersen Yard Co. v. Citizens State Bank, 187 *861 Wis. 60, 62, 203 N.W. 921 (1925); United States v. Le May, 346 F. Supp. 328 (E.D. Wis. 1972). Because the doctrine is purely equitable, it is irrelevant that the onefund creditor is junior to the creditor who can resort to other funds. "This interference with the strict legal rights of the prior lienor is based on the principle that justice requires that he should not arbitrarily or capriciously ignore the rights of another creditor of the same debtor having a less favored security." Andersen Yard Co. v. Citizens State Bank, supra at 63. Marshaling "has regard to the rights of all who have interest in the property involved." 55 C.J.S., Marshaling Assets and Securities, sec. 1 at 959 (1948). But as with all equitable doctrines, marshaling assets is not an absolute right:
"`The doctrine of marshaling [assets] being a rule of equity and having its foundation in principles of natural justice, its application will not be inforced when it would so operate as to work substantial injustice or injury to any party in interest. Thus marshaling will not be applied to the detriment of a third person having an equity equal or superior to that of the person seeking to invoke the rule.'" (Citations omitted.) Estate of Snell, 227 Wis. 455, 467, 279 N.W. 24 (1938).
Moser argues that, since Midland can satisfy its claim against North Shore out of the Polka and Frey residences as well as out of North Shore's accounts receivable while Moser can resort only to the accounts receivable, equity should compel Midland to resort first to the collateral to which Moser cannot resort.
[4]
As a general rule before a court of equity will marshal assets and securities between two creditors, it must appear that (1) they are creditors of the same debtor, (2) that there are two funds belonging to that debtor, and (3) that one of them alone has the right to resort *862 to both funds. 53 Am. Jur.2d, Marshaling Assets, sec. 7 (1970); 55 C.J.S., Marshaling Assets and Securities, sec. 6 (1948). Thus, even though one creditor is secured by the debtor's surety while a second creditor is not, equity will not in the ordinary case compel the secured creditor to exhaust his remedy against the surety before proceeding against the principal debtor. 135 A.L.R. 738 (1941).
The trial court applied these well-accepted rules and concluded that because the funds Moser seeks to marshal are the property of different debtors, i.e., because the garnisheed accounts receivable belong to North Shore while the residences belong to Polka and Frey, who are only sureties of North Shore, the doctrine of marshaling should not be applied. However, Polka and Frey are not merely sureties of North Shore. In this case the sureties, Polka and Frey, have pledged their residences to secure not only their note and their performance as sureties but the debtor North Shore's original $100,000 debt. This distinction makes the rule stated in the above-cited annotation inapplicable. The cases contained in the annotation are cases where the surety has simply guaranteed the debtor's obligation. They stand for the proposition that, even though the surety is liable at law to pay the principal's debt, equity administers a more exact justice and will not normally permit the surety's property to be made to satisfy the principal debt when the principal's property will suffice. See also: Annot., 37 A.L.R. 1262 (1925). But here a superior equity exists. The residences of Polka and Frey are more than the property of a "surety." The mortgages secure the aggregate obligation of North Shore, Polka, and Frey directly. The value of the two residences are a fund out of which the North Shore's obligation to Midland can be primarily satisfied.
*863 [5]
We have previously held that the doctrine of marshaling assets does not require that the debtor have legal title to the funds that are to be marshaled. C. Gotzian & Co. v. Shakman, supra. In Gotzian the plaintiffs were general unsecured creditors of a partnership clothing business. They reduced their claims to judgment and sought to execute on that judgment by attaching the inventory of the business, just as Moser seeks to execute on its judgment by garnisheeing the accounts receivable of North Shore. However, the plaintiffs' attachment was junior to that of another creditor, Shakman, just as Moser's claim is junior to that of Midland. Shakman had loaned one of the partners the capital he needed to begin the partnership. This loan was secured by mortgages on property owned by this particular partner and his wife. When the business appeared to fail, Shakman chose to satisfy his claim by attaching the inventory of the business rather than foreclosing the mortgages. The plaintiffs contended that Shakman should be required to marshal assets and satisfy his claim out of the mortgages which were available to him alone. Shakman contended, exactly as does Midland, that the marshaling of assets only applies "where the two creditors have the same debtor and the two funds are the property of the same person." (Emphasis in the original.) 89 Wis. at 58. However, the court in Gotzian held that such a rule applied only in "the ordinary case" and that there were "additional equitable considerations, not present in the cases in which the rule has been applied, and which must be considered." The court noted that the money loaned to the partner by Shakman was used for the capital of the business to obtain credit for the inventory to be purchased. Id. The court concluded that the mortgages were therefore a contribution to the capital stock of the firm and must be so regarded in equity:
*864 "In form, it was a security given by a partner upon his individual property; in fact, it was a contribution to the capital of the firm. This plainly constitutes what is termed by Story (1 Eq. Jur., sec. 645) a `supervening equity which must be considered,' and, when considered, it plainly brings the case within the rule, because the two funds are thus, in the contemplation of equity, both partnership funds." 89 Wis. at 59.
[6]
Here as in Gotzian the money loaned to the individuals was used for working capital for the business. In transactions that permitted North Shore, Polka, and Frey to stay in business until the business was purchased by the Community Newspapers, Inc., Polka and Frey guaranteed the obligations of North Shore, and North Shore guaranteed the obligations of Polka and Frey. In the spring of 1974 after default, all of these obligations had ripened to absolute liability. Most important of all, the mortgages executed by the Freys and the Polkas by their very terms secured the obligations of North Shore directly. Although record title to the residences remained in the hands of Polka and Frey, in the eyes of equity the Polkas and the Freys had placed their residences in the company till. We hold that under these circumstances the mortgages created a fund which equity will consider a fund of North Shore itself. Under these circumstances, the marshaling of assets doctrine is appropriate.
The Polka and Frey mortgages given to Midland were both second mortgages on the properties. A real estate salesman testified that the fair market value of the Polka residence in Waukesha County was $76,000. The first mortgage was approximately $42,000. Frey testified that the value of his residence in Du Page County, Illinois, was $94,000, while the first mortgage on it was $63,000. Midland's vice president testified that Midland had already given notice of foreclosure on the *865 Polka property in Waukesha County, since the accounts receivable garnisheed by Moser were not sufficient to satisfy the $19,000 Midland judgment.
It thus appears that the equity in the residences available to Midland may be as high as $65,000. Although Gotzian suggests that equity will not require Midland to foreclose in Illinois, the equity in the Polka property in Waukesha County appears to be sufficient to fully satisfy Midland's $19,000 claim. Because the garnisheed funds total only approximately $14,000, Midland to satisfy its claim must foreclose on the mortgages in any event. Indeed Midland has already commenced foreclosure. If upon a sale of the property Midland's $19,000 claim is not fully satisfied, it can still resort to the garnisheed funds since the garnisheed funds can be held in court until the foreclosure sale is consummated. See, e.g., C. Gotzian & Co. v. Shakman, supra at 60. None of Midland's security will be taken from it, while Moser's judgment can be satisfied out of the garnisheed funds. For these reasons, the judgment dispersing the garnisheed funds to Midland must be set aside and the cause remanded. The trial court is directed to apply the doctrine of marshaling assets to the extent that it can be done without injuring Midland.
By the Court.Judgment reversed and cause remanded for further proceedings not inconsistent with this opinion.
