NEW YORK — Hillary Clinton aide Huma Abedin is done playing the good wife to Anthony Weiner, announcing Monday that she is leaving the serially sexting ex-congressman after he was accused of sending raunchy photos and messages to yet another woman.

Abedin, who as vice chair of Clinton’s campaign is destined for big things if the Democrat is elected president, stayed with Weiner after a sexting scandal led him to resign from Congress in 2011 and after a new outbreak of online misbehavior wrecked his bid for New York mayor in 2013.

She didn’t leave even when a recent documentary blew up tense moments in their marriage to big-screen proportions.

But on Monday, she effectively declared she had had enough.

“After long and painful consideration and work on my marriage, I have made the decision to separate from my husband,” she said in a statement issued by the campaign. “Anthony and I remain devoted to doing what is best for our son, who is the light of our life.”

The New York Post published photos late Sunday that it said Weiner sent last year to a woman identified only as a “40-something divorcee” who lives in the West and supports Republican Donald Trump.

The photos included two close-ups of Weiner’s bulging underpants.

In one of the pictures, Weiner is lying on a bed with his toddler son while texting the woman, according to the Post. The tabloid also ran sexually suggestive messages that it said the two exchanged.

Weiner told the Post that he and the woman “have been friends for some time.”

“She has asked me not to comment except to say that our conversations were private, often included pictures of her nieces and nephews and my son and were always appropriate,” the 51-year-old Democrat told the newspaper.

Abedin, 40, is a longtime Clinton aide and confidante who is often referred to as the candidate’s second daughter.

Abedin has been under scrutiny during the probe into Clinton’s use of a private email server while she was secretary of state. Federal prosecutors declined to file charges in the investigation, but FBI Director James Comey said Clinton and her aides had been “extremely careless” in their handling of classified information.

Abedin began working for the former first lady as a White House intern and became a trusted aide as Clinton won a seat in the Senate representing New York in 2000, ran for president in 2008 and served as President Obama’s secretary of state. Former President Bill Clinton officiated when Abedin and Weiner married in 2010.

Abedin was pregnant with the couple’s son, Jordan, when a photo of a man’s bulging underpants appeared on Weiner’s Twitter account in 2011. After initially claiming his account was hacked, Weiner acknowledged inappropriate online communication with several women.