Many companies featured on Money advertise with us. Opinions are our own, but compensation and
in-depth research may determine where and how companies appear. Learn more about how we make money.

Getty Images—This content is subject to copyright.

If you're divorced from a high-earning ex and thinking of tying the knot again, there's a little-known Social Security rule that might enable you to collect thousands of dollars more in benefits over your lifetime.

You typically forfeit any retirement benefit based on your ex’s work record when you are remarried—and that can be a steep loss if you and your new love were stay-at-home parents or haven’t earned as much as a previous spouse over your careers. Some older couples even decide not to make their union official because they would see their Social Security benefits reduced.

But there’s a special rule that can help, provided you are both already drawing Social Security benefits based on a former spouse’s work record, says CPA Mike Piper, author of Can I Retire?. If you qualify, you can both keep collecting the benefits based on your previous partner, even after saying "I do" to each other.

Who gets to take advantage of this rule? At least one of you must be collecting a divorced spousal retirement benefit at the time you wed. Usually the earliest age at which you can claim is 62. The other of you must be collecting based on a previous marriage either as a divorced spouse or a widow/widower or as a survivor of an ex-spouse who died. (To qualify for retirement or survivor benefits on your ex-spouse's record, you must have been married 10 years or longer.)

There's a separate rule that can help when widows and widowers remarry: Remarriage after reaching age 60 doesn't affect a survivor's eligibility to draw on a former partner's record.

If you want to take advantage of the rule for divorced spouses, Piper suggests you take a copy of the provision with you when you visit the Social Security office, as not all staff may be aware of this rule.