If you own a home with a mortgage, the most terrifying word you can hear—scarier even than termitesis foreclosure. This process, typically triggered by a failure to make your loan payments, is how the lender gets their money back. The foreclosure process can be lengthy and complicated (in Hawaii the average foreclosure takes nearly 7 years), and homeowners usually have more options than they may initially realize to fight, slow down, and end a foreclosure.

If those tactics fail, the home often goes up for sale at a sheriff’s auction, where the home is sold at the highest bid so the lender can recoup (some of) its investment. Typically there is a state-mandated process for notifying the public (and the current homeowner) that the house is going to be sold, which requires a certain period of time between the announcement and the actual auction. This can be a period of days or weeks, depending on the laws in your area.

If you’ve failed to halt a foreclosure and your house is listed for auction, you might think that it’s time to pack everything up and start rebuilding your life. But even if your home is scheduled to be auctioned off, it’s not too late. Here are five things you can try to stop the sale and save your house.

Pay what you owe

While it’s unlikely that you have the money to pay off your existing debt to your lender (your home is in foreclosure, after all), if you do suddenly obtain those funds, you can usually end a foreclosure up to the day of the auction by paying off your debt—including any fees the lender has added to the bill. This is called a mortgage reinstatement, and while it can be more expensive and complex the closer you get to the sheriff’s auction, it’s usually at least possible to pull off, as long as the house hasn’t officially sold.

Declare bankruptcy

Filing Chapter 7 or Chapter 13 bankruptcy is effective at stalling the foreclosure process at all stages, because the court will usually order an automatic stay that halts the process in its tracks. Chapter 13 is usually regarded as the better choice if you’re trying to keep the house (as opposed to simply trying to discharge debts). It can work even if your house is already listed for auction—but you’ll have to get the paperwork filed and the judgment rendered before the auction date, and you’ll need to get the order to your local sheriff’s department in time for them to review it and remove your home from their listings.

Bankruptcy isn’t a magic spell—the lender can eventually get that stay lifted—so you should regard any delays as a gift and get to work resolving the problem via a loan modification or other solution.

Sue the lender

There are two kinds of foreclosure processes: Judicial (where the lender sues you and gets a court order to start the process) and non-judicial, where the terms of the mortgage allow the lender to just proceed without bothering the courts.

If your foreclosure was non-judicial, that means the courts might be an option for you, even if your home is scheduled for auction (you probably can’t sue if your foreclosure is judicial, because the courts have already weighed in). This is only a good option if you actually have grounds for a lawsuit; just filing the suit will only slow things down for a short period of time. If you can’t prove the lender made a serious error or broke local laws, this probably won’t work to actually stop the auction.

Modify your existing loan

When facing foreclosure or a sheriff’s sale situation, it’s important to remember the number one rule of mortgages: The bank just wants its money, and will always choose the easiest, safest way to get it. Foreclosure means they’ve determined you’re no longer easy or safe. Applying for a loan modification—even late in the process after your house is listed for auction—can stop the process cold. If it’s successful, you can just resume making your mortgage payments.

This can work because federal law prevents lenders from conducting a foreclosure auction if a loss mitigation application is received 37 days before the auction. The success of this strategy depends on how much lead time you have—if you get a notice that your house is going up for auction in 2 months, for example, you have time to apply for a mitigation, which will stop the process. If you can then catch up on your payments or negotiate a modification or other solution, you might cancel the auction and save your home.

Look into “Right of Redemption” laws

Finally, even if you can’t stop the auction sale of your home, you might still have one last option: The Right of Redemption. Not all states have redemption laws, but those that do have a window of time post-auction wherein homeowners can pay the full amount owed plus any additional costs and regain ownership of their home. For example, in New Jersey there’s a 10-day period after an auction sale where you can file an objection to the sale (and this period can often be extended by filing for bankruptcy as well). In Philadelphia, the former homeowner has nine months to redeem the property—and the new owner can lose any money they invest into the property if the previous owner is successful.