
435 N.W.2d 645 (1989)
231 Neb. 100
WEST TOWN HOMEOWNERS ASSOCIATION, INC., A Nebraska Corporation, Appellee,
v.
Michael D. SCHNEIDER et al., Appellants,
Home Federal Savings and Loan Association of Nebraska et al., Appellees.
No. 87-154.
Supreme Court of Nebraska.
February 10, 1989.
*646 David W. Jorgensen of Nye, Hervert, Jorgensen & Watson, P.C., Kearney, for appellants.
Terri S. Harder of Jacobsen, Orr, Nelson & Wright, P.C., Kearney, for appellee West Town Homeowners Ass'n.
HASTINGS, C.J., WHITE, and CAPORALE, JJ., and REAGAN, District Judge, and COLWELL, District Judge, Retired.
COLWELL, District Judge, Retired.
Plaintiff, West Town Homeowners Association, Inc., a nonprofit homeowners association, brings suit to foreclose a lien for nonpayment of assessments on "Tract F, also known as Lot F, West town Second Addition (Subdivision), a subdivision in the City of Kearney, Buffalo County, Nebraska," pursuant to the terms of a recorded originating declaration of the association. Owners defendants, Michael D. Schneider (Schneider) and Michael D. Schneider, trustee (Trustee), had not paid assessments since July 1985. The trial court granted summary judgment in favor of West Town, *647 assigned priorities of liens, and ordered the sale of Lot F. Defendants Schneider, Trustee, and S & H Enterprises, a Nebraska partnership, appeal. We affirm.
This being an equity action, this court reviews the matter de novo, reaching independent conclusions of fact and law.
These facts have little dispute. On February 19, 1976, J.S.R., Inc., the owner of Lots A through G, Westown Second Subdivision, Buffalo County, Nebraska, executed and filed with the register of deeds for Buffalo County a declaration referring to the last-described lots and providing for extensive rules and regulations for the creation and administration of an association of member homeowners. Included are these provisions:
Declarant hereby declares that all of the properties described above shall be held, sold, and conveyed subject to the following easements, restrictions, covenants... which shall run with the real property above described....
....

ARTICLE III
....

Section 1. Every owner of a lot ... shall be a member of the Association....
....

ARTICLE IV
....

Section 1.... [E]ach Owner of any Lot by acceptance of a deed therefor ... is deemed to covenant and agree to pay to the Association: (1) Regular annual maintenance assessments ... (2) Assessments for capital improvements.... The Regular and Special Assessments ... shall be and constitute until paid a continuing charge against and lien upon such lot or property against which each such assessment is made....
....

Section 6.... The [assessment] due dates shall be established by the Board of Directors....

Section 7.... Any assessment not paid within thirty (30) days after the due date shall bear interest from the due date at the rate of nine per cent (9%) per annum. The Association may bring an action at law against the Owner personally obligated to pay the same, or foreclose the lien against the property in the same manner as provided by law for foreclosing of mortgages....

Section 8. The lien of the assessments provided for herein shall be subordinate to the lien of any first mortgage.
In 1976, Schneider became the record owner of Lot F. On August 5, 1976, Schneider gave Home Federal Savings and Loan Association of Lexington, now Home Federal Savings and Loan Association of Nebraska (Home), a mortgage on Lot F to secure his note for $37,900. All parties agree that this recorded mortgage is a first lien on Lot F. On March 9, 1981, Schneider gave defendant Union Bank and Trust Company (Union) a mortgage, which was duly recorded on March 11, on Lot F (also describing other land) to secure his $75,000 note. At a regular meeting of the association held July 27, 1982, the assessment on each lot was fixed at $1,080 per year, payable $90 per month beginning September 1, 1982. None of those assessments for Lot F have been paid since July 1985. On December 31, 1985, Schneider gave a duly recorded mortgage on Lot F to S & H Enterprises, a Nebraska partnership (Schneider and Robert Hyde, partners), to secure a $40,000 demand note. No proceedings at law have been commenced by West Town to recover the unpaid assessments. None of the described secured notes were in default at the time judgment was entered.
Summary judgment is an extreme remedy and should be awarded only when an issue is clear beyond all doubt. It is proper when the pleadings, depositions, admissions, interrogatories, and affidavits in the record disclose that there is no genuine issue as to any material fact or as to the ultimate inferences that may be drawn from material facts, and when the moving party is entitled to judgment as a matter of *648 law. Chadd v. Midwest Franchise Corp., 226 Neb. 502, 412 N.W.2d 453 (1987).
A lien has been characterized in this jurisdiction as an obligation, tie, duty, or claim annexed to or attaching upon property by the common law, equity, contract, or statute. A lien is perhaps most accurately described as a right afforded by law to have an obligation satisfied out of particular property. See Dupuy v. Western State Bank, 221 Neb. 230, 375 N.W.2d 909 (1985). In a foreclosure suit, the mortgagee must prove the existence of the mortgage lien, the amount and priority thereof, default, and the right to a decree directing sale of the premises in satisfaction thereof. Walker Land & Cattle Co. v. Daub, 223 Neb. 343, 389 N.W.2d 560 (1986).
The purpose of a foreclosure proceeding is not to create a lien but, rather, to enforce one already in existence, to ascertain the amount of the lien and its priority, and to obtain a decree directing the sale of the property. See Northwestern Mut. Life Ins. Co. v. Nebraska Land Corp., 192 Neb. 588, 223 N.W.2d 425 (1974).
West Town filed its foreclosure petition on March 12, 1986, alleging an $810 lien on Lot F for assessments due and unpaid from July 1985 to March 1986, subject to the first lien of Home's mortgage. Defendants Home, Union, and S & H Enterprises were alleged as having some claim by reason of recorded mortgages. Defendants Schneider, Trustee, and S & H demurred to the petition, which demurrer, after hearing, was denied. Those defendants joined in an answer that preserved their demurrer and that denied generally the petition. Defendants Home and Union answered. On November 17, 1986, West Town filed its motion for summary judgment. On December 1, 1986, defendant S & H filed a cross-petition alleging its mortgage was superior to West Town's lien. At the hearing on December 22, 1986, summary judgment was entered for West Town.
A party moving for summary judgment has the burden of showing that no genuine issue as to any material fact exists. Thereafter, the burden of producing contrary evidence shifts to the party opposing the motion. City Bank & Trust Co. v. Van Andel, 220 Neb. 152, 368 N.W.2d 789 (1985).
In support of its motion, West Town filed copies of the pleadings, requests for admissions, interrogatories and answers, affidavits, certified copies of four prior lawsuits between West Town and Schneider relating to the collection of unpaid assessments on Lot F, and other records. This evidence shows that there was no genuine question of material fact at issue, and West Town was entitled to judgment as a matter of law. The countershowing made by appellants was limited to affidavits, one with attachments, indicating that the notes secured by the mortgages held and owned by Home, Union, and S & H were not in default.
The trial court granted West Town's motion, finding that there were no genuine issues of material fact and that West Town was entitled to judgment as a matter of law; that there was due to Home on its note $34,297.19 and interest at 9¼ percent, and its mortgage was a first lien on Lot F; that there was due West Town $1,521.60 for unpaid assessments and interest, which sum was a valid second lien on Lot F; and that there was due Union on its note $23,318.89 with intererst at 15½ percent, and its mortgage was a third lien on Lot F. The court ordered that if the amount of West Town's and Union's liens was not paid within 20 days, all equity of redemption in Lot F be foreclosed; that Lot F be sold as upon execution and the proceeds be brought into court to be applied upon confirmation of the sale to the costs and the sums found due; and that all defendants except Home be foreclosed of all right, title, interest, and equity of redemption in and to Lot F.
Assignment of error No. 1 is as follows: "The Trial Court erred in finding that the Plaintiff-Appellee could foreclose a lien against real estate created by private contract between the parties for non-payment of assessments." This concerns interpretation of the terms contained in the *649 declaration. Appellants argue that there are no clear provisions in the declaration and proceedings that the assessments were specifically made against Lot F and for the assessments' due dates. West Town claims the protection of res judicata in that these issues were decided in its favor, as shown by the certified records of four prior lawsuits between Schneider and West Town. One lawsuit appeared in this court, West Town Homeowners Assn. v. Schneider, 215 Neb. 905, 907, 341 N.W.2d 588, 590 (1983), wherein we said,
"Any right, fact, or matter in issue and directly adjudicated upon, or necessarily involved in, the determination of an action before a competent court in which a judgment or decree is rendered ... cannot again be litigated between the parties and privies, whether the claim or demand, purpose, or subject matter of the two suits is the same or not."
Dicta is noted in that reported case that West Town was a condominium association subject to the Condominium Property Act, Neb.Rev.Stat. §§ 76-801 to 76-823 (Reissue 1981). All of the parties in the case at bar agree that West Town is not a condominium association subject to that act.
The defense of res judicata may be raised for the first time in a summary judgment proceeding. DeCosta Sporting Goods, Inc. v. Kirkland, 210 Neb. 815, 316 N.W.2d 772 (1982).
West Town correctly argues that the issues of the liability of Lot F for assessments and their due dates are established by the prior proceedings, and res judicata applies. Further, the declaration provides that the unpaid assessments on the lots were a lien subject to being foreclosed in the same manner as the foreclosure of mortgages.
Assignment of error No. 2 reads: "The Trial Court erred in failing to find the amounts owed to the fourth lien holder, Defendant-Appellant S & H Enterprises, A Nebraska Partnership." That was an issue presented by the pleadings, and the evidence shows that there was $40,000 due to S & H from Schneider secured by the mortgage. The reason for the failure of the trial court to make such a finding does not appear in the record; however, such failure is harmless and not reversible error, since it is clear that S & H's mortgage lien was a fourth priority (last), and no substantial right of any appellant was affected. "A judgment will not be reversed by reason of any error or defect in the proceedings which does not affect the substantial rights of the adverse party." Emery v. Mangiameli, 218 Neb. 740, 743, 359 N.W.2d 83, 86 (1984). See, also, Neb.Rev.Stat. § 25-853 (1985). The findings and order of the trial court are modified to show $40,000 was due from Schneider to defendant S & H on a demand note secured by a mortgage on Lot F that had a priority of a fourth lien on Lot F, which lien was foreclosed as provided in the trial court's decree.
Assignment of error No. 3 states: "The Trial Court erred in its determination of the priority of the lien holders and the amounts owed to the lien holders." All parties agree that Home's mortgage is a first lien. Appellants argue that since Union's mortgage was filed March 11, 1981, prior to the attachment of the assessment lien on August 1, 1985, Union's mortgage was second in priority, and, therefore, West Town's lien was a third lien, apparently on the theory that priority depends upon the time when the lien attached. See Omaha Nat. Bank v. Continental Western Corp., 203 Neb. 264, 278 N.W.2d 339 (1979). West Town's response is twofold: (1) The appellants do not have standing to appeal the priority issue, and (2) the declaration's article IV, § 8, provides in part, "The lien of the assessments provided for herein shall be subordinate to the lien of any first mortgage," and, by interpretation, all liens, except Home's, are inferior to the assessment liens.
Ordinarily, Union, as the owner-holder of the "Union mortgage," would be the party having standing to object to that part of the judgment assigning third priority to its mortgage; however, in Federal Farm Mtg. Corporation v. Ganser, 145 Neb. 589, 592, 17 N.W.2d 613, 615 (1945), a mortgage foreclosure action, the court held that the mortgagor had standing *650 to object to the confirmation of a sale, stating, "`An appealable interest exists when the judgment or decree so affects a party or privy to the record that he would derive a substantial benefit from its modification or reversal.'" From a review of this record, there is no showing that appellants would derive a substantial benefit from a modification of the judgment on the issue of priority.
Further, "priority of a mortgage may be changed by agreement of the parties." Meek v. Gratzfeld, 223 Neb. 306, 311, 389 N.W.2d 300, 304 (1986). That same result was accomplished here when Union admitted a third priority, the only evidence at the summary judgment hearing was that the Union mortgage had third priority, and defendants failed to make either an objection or a contrary showing at the hearing, as they were required to do. See City Bank & Trust Co. v. Van Andel, 220 Neb. 152, 368 N.W.2d 789 (1985). The third claimed error is without merit.
Assignment of error No. 4 sets out: "The Trial Court erred in entering a Decree of Foreclosure and an Order of Sale pursuant to a single filing of a Motion for Summary Judgment, when all other lien holders neither join in nor file Motions for Summary Judgment." Apparently, appellants' argument is that upon the foreclosure of West Town's lien, the mortgage liens of Union and S & H survive as viable liens unless each joins in the application for foreclosure of all liens. No authorities are cited, and the law is otherwise. Neb.Rev. Stat. § 25-1330 (Reissue 1985) is West Town's authority to make application for summary judgment. Where junior mortgagees are made parties to the foreclosure proceedings, the decree is a foreclosure of all mortgage liens, and junior mortgagees cannot prevent a sale; their rights are sufficiently protected by the opportunity to purchase the property at the sale or to pay off the prior encumbrance prior to the sale. See Keller v. Boehmer, 130 Neb. 763, 266 N.W. 577 (1936). The confirmation of the sale and delivery of the sheriff's deed made under a decree of foreclosure will bar all equity of redemption of junior encumbrances. See Shackley v. Homer, 87 Neb. 146, 127 N.W. 145 (1910). If, after the sale of the property and satisfaction of the mortgage, a surplus remains, the court has full power to determine the interests of all parties in the surplus and to do complete and final justice between the parties. See Northwestern Mut. Life Ins. Co. v. Nebraska Land Corp., 192 Neb. 588, 223 N.W.2d 425 (1974).
Assignment of error No. 5 reads: "The Trial Court erred in finding that there was no genuine issue as to any material fact, and that the Plaintiff-Appellee was entitled to a judgment as a matter of law." From a full reading of the record, there is no genuine issue of any material fact, and, as a matter of law, the trial court properly entered the summary judgment in favor of West Town and against all defendants, subject only to the modification of the court's findings to state that defendant Schneider owed defendant S & H $40,000 on a note dated December 31, 1985, secured by a recorded mortgage on Lot F, which is a fourth lien on Lot F, junior and inferior to the liens of all other parties, and to include in the judgment the amount of the S & H note to be paid as one of the liens within 20 days from the judgment.
AFFIRMED AS MODIFIED.
