For most divorcing couples who own their home, what to do with that house can be one of the most important decisions they make. Often, one spouse will want to keep the house, especially if he or she has custody of the children. But doing so is not as easy as it may seem.

For one thing, if both you and your spouse’s names are on the mortgage, and both of you contributed to the monthly payments, your spouse will probably want his or her share of the equity in the home. If you cannot afford to pay your spouse’s share of the equity out of pocket, this will require refinancing into a new mortgage — this time to a loan in your name alone.

After all, your spouse will not want to continue to be responsible for the mortgage. It affects his or her credit rating, and if you ever default on the loan, the bank can go after you and your spouse, so long as his or her name is still on it.

This likely means you will have to qualify for a new mortgage on your own. With just one income backing it, obtaining a loan at a decent interest rate can be difficult. But there are ways, a financial planner told The New York Times.

One thing she suggests is looking into what kind of mortgage you can qualify for while still negotiating your divorce settlement. If cashing out the equity will make the new mortgage too expensive, it may be possible to buy out your spouse through other property or asset. Or your spouse may agree to help with the mortgage until you have enough income to qualify for a better deal at the bank.

As with deciding what to do with the house, every part of a marital property division agreement can have implications that are not immediately obvious to someone lacking expertise in New York divorce law.