Embattled Rep. Katie Hill hired revenge porn warrior Carrie Goldberg to sue over leaked nude snaps that emerged in the sex scandal that led to her resignation, The Post has learned.

The California congresswoman retained the noted Brooklyn attorney’s services after an onslaught of compromising photos surfaced on the conservative site RedState amid her ongoing divorce.

“This is a historic situation where an alleged abusive ex, bloodthirsty opposition, and a media without morals joined forces to hijack a brilliant young woman’s hard-fought congressional seat. It’s a new low for democracy,” Goldberg told The Post.

Goldberg — who represents Harvey Weinstein’s alleged victim Lucia Evans — said her firm has launched an investigation to determine who should be prosecuted for the trove of published photos.

“Everybody who participated in Representative Hill’s humiliation is on notice that we will track them down,” Goldberg said. “Anybody who continues to share, barter, peddle, sell images of Representative Hill will be found out and be brought to justice one way or another. Whether you are an ex-partner, a political opponent, a publisher, or the Republican National Committee, don’t think for a second you’ll be getting away with destroying a woman’s life.”

“Investigation into the universe of defendants is just beginning,” Goldberg told The Post.

Hill has indicated that she believes her estranged spouse, Kenny Heslep, played a role in the leak, which included images of her kissing a female campaign staffer, who was one of her partners in an unconventional “throuple” relationship.

“This coordinated campaign carried by the right-wing media and Republican opponents enabling and perpetuating my husband’s abuse by providing him a platform is disgusting and unforgivable and they will be held accountable,” Hill said Monday in a video.

Legal options aren’t “perfect” when it comes to prosecuting revenge porn cases, but she’s committed to seeking justice for the congresswoman, Goldberg said.

“I’m so grateful that in the past five years, our country has gotten to a place where there are legal options for Representative Katie Hill, and others who’ve suffered the vile humiliation of having their intimate pictures shared and published without consent,” Goldberg said. “The legal options may not be perfect and we need a federal revenge porn law that provides both civil and criminal justice, however our law firm exists to demand justice for victims of sexual violence.”

Hill announced her resignation Sunday amid an ethics probe into allegations that she had a sexual relationship with a male congressional aide, Graham Kelly. She’s set to give her last speech in Congress on Thursday.

Heslep hasn’t responded to multiple requests for comment — but his family blamed the leak on his computer being hacked, BuzzFeed reported.