Legal process by which a lender cancels (forecloses) a borrower's right of redemption of the mortgaged property through a court order (called foreclosure order). The court sets a date up to which the borrower can redeem the property by paying off the entire loan balance (including foreclosing expenses). Thereafter, the lender is free to sell the property and, upon the sale, applies the sale proceeds first to the due amount and pays the remainder (if any) to the borrower. The borrower remains liable for the due amount if the property remains unsold, and for the shortfall if the sale proceeds are insufficient to pay off the entire debt. The lender is generally under an obligation to sell the property at or near its fair market value (FMV).