Longtime Hillary Clinton aide Huma Abedin and her husband Anthony Weiner, who is currently in prison for sending explicit sexual messages to a teenage girl, will settle their divorce out of court in order to protect their young son from embarrassment.

"In order to ensure the proceedings have a minimal impact on their child, the parties have decided to finalize their divorce swiftly and privately," Abedin attorney Charles Miller told New York Daily News.

Abedin was supposed to appear in court Wednesday for divorce proceedings, but her attorney instead submitted paperwork signed by both sides that agreed to end the case, the New York Post reported.

The judge declared the case “discontinued,” the Post said.

Abedin filed for divorce in May after Weiner pleaded guilty to sending inappropriate messages to a 15-year-old girl.

Weiner reported to prison in early November. Upon his release, he must enroll in a sex-offender treatment program.