To avoid foreclosure ("in lieu" of foreclosure), a deed is given to the lender to fulfill the obligation to repay the debt; this process does not allow the borrower to remain in the house but helps avoid the costs, time, and effort associated with foreclosure.