[What you need to know to start the day: Get New York Today in your inbox.]

ALBANY — New York lawmakers on Thursday passed a bill to outlaw “revenge porn,” a practice that victims say can alter their lives as drastically as any other form of abuse, but from which there are few of the same protections.

The bill’s passage was long awaited, and for many victims, long overdue.

In an era of social media ubiquity and the permanence of the internet, revenge porn, the nonconsensual sharing of sexually explicit photos or videos, has emerged as an increasingly potent weapon. The images can follow victims for years, turning up when employers or romantic partners search for their names on the internet.

Forty-one states have already outlawed revenge porn, as have Washington, D.C., New York City and several counties, including Nassau County.

But in New York, victims told of years of helplessness. Prosecutors could not charge offenders for a practice that was not illegal, and judges turned down appeals for help on the grounds of free speech, even as other states moved to shore up protections.