The House Ethics Committee soon opened an investigation into Ms. Hill, making a young woman the first representative to be investigated under a new rule passed last year prohibiting sexual relations between members of Congress and staff members.

Yet, the broad outlines of this tale are very familiar. From Donna Rice sitting on Gary Hart’s lap during the 1988 presidential campaign , politicians have long cheated on their spouses — frequently with their employees — and gotten caught. The figure of the tight-lipped wife standing by her politician husband as he explains his bad behavior is so commonplace that it even spawned the plotline for a whole television series.

Ms. Hill’s story, however, has a thoroughly modern twist. The affair was revealed when RedState published text messages and nude photos of Ms. Hill in intimate poses. The photos, she said in a statement, were circulated by “an abusive husband who seems determined to try to humiliate me.”

That’s led her supporters to argue that Ms. Hill is not a perpetrator but a victim of both an abusive relationship and “revenge porn,” which is illegal under California law. It’s an issue that female celebrities and news anchors and many nonfamous people have faced; now, it’s come to politics.

“I fear the chilling effect the attack on Katie Hill will have on other ambitious daring women and members of the L.G.B.T.Q. community thinking about careers in politics,” said Carrie Goldberg, one of the most prominent lawyers tackling nonconsensual pornography cases. “Though the idea of sharing nudes may cause some of our septuagenarian politicians to clutch their pearls, we are entering a new generation where the majority of our up and coming young politicians and professionals will have shared secrets and pictures electronically.”