#### JOSEPH WILLIAM SPENCER, Plaintiff-Appellant, v. KATHERYN SCOTT, Indiv. and as Ex’r of Estate of David L. Scott, Deceased, Defendant-Appellee (Ben Ray Scott et al., Defendants; Magna Millikin Bank of Decatur, N.A., as Successor in Interest to Northtown Bank of Decatur and Northtown Bank and Trust, Counterplaintiff-Appellee; Katheryn Scott Mauk, Indiv. and as Ex’r of the Estate of David L. Scott, Deceased, et al., Counterdefendants; Scott State Bank, Counterdefendant-Appellee; Joseph William Spencer et al., Counterdefendants-Appellants).

Fourth District

No. 4 — 91—0410

Opinion filed December 30, 1991.

*419David C. Nelson, of Dilsaver, Nelson & Winter-Black, and David Y. Eberspacher, of Heller, Holmes, Hefner & Eberspacher, Ltd., both of Mattoon, for appellants.

Richard L. Heavner, of Heavner, Handegan & Scott, of Decatur, for appellee Katheryn Scott Mauk.

Darrel F. Parish, of Roberts, Parish & Castleman, Ltd., of Decatur, for appellee Scott State Bank.

JUSTICE LUND

delivered the opinion of the court:

This is an appeal by Joseph William Spencer, Joseph Wayne Spencer, and Anna Marie Owens (the Spencers and Owens) from the order of the circuit court of Moultrie County dated January 14, 1991, granting the motion of defendants Scott State Bank (Scott Bank) and Katheryn Scott (Katheryn) to dismiss plaintiffs’ complaint to foreclose mortgages, and the order of May 6, 1991, denying the motion for reconsideration.

Facts

Katheryn’s deceased husband, David L. Scott, had executed mortgages to the Spencers and Owens, Magna Millikin Bank of Decatur (Magna), and the Federal Land Bank (FLB). For priority purposes, FLB was first; the Spencers and Owens, while having separate mortgages, agreed to be treated equally and were second; and Magna was third. After David died, FLB foreclosed and joined all the interested parties as defendants. The subject real estate was left to Katheryn by David’s will, and she was made a party defendant, both individually and as executor of David’s estate. The foreclosure orders granted FLB a judgment of $99,636.27, plus attorney fees and expenses. The lien of Joseph William Spencer was established in the amount of $24,669.99. Joseph Wayne Spencer’s lien was established and found to be $12,334.99. Anna Marie Owens’ lien was found to be $12,335. Magna failed to appear and was defaulted. The real estate was ordered sold, and the amount of liens of all the parties was ordered paid *420in the order of priority, subject to the sufficiency of sale proceeds. Rents during the redemption period were also to go toward deficiencies. While the priorities of the Spencer mortgages and their respective amounts were determined, there were no specific words foreclosing them. The Owens’ mortgage was foreclosed in the FLB proceeding.

On December 1, 1986, a judicial sale was held and the real estate was sold to a separate party for $73,900. Shortly before the expiration of the redemption period, Katheryn, in her individual capacity, redeemed the property and subsequently conveyed a mortgage on the premises to Scott Bank, securing a loan made for the purposes of furnishing funds for the redemption.

Evidently, after Katheryn’s redemption, the question was raised as to whether the redemption gave her clear title. She sought to foreclose what she thought to be an equitable lien created by making the redemption payment. The action seeking that relief was dismissed by the trial court, and the trial court decision was affirmed by this court in Scott v. Scott (1989), 179 Ill. App. 3d 489, 534 N.E.2d 174. Appellants’ contention that that opinion has res judicata effect in the present case will be discussed later.

I

We first address whether the foreclosure action brought by FLB and the subsequent judicial sale resulted in the real estate being freed from the liens of the junior mortgages, absent a redemption by the original mortgagor. The redemption by Katheryn was authorized by section 12 — 122 of the Code of Civil Procedure (Code) (Ill. Rev. Stat. 1985, ch. 110, par. 12 — 122). That section specifically allows redemption by heirs, executors, administrators, and assigns of a mortgagor. Junior lienholders are authorized to redeem within three to six months after the sale, in the absence of a redemption pursuant to section 12 — 122 of the Code. (See Ill. Rev. Stat. 1985, ch. 110, par. 12— 122.) A redemption under the provisions of section 12 — 122 of the Code can also follow a redemption under section 12 — 132 of the Code (Ill. Rev. Stat. 1985, ch. 110, par. 12 — 132). (See Ill. Rev. Stat. 1989, ch. 110, par. 12 — 137.) Nothing in the statute prohibits lienholders from bidding at the judicial sale ordered by the court.

To determine the question now before us, we look at the basic rules relating to redemptions and mortgage liens. When the mortgagor redeems, the same property may again be subject to the unpaid balances of various mortgages and liens — not because of the right to enforce the mortgage lien, but because the law subjects all property *421of a debtor to the payment of his or her unsatisfied debt. (Ogle v. Koerner (1892), 140 Ill. 170, 179-80.) When one not liable on the debt redeems after the mortgage lien is exhausted, the real estate is free from the lien. (Koerner, 140 Ill. at 180.) While the dispute in Koerner was between the senior mortgagees, with a deficiency and the redeeming junior lienholder against whom they sought recovery, it would appear the same principle enunciated applies in the present case.

The Spencers and Owens were made parties to the foreclosure action, and their interests and priorities were determined by the court’s order. If the sale proceeds had been adequate, their claims would have been paid pursuant to the order of the court — that order being binding upon the mortgagor and the various lienholders. The order was, in effect, a judgment.

The statement in Koerner that the senior mortgagee “was a competent bidder at such sale, and therefore had it in his power to bid the property up to its fair cash value, and if he failed to do so, a presumption arises from which he can not escape, that the property sold for what it was reasonably worth” (Koerner, 140 Ill. at 180), equally applies to the junior lienholders now appealing in the present case.

The decision in Hack v. Snow (1929), 338 Ill. 28, 169 N.E. 819, is cited in Scott (179 Ill. App. 3d at 491, 534 N.E.2d at 176) for the following proposition: “A redemption made by the debtor or his grantee leaves the property subject to all other liens existing at the time of the sale which are not ordered paid by it.” The Hack opinion states:

> “This, of course, is true where the decree orders the payment of all the liens and a sale is ordered for all such liens, the sale made, a certificate of purchase issued, no redemption made and deed issued. In that case, no redemption having been made, all the title which the mortgagor had at the time of the making of the mortgage, and all liens subsequent to the making of the mortgage, are wiped out and the purchaser takes the fee in the property unencumbered of such liens. In the instant case the decree did not order Liesik’s judgment paid nor order the sale of the property for the payment thereof. The property was redeemed, and by virtue of the statute the mortgage, its foreclosure, the sale and the certificate of purchase became null and void and the property freed from the lien thereof but subject to Liesik’s judgment lien. Liesik having a valid judgment lien upon the property was entitled to have the property sold in satisfaction thereof.” Hack, 338 Ill. at 32, 169 N.E. at 820.

*422 We conclude that the determinative words relate to the failure to order the junior liens paid, not the presence of the redemption. Any contrary determination necessarily requires an inequitable result. The statutory redemption provisions we have cited allow the junior lienholder the possibility of a right of redemption. The court proceedings provided the junior lienholders with ample opportunity to litigate their interests. Their rights were established, and payments ordered made to them if funds were available. They had the opportunity to purchase at the judicial sale. They did not seek to redeem from that sale. If we now allow foreclosure on the mortgages as primary lien-holders, we put an innocent third party in a position of contributing $77,000 of new money to those whom the decedent died owing. A decision contrary to the contentions of the Spencers and Owens appears consistent with most authorities. (See G.E. Osborne, Osborne’s Handbook on the Law of Mortgages, ch. 12, par. 309, at 641-42 (2d ed. 1970).) We therefore conclude the trial court’s orders, which dismissed claims of the Spencers and Owens and denied the motion for reconsideration, were proper.

II

In their motion to dismiss the Spencers’ and Owens’ present action for foreclosure, Katheryn and Scott Bank contend the foreclosures are barred as a result of FLB’s foreclosure action. The Spencers and Owens contend Katheryn’s action in seeking to foreclose her “redemption lien” (see Scott, 179 Ill. App. 3d at 490, 534 N.E.2d at 175) has a res judicata effect on the question of whether their junior mortgages are now valid and enforceable liens that can be foreclosed. Katheryn’s 1987 complaint to foreclose, based upon her alleged lien created by the redemption payment, listed the Spencers’ and Owens’ mortgages as junior liens to her alleged equitable lien. Katheryn’s complaint to foreclose was dismissed by the trial court, and the trial court’s decision was affirmed in Scott.

A decree operates as res judicata of the claim presented in a later case when the facts and relief sought in both actions are substantially the same. (Housing Authority v. YMCA (1984), 101 Ill. 2d 246, 254, 461 N.E.2d 959, 963.) The 1987 action by Katheryn was terminated based upon the determination that Katheryn, as the devisee under the mortgagor’s will, took title as a grantee from the mortgagor and would not be able, based upon the redemption, to claim an equitable lien which would be superior to other existing liens. (Scott, 179 Ill. App. 3d at 491-92, 534 N.E.2d at 176.) The status of the alleged junior liens was not litigated because Katheryn’s complaint was *423dismissed before an evidentiary hearing. Because the trial court decision, and the appellate decision affirming it, did not determine the viability of the junior liens, the 1987 action cannot be considered a prior adjudication of the issue. Furthermore, for the reasons set forth in this opinion, it appears that the FLB proceedings were res judicata as to the issue of current ability to foreclose the junior liens.

The trial court’s dismissal and subsequent denial of the motion to reconsider are affirmed.

Affirmed.

STEIGMANN and KNECHT, JJ., concur.