If you’ve found yourself in financial difficulty, you may be considering bankruptcy, which allows you to settle with your creditors in court. In a bankruptcy, you may be able reorganize your debts to make your payments more manageable—or even eliminate your debts completely.

While a bankruptcy can help you get rid of your debt in general, you may want to recommit to the terms of your mortgage if you can afford to pay it and you want to keep the home. The promise to repay a mortgage after bankruptcy is known as reaffirming your mortgage debt, and whether you want to take this step depends on your circumstances and the type of bankruptcy for which you have filed.

What does it mean to reaffirm your mortgage debt after bankruptcy?

A reaffirmation agreement is a legal contract that states your promise to repay all or a portion of a debt from which you might have otherwise been released in a bankruptcy case. Reaffirming your mortgage debt means recommitting to the terms of the loan and promising to pay it. However, if you default or fail to pay the mortgage, you could still be subject to foreclosure.

“Bankruptcy has given you the right to discharge a debt and no longer have to repay it,” says Sam Tamkin, a Chicago-based real estate attorney, “If you are reaffirming that debt, you are agreeing to repay it.”

People usually opt for bankruptcy because they cannot afford to meet their financial obligations. If that’s the case for you, reaffirming a mortgage debt might undo the positive aspects of the bankruptcy, Tamkin cautions.

Why reaffirm your mortgage debt?

If you are current on your loan payments and able to meet future payments, reaffirming informs the lender that you intend to pay the mortgage. This allows you to keep your home during bankruptcy as long as you abide by the terms of the reaffirmation agreement and make the payments.

Reaffirming your mortgage ensures communication between you, the bank, and the credit reporting agencies, says Jennifer Brown of Fifth Third Bank.

“When you reaffirm, it’s going to alert the credit bureaus that you’re going through a bankruptcy so it looks like you’re paying your mortgage and shows that you have a history of making payments,” Brown explains.

Some lenders require borrowers to reaffirm their mortgage in order to have future payments recorded on their credit report.

“In the lending world, we want to see it’s been reported to the credit bureaus,” Brown says.

Those who do not reaffirm their mortgage debt but who still continue to make payments may find that their payments do not show up on their credit report. “If you don’t notify the lenders that you want to reaffirm, [those lenders] won’t alert the credit bureaus that you’ve been making payments on time,” Brown says.

Reaffirmation may also give you an opportunity to negotiate new terms with your lender in order to reduce your payments, your interest rate, or the total amount you owe.

How do you know whether or not you should reaffirm?

Each situation differs based on your payment history and your ability to pay in the future. If you are able to keep your mortgage debt, reaffirming may help ensure that the mortgage lender will report your payment activity to the credit reporting bureaus.

On the other hand, if financial difficulties prevent you from making this commitment and you want to be released from your mortgage in bankruptcy, you should not sign a reaffirmation agreement. Reaffirmation leaves you personally liable for the debt, and you can’t walk away from it after bankruptcy.

“If the lender is foreclosing on your property, there is no need to reaffirm because the lender is going to take the property,” Tamkin says. Additionally, if you are delinquent on your payments, your mortgage lender simply may not allow you to reaffirm your mortgage debt.

“[Borrowers] should work with their bankruptcy attorney and the lenders to see what their goals are and decide whether they need to, want to, or should reaffirm any debt,” Tamkin says.

Because bankruptcy remains on your credit report for 10 years after the filing date, it’s important to maintain other aspects of your credit. As you move on from the bankruptcy, consider taking steps to rebuild your credit file, such as applying for a secured credit card or a retail credit card with a low limit. By making on-time payments and responsibly using credit, you’ll be able to build a strong credit history and make positive changes to your financial life.

Camille Puschautz is a researcher, writer, and Web producer at Think Glink Media, with a background in print and digital media. Previously, Camille worked for Bloomberg News in New York and MediaTec Publishing in Chicago. She is a graduate of the University of Dallas and Northwestern University, where she received a master’s degree in journalism.