A bill that would make the nonconsensual distribution of intimate photos a federal crime finally is ready for introduction.

The legislation seeks to ban “revenge porn,” which an increasing number of states punish with criminal penalties, but against which there’s no federal law, complicating efforts to remove the often humiliating content and penalize distributors.

Revenge porn generally is posted online by jilted lovers or hackers. In many cases, victims share the material with someone they trust, then rue the decision when it appears online without their permission, sometimes accompanied by their name, workplace and contact information.

The effort to criminalize such conduct is spearheaded by Rep. Jackie Speier, D-Calif., who began work on the proposed law more than a year ago, Her office says its deliberative pace – the bill’s introduction is now planned for Sept. 9 -- was slowed by an effort to address concerns about unintended effects on legitimate speech online and accidental violators.

The bill proposes a prison sentence of up to five years for offenders along with a fine. Though many details have been tweaked – and may continue to be adjusted ahead of introduction – this detail has remained consistent, according to Speier’s office.

Website operators who “solicit” and “promote” the material also would be eligible for criminal penalties.

Speier’s legislation would require that offenders know the content is being shared online without consent, a high bar her office says would spare from prosecution someone who got a photo of someone else, then posted it online without knowledge the distribution was nonconsensual.

Websites cannot currently be forced by state laws against revenge porn to remove content because Section 230 of the federal Communications Decency Act grants Internet companies legal immunity if third-party content doesn't violate federal copyright or criminal law.

The legislation won’t change that major principle of Internet governance and, in fact, has a carve-out protecting websites that host third-party content, so long as they aren't intentionally distributing revenge porn.

As the bill was drafted, Speier’s office says, it became clear that mainstream companies from Microsoft to Google, Twitter and Facebook have taken proactive steps allowing victims to petition for its removal.

The political landscape also has shifted significantly since Speier began work on the bill. When her office first confirmed to U.S. News her intention to sponsor the legislation in early 2014, three states made sharing revenge porn a crime. Now 24 states have laws on the books.

One of the 24 states, however, agreed earlier this month not to enforce its law to resolve a free speech lawsuit from publishers, booksellers, librarians and photographers that illustrates the pitfalls of imprecision.

That lawsuit argued the vagueness of Arizona’s law unconstitutionally criminalized distribution of bathtub baby photos and historical images like “Napalm Girl” from the Vietnam War and could ensnare those who print images of a Hollywood star's cleavage or U.S. troops abusing Iraqi prisoners.

Speier’s bill intends to address such concerns with a carve-out for photos that have a “bona fide public interest.” Her office says it would cover those that are newsworthy, artistic or educational.

It’s unclear if everyone will be satisfied. In addition to standard concerns about wording, the theoretical effect of a new criminal statute may spook some Internet activists. When the prospect of federal legislation first floated in 2013, Matt Zimmerman of the Electronic Frontier Foundation told U.S. News he feared websites would reflexively take down nonoffending content to free themselves of potential problems.

Zimmerman suggested lawmakers instead enhance possible civil awards for victims who sue – something that Speier’s bill in its current form does not do.

It’s unclear what effect the bill – or any U.S. legislation – would have on foreign sites.