From the outside, if a marriage has lasted 20 or more years, it may seem like a safe assumption that both spouses are in it for the long haul. In fact, many observers say that “gray divorce,” or divorce later in life, is on the rise in the U.S.

A person getting divorced in their 50s or 60s is less likely to need to worry about child support or child custody, since the kids are probably already grown and out of the house. On the other hand, in middle age retirement is on the horizon, for those lucky enough to have saved enough to retire someday. But a divorce could wipe away all your retirement dreams, if you don’t take steps to make up for the loss of income you are about to experience.

An article in TIME provides some advice on not having to choose between retirement and divorce. Here are three tips:

  • Sell the house. It may be depressing to have to give up the family home after so many years, but the house might be one of the most valuable assets in play in the divorce. Selling the house can bring in an infusion of cash, while also cutting your individual housing costs going forward.
  • Look for sources of income during property division. Your top goal should be assets that will generate sustainable income, instead of a big payoff years down the road. Remember that you could have the option of a Social Security benefit based on your ex’s work history, if that benefit would be greater than the benefit based on your history.
  • Once the divorce decree is final, make sure you get the property to which you are entitled. Don’t let your ex drag his or her feet about actually dividing up assets and giving you your share. The sooner you get your portion of the marital property, the sooner you can start controlling the money.

Divorcing right before retirement can be scary, but at the same time, it can give you the satisfaction of knowing you will not be spending your golden years in an unhappy marriage. Speak to a divorce attorney for more information.