California Governor Jerry Brown signed a first-of-its-kind state law outlawing what has become known as revenge porn, the distribution of private, explicit photos or video of other people on the Internet to humiliate them.

The measure, which passed both houses of the Democratic-led state legislature almost unanimously last month, makes it a misdemeanor to circulate such images online, punishable by up to six months in jail and a US$1000 fine for a first offense.

Signed into law late on Tuesday, the measure goes into effect immediately. It takes aim at an increasingly prevalent act of betrayal that typically occurs when a person posts nude images of a former romantic partner online as a way of exacting revenge after a breakup.

The images often end up proliferating on dozens of revenge porn websites that specialize in publishing such pictures, some of which charge the subjects fees to remove the offending material. The only other recourse victims have had was to pursue the perpetrators in civil court.

"Until now, there was no tool for law enforcement to protect victims," said the legislation's chief sponsor, state Senator Anthony Cannella, a Republican from the Central Valley town of Ceres. "Too many have had their lives upended because of an action of another that they trusted."

California law already made it a crime to take sexually explicit photos or video images of another person without his or her consent or knowledge.

The new statute extends the same misdemeanor classification to anyone who takes nude pictures of another person under the mutual understanding that those images are to remain private but subsequently distributes the images without permission to cause serious emotional distress.

New Jersey has an older law that allows criminal prosecution of such behavior, but that measure was passed as a cyberbullying statute not specifically aimed at revenge porn itself, said Cannella's spokesman, Jeff Macedo.

The phenomenon has become so widespread that it was recently featured as a story line on the popular HBO series "The Newsroom," in which one of the main characters, Sloan Sabbith, played by Olivia Munn, falls prey to an act of revenge porn by an ex-boyfriend.

A leading activist for criminalising the practice is Holly Jacobs, a victim herself who launched a website called endrevengeporn.org to lobby for greater sanctions against revenge porn and to offer assistance to other victims.

Describing her ordeal on her website, Jacobs recounts that a former boyfriend began posting explicit photos and video of her on the Internet after their breakup in 2009, along with her full name, email address, job title and specifics about where she worked and her PhD program in psychology.

"For three years damage control was a full-time job," she wrote, recounting that police and FBI were of no help, and that an Internet specialist she hired to get the material removed proved fruitless.

In an interview with NBC News, Jacobs called the new California law "an encouraging first step." But she said it fails to criminalize the distribution of self-taken photos, or "selfies," that were shared willingly with spouses or partners but later posted online without the subject's consent.