#### In re Surveillance Corporation, Bankrupt. SURVEILLANCE CORPORATION et al., Appellants, v. SENTRY INSURANCE, Appellee.

No. 75-1551.

United States Court of Appeals, Tenth Circuit.

Argued and Submitted April 12, 1976.

Decided July 20, 1976.

*299Dan E. Turner and Robert D. Ochs, Topeka, Kan. (Charles S. Fisher, Jr., Topeka, Kan., on the brief), for appellants.

Thomas J. Kelly, Chicago, 111. (Jack A. Quinlan, Topeka, Kan., on the brief), for appellee.

Before HILL, SETH and DOYLE, Circuit Judges.

HILL, Circuit Judge.

This is an appeal from the district court’s affirmance of a judgment in a bankruptcy proceeding allowing an unsecured claim by appellee, Sentry Insurance. The claim was based on a contract, made in Illinois and valid under Illinois law, which provided for payment of appellee’s attorney’s fees in a mortgage foreclosure on real property located in Kansas. Appellants, Thomas and Rita Evans and the trustee in bankruptcy for Surveillance Corporation, argue two points on appeal. (1) The claim for attorney’s fees is res judicata because it could have been litigated in the mortgage foreclosure action. (2) The claim should not be allowed by a bankruptcy court in Kansas because a provision for payment of attorney’s fees in a mortgage foreclosure action is against public policy in Kansas and could not be enforced in state court. The dispute arises from the facts set out below.

Surveillance Corporation, the bankrupt, is an Illinois corporation of which Thomas and Rita Evans are the sole owners. Its principal place of business is Northfield, Illinois. On November 20, 1968, Surveillance borrowed $115,000 from the Beverly Bank, also an Illinois corporation. The promissory note was executed by Surveillance and by Thomas and Rita Evans as individuals. To insure repayment of the loan, the bank required a surety bond which was provided by appellee, a Wisconsin corporation.

As consideration for the bond, in addition to the premium, appellee obtained an indemnification agreement and mortgages from Surveillance and the Evanses on real property located in Shawnee County, Kansas, and Cook County, Illinois. The agreement preserved appellee’s rights as a surety and granted additional rights. It contained a provision for payment of appellee’s attorney’s fees should it have to bring a mortgage foreclosure suit. The agreement was made in Illinois and provided it was to be governed by Illinois law.

When the note was not paid, appellee performed on the surety bond and then filed a petition in the District Court of Shawnee County, Kansas, to foreclose the mortgage on the Kansas land. This action was removed to the United States District Court for the District of Kansas because of diversity of citizenship. During the pend-ency of the action, Surveillance filed a Chapter XI petition in federal bankruptcy court in Kansas, and the foreclosure action ultimately concluded with the trustee as a party. The land sold for $250,000, a sum sufficient to pay the mortgage in full and more than sufficient to pay all claims timely filed in the bankruptcy proceeding.

The Notice of Final Meeting of Creditors contained a statement that creditors who *300had not filed claims could do so by May 23, 1973. On May 21, 1973, appellee filed an unsecured claim of $21,399.88 for attorney’s fees resulting from its efforts in the foreclosure proceeding. The claim stated the entire debt between appellee and Surveillance had been paid except for the attorney’s fees provided for in the indemnity contract. The bankruptcy court allowed the claim in the amount of $16,828.15, and the district court affirmed.

We do not believe it is necessary to discuss the question of whether the federal bankruptcy court was bound to follow the public policy of Kansas in determining the allowability of this claim. The appeal may be resolved on the basis of the arguments concerning the doctrine of res judicata, and we will proceed to discuss that issue.

Appellants contend the claim for attorney’s fees cannot be litigated here because of the bar of res judicata arising from the mortgage foreclosure judgment. They argue that the matter of attorney’s fees could have been presented in the prior action. *See Hutchinson Nat'l Bank & Trust Co. v. English,*209 Kan. 127, 495 P.2d 1011 (1972). Appellee contends the action here is to recover a contractual debt and the prior action was on the mortgage only and, therefore, the case is within the general rule that an action on a debt and an action on the mortgage securing the debt may be maintained separately. 55 Am.Jur.2d Mortgages § 541 (1971).

Appellee’s contention overlooks some basic principles. An action on the contract creating the debt and an action to foreclose the mortgage securing it are both means of collecting a single debt. In either case it is fundamental that the amount' of the debt must be established. If the attorney’s fees were part of the debt for which the mortgage was foreclosed, we believe they had to be requested as part of the amount sought from the proceeds of the foreclosure sale.

Kansas and Illinois law are in agreement in this regard. Attorney’s fees in a foreclosure proceeding are part of the indebtedness secured by the mortgage. When the amount of the indebtedness is fixed by the original decree of foreclosure, this type of claim should then be determined. If it is not presented, the decree becomes final and is res judicata as to the amount of the debt. *Phillips v. O’Connell,*331 Ill.App. 511, 73 N.E.2d 864 (1947). *See Liberty Savings & Loan Ass’n v. Jones,*143 Kan. 422, 54 P.2d 937 (1936); *Life Association of America*v. *Dale,*17 Kan. 185 (1876).

In the present case the rights of the parties are determined by the indemnity contract. The provision for attorney’s fees was an incident to the primary indebtedness and a part of it. The amount of the indebtedness claimed due in the mortgage foreclosure proceeding should have included the amount claimed due for attorney’s fees. The property was sold for a sum sufficient to completely satisfy the amount alleged to be owed on the mortgage. This satisfaction extinguished the debt. 59 C.J.S. Mortgages § 519 (1949). Appellee cannot now assert that the indebtedness was greater than previously claimed. The right to collect the debt with attorney’s fees was a single and indivisible demand.

We hold the claim was improperly allowed, and the judgment is hereby reversed.