n. the system by which a party who has loaned money secured by a mortgage or deed of trust on real property (or has an unpaid judgment), requires sale of the real property to recover the money due, unpaid interest, plus the costs of foreclosure, when the debtor fails to make payment. After the payments on the promissory note (which is evidence of the loan) have become delinquent for several months (time varies from state to state), the lender can have a notice of default served on the debtor (borrower) stating the amount due and the amount necessary to "cure" the default. If the delinquency and costs of foreclosure are not paid within a specified period, then the lender (or the trustee in states using deeds of trust) will set a foreclosure date, after which the property may be sold at public sale. Up to the time of foreclosure (or even afterwards in some states) the defaulting borrower can pay all delinquencies and costs (which are then greater due to foreclosure costs) and "redeem" the property. Upon sale of the property the amount due is paid to the creditor (lender or owner of the judgment) and the remainder of the money received from the sale, if any, is paid to the lender. There is also judicial foreclosure in which the lender can bring suit for foreclosure against the defaulting borrower for the delinquency and force a sale. This is used in several states with the mortgage system or in deed of trust states when it appears that the amount due is greater than the equity value of the real property, and the lender wishes to get a deficiency judgment for the amount still due after sale. This is not necessary in those states which give deficiency judgments without filing a lawsuit when the foreclosure is upon the mortgage or deed of trust.