A bill that criminalizes the dissemination and publishing of explicit and intimate images was signed into law on Tuesday by Gov. Andrew Cuomo.

The measure creates a misdemeanor charge for so-called “revenge porn” and includes a provision that would allow a victim to seek restitution in civil court.

Lawmakers approved the measure, which had been proposed for several years, with an eye toward social media’s ability to shotgun private images on the web.

“Our laws have not kept pace with technology and how abusers can use it to harass, intimidate and humiliate intimate partners,” Cuomo said. “By criminalizing the publication of revenge porn, we are empowering victims of this heinous act to take action against their abusers and showing them a path to justice.”

The new law makes the distribution of revenge porn punishable of up to a year in prison and allows victims to bring cases in civil court settings for damages. Republicans and Democrats alike, including GOP Sen. Phil Boyle, had been supportive of the legislation.

“I was proud to champion this issue at a county level, and today I am honored to stand with my colleagues to pass this vitally important legislation at a state level that will work to protect victims of this particularly heinous crime,” said Democratic Sen. Monica Martinez.

“We are sending a strong message that this behavior will no longer be tolerated in the State of New York, and in doing so we are empowering victims to take a stand against this kind of violation. I want to extend my gratitude to the individuals who have come forward to share their powerful stories and to the advocacy groups who have given the victims a voice.”