The automatic stay is the legal mechanism that stops the foreclosure process when you file bankruptcy. In general, when you file a bankruptcy petition with the Court 11 U.S.C. §362(a) requires the lender to cease foreclosure proceedings.
11 U.S.C. §362(a) Except as provided in subsection (b) of this section, a petition filed under section 301, 302, or 303 of this title, or an application filed under section 5(a)(3) of the Securities Investor Protection Act of 1970, operates as a stay, applicable to all entities, of—
(5) any act to create, perfect, or enforce against property of the debtor any lien to the extent that such lien secures a claim that arose before the commencement of the case under this title;
It is important to note that the protections of the automatic stay are immediately triggered upon filing a bankruptcy petition. There is no wait time between filing a petition and when the foreclosure must stop.
Example
You have fallen behind on your mortgage and the non-judicial foreclosure process has begun. After receiving a Notice of Default and Notice of Trustee’s Sale you know that you’re in danger of losing your home. The Trustee’s sale has been scheduled for next Friday at which time your home will be auctioned off. On Thursday, the day before the sale, you know that you need to file an emergency bankruptcy petition to save your home. You call our attorney at (916) 587-1003 and explain your story. Our attorney recommends that you file an emergency chapter 13 bankruptcy petition to stop the foreclosure process and save your home through a 3 to 5 year repayment plan. You come into the office right away, sign the emergency bankruptcy petition and our attorney electronically files your petition with court. After filing your petition our attorney sends notice of the automatic stay to all parties involved in the foreclosure proceedings. Now, if any of the noticed parties continues the foreclosure process they will have willfully violated the automatic stay in bankruptcy subjecting them to liability for damages. Since these parties are sophisticated there is very little chance they will continue with the foreclosure process. Upon notice of your filing they will stop the foreclosure process and your home will not be auctioned off the following day.