If your home was recently sold in a foreclosure sale, but you haven’t yet moved out (or if you’re currently going through a foreclosure), you might want to know what happens next. Some homeowners quickly leave the home after the home is sold.

However, depending on your circumstances and the law, you might have other options to either stay in the home for a longer period of time, get money to move out sooner, or even buy back the home.

Redeeming the Home

Some lenders permit a foreclosed homeowner to buy back the home within a certain period of time after the sale. This is called a redemption period.

To redeem the home, you usually have to pay the total purchase price, plus interest, and any allowable costs, to the purchaser who bought it at the foreclosure sale.

Other times, you’ll have to pay the total amount owed on the mortgage loan, plus interest and expenses.

The deadline and procedures for exercising a right of redemption vary and not all lenders provide a redemption period after the sale.

Getting Help to Buy Back the Home

In order to redeem, the former homeowner has to come up with another source of financing. But getting a bank to lend you money after a foreclosure can be very difficult. Even if you have a steady income because your credit score will have taken a bit hit.

Some special programs are available to help homeowners in this type of situation by purchasing foreclosed properties and then reselling those properties back to the former homeowners, usually at current fair market value, with a new, fixed-rate 20-year mortgage.

See Also: Avoiding Foreclosure Rescue Scams

Live in the Home During the Redemption Period for Free

If your lender provides a redemption period after the sale, you sometimes have the right to live in the home payment-free during this time.

For example, some homeowners can get a six-month redemption period (some people get a year) during which time they can live in the home.

Under some circumstances, though, like if the foreclosed homeowner unreasonably refuses to allow the purchaser to inspect the home, the purchaser can begin an eviction sooner.

By staying in the home during the redemption period, you can save money by living rent-free. This way you can use the money that you otherwise would have spent on housing to pay other bills and start rebuilding your credit.

Remaining in the Home as a Tenant

In some cases, you might be able to remain in the home as a tenant after the foreclosure sale.

Live in the Home Until You’re Evicted

If you don’t move out after the purchaser gets title to the home, the new owner will start eviction proceedings to remove you from the property.

The length and procedures for the eviction process varies from state to state. In some cases, the foreclosing party can include the eviction as part of the foreclosure action. This depending on the law and the circumstances of your case.

While in other instances, it will have to file a separate eviction action with the court.

You might receive a notice prior to the start of the eviction (called a Notice to Quit), which gives you a certain amount of time. For example, three days to leave the home before the eviction officially starts. While you can stay in the home until you’re forcibly removed through the eviction process, it is generally best to leave the property before this time period expires.

Getting a Cash for Keys Deal

To avoid having to complete an eviction, the purchaser might offer you a “cash for keys” deal. With this arrangement, you agree to leave the home by a certain date, and in good condition. In exchange, the purchaser gives you a specified amount of cash to help pay for your relocation costs.

You can request a cash-for-keys agreement if the purchaser doesn’t offer you one.

Related: 5 Questions to Ask Yourself Before Buying a Foreclosure