A revenge porn bill that’s languished in Albany for five years passed the New York Legislature on Thursday — and it could force Google and other internet companies to remove retaliatory pornographic videos under court order, according to the bill’s sponsors.

“I’m proud to stand here with all my colleagues today to send the message that New York will no longer tolerate the crime of revenge porn,” said Assemblyman Edward Braunstein (D-Bayside), who has been crusading for the bill since 2013.

“Victims of revenge porn are often threatened, stalked, harassed and they have trouble finding new jobs. Sometimes they have trouble entering new relationships, they suffer extreme emotional distress. Sometimes we’ve seen victims commit suicide … this new law sends a message to anybody who’s thinking about distributing revenge porn … that if they are caught, there is a possibility they will spend a year in prison.”

The legislation unanimously passed both the Assembly and the Senate and will head to Gov. Andrew Cuomo, who says he’ll eagerly sign it.

The Post has published a series of reports detailing the effects non-consensual photography has had on victims when their intimate images were splashed across social media or sent to family members and employers.

The bill, once signed into law, will make the dissemination of an explicit image without a person’s consent when done with the intent to cause “emotional, financial, or physical” harm a Class A misdemeanor punishable by up to a year in jail and/or a $1,000 fine. It revises the civil rights law to allow victims to bring a civil suit for damages or file a criminal case, or both.

The bill also includes a unique provision that is different than the other 41 non-consensual photography state laws currently in place across the US.

“Victims will also be able to file for a court order requiring websites to permanently remove the offending images as well as obtain significant civil penalties against the abuser,” Braunstein said.

“This would make New York the first state in the nation to allow a court to issue an injunction requiring websites to take these videos and images down.”

This could be the first time since the passage of the federal Communications Decency Act that websites could be forced by the courts to regulate their content, which could create a legal precedent, depending on a judge’s interpretation of the new proposed law.

Legislators said even giants like Google and Facebook could be forced to remove content under the law, even though they are protected by the CDA.

John Olsen, regional director for state government affairs for the Internet Association, said in a statement that while the tech industry “continues to have reservations about the bill, it is important for New York State to pass Senate Bill 1719C so that victims of these horrific actions will have the ability to hold bad actors to account.”

Carrie Goldberg, a Brooklyn lawyer, delivered emotional testimony during a press conference about her own experience when an ex-boyfriend threatened to send her nude images to her colleagues.

At the time, police told her there was “nothing they could do,” and when she went before a judge in Family Court, which handles disputes between couples, the judge told her she had a “First Amendment problem.”

“It’s freedom of speech to express yourself through the naked pictures of someone else? That’s insane,” Goldberg said.

“Could you imagine if someone’s first impression of you was them seeing a picture of your private parts?”