The Maryland House of Delegates has approved legislation that would make it a crime to disseminate “revenge porn” — using private, intimate photos or videos to harass or embarrass someone, often once a relationship ends.

The bill, which passed in a 130 to 0 vote Friday morning, sets penalties for those who cause “serious emotional distress to another by intentionally placing” an identifiable pornographic image, video or recording online. Those found guilty of the crime would face up to two years in prison and a fine of up to $5,000.

The Maryland Senate has yet to take action on the measure.

Several states have contemplated similar legislation, while navigating tricky questions about First Amendment rights. California and New Jersey have made such actions a crime, and Virginia is close to making the malicious distribution of pornographic material a Class 1 misdemeanor.

In Maryland, there have been several competing versions of revenge porn legislation, but lawmakers ultimately settled on one drafted by Del. Luiz R.S. Simmons (D-Montgomery).

In a statement Friday, Simmons said it was not easy to craft a bill that “balances the need to protect men and women from ridicule, humiliation, and personal destruction while still respecting the boundaries of the First Amendment.”

He said he hopes the legislation will “become a model for legislatures across the nation.”