NEW YORK — Top Hillary Clinton aide Huma Abedin and disgraced former lawmaker Anthony Weiner have decided to negotiate their divorce privately.

The couple was supposed to appear before a Manhattan judge Wednesday, but the judge said both sides had agreed to discontinue the case. Abedin filed for divorce from Weiner in May and listed it as “contested,” which meant they had to negotiate in front of a judge. But now the parties can refile as “uncontested” and won’t have to make their discussion public.

“In order to reduce any impact of these proceedings on their child, the parties have decided to reach a settlement swiftly and privately,” Abedin’s lawyer Charles Fox Miller said in statement. Weiner’s lawyer echoed the statement.

The couple has a 6-year-old son. Weiner reported to prison in November to serve a 21-month sentence for sexting with a 15-year-old girl.

Weiner, a Democrat, resigned his U.S. House seat in 2011 amid a sexting controversy involving women, only to have new allegations doom his 2013 run for New York mayor.

Abedin became ensnared in the Clinton email probe. Then-FBI Director James Comey announced in late October 2016 that he was reopening the investigation of the former Democratic presidential nominee’s use of a private computer server after emails between Clinton and Abedin were found on Weiner’s computer amid the sexting probe.

The FBI concluded that neither Weiner nor Abedin had committed a crime in their handling of the email.

Clinton has called Comey’s intervention “the determining factor” in her defeat.