Being married to Anthony Weiner was a roller coaster of “circumstances I never imagined,” wife Huma Abedin revealed in court documents unsealed Thursday.

Abedin, who is currently divorcing the pervy ex-congressman, penned the letter asking a judge to consider the couple’s young son when sentencing Weiner for sexting with a 15-year-old.

“This is not a letter I ever imagined I would write, but, with Anthony, I have repeatedly found myself in circumstances I never imagined,” Abedin wrote.

​The longtime Hillary Clinton aide has been dragged through years of scandal since Weiner accidentally tweeted a picture of his underwear-couched erection in 2011. She finally filed for divorce this year after her hubby sobbingly admitted he shared X-rated messages with a 15-year-old girl.

The revelations were the latest in a string embarrassing incidents for the couple.

Weiner mounted a comeback bid for New York mayor in 2013, but his prospects softened when a woman named Sydney Leathers revealed he sent her raunchy messages under the pseudonym “Carlos Danger.”

In 2015, he was busted for sending a woman photos of his crotch — with his then-3-year-old son in bed next to him.

Weiner’s lawyers are trying to keep him out of jail, and the disgraced pol says he has turned over a new leaf after going to sex-addiction therapy.

“I’m different now,” he wrote to sentencing judge Denise L. Cote.

“By not getting help, by continuing to dishonor his mother, by living in shame and secrets, I was not teaching him courage,” he wrote of his relationship with his son. “But your honor, with your grace, I hope I will be able to tell him some more. I hope I will be there to show him with my actions that, although I will carry the regret, I will also be better.”