In the weeks before the 2016 election, memes proliferated on Twitter bearing instructions on how to vote by phone or text message. The images were stylized to resemble Hillary Clinton’s campaign materials, and targeted her supporters in both English and Spanish. “Save time. Avoid the line. Vote from home,” they read. But no state allows either method for casting a ballot.

It’s unclear who crafted this low-budget bid at voter suppression. Far-right Twitter accounts helped spread them in an apparent attempt to reduce Clinton voters’ actual participation on Election Day. Similar ads on Facebook that falsely told voters they could vote by tweet were later found to be part of a Russian influence campaign that sought to damage Clinton’s candidacy. While their efficacy is uncertain, the ads and memes fit within a broader pattern of spreading false and misleading information to confuse and deter voters.

Democratic lawmakers unveiled a bill on Thursday that would criminalize misleading tactics like these, as well as similar ones that have cropped up in state elections in recent years. If enacted into law, the Deceptive Practices and Voter Intimidation Act would give federal prosecutors new tools to punish people who attempt to spread false election-related information. It would also be an interesting test of the Supreme Court’s willingness to allow lawmakers to regulate political speech on the campaign trail.

The bill is narrowly targeted at falsehoods designed to dissuade voters from participating in the electoral process. Its main provision would make it a crime to intentionally distribute false information about an election’s time and place, the qualifications to participate, any criminal penalties associated with voting, and “information regarding a voter’s registration status or eligibility” for at least 60 days before the election takes place. Those restrictions would also apply to false statements about endorsements a candidate has received.

Mistakes and benign errors wouldn’t fall under the provision’s scope; only falsehoods made with the “intent to impede or prevent another person from exercising the right to vote” would qualify. Other provisions would generally bar “hindering, interfering with, or preventing a person from voting, registering to vote, or aiding another person to vote.” Transgressors found guilty of violating the law could face a $100,000 fine and up to five years in prison.

Though the bill isn’t explicitly connected to the Russian cyberattacks on the American democratic system in 2016, lawmakers who introduced the bill referenced the climate of uncertainty it produced. “With our safe, fair and honest elections under attack from both outside our country and within, this bill is an attempt to codify what we all know should be the law,” Virginia Representative Donald McEachin, who introduced the bill’s House version, said in a statement. “No person should get away with providing false or misleading information about registering to vote or even voting.”

A complicating factor for the legislation is the Supreme Court, which has staked out a broad and expansive view on free-speech claims in the last 15 years, especially in cases involving restrictions on political speech. In its most recent term, for example, the court struck down a Minnesota law that banned certain types of political apparel in polling places, ruling that the state had “not supported its good intentions with a law capable of reasoned application.” The justices also overturned a 40-year precedent on public-sector union fees for non-members, which the court’s conservatives described as an unconstitutional form of compelled political speech.

How would the Roberts Court view a law that criminalizes falsehoods about elections? Rick Hasen, a UC Irvine law professor who specializes in election law, noted on Thursday that the majority of justices in last term’s Minnesota case about political apparel took an accommodating view toward banning election-related untruths. In an aside, the justices said that they “do not doubt that the state may prohibit messages intended to mislead voters about voting requirements and procedures.”

That approach could allow most of the bill’s provisions to survive. “This suggests that the part of the proposed law that would bar spreading wrong information about the time and place of elections as well as voter qualification and registration status would be constitutional, but the law barring false statements about campaign endorsements may well not be,” Hasen wrote.

The court has struck down laws that penalized falsehoods on free-speech grounds in other circumstances. Hasen pointed to United States v. Alvarez, a 2012 case where the justices weighed whether the Stolen Valor Act violated the First Amendment. At the time, the law imposed criminal penalties for lying about receiving the Congressional Medal of Honor and other military honors. Federal prosecutors used it in 2007 to bring charges against Xavier Alvarez, a fabulist who had previously claimed he had been a member of the Detroit Red Wings, for falsely identifying himself as a recipient of the nation’s highest military honor during a local water board meeting in California.

The justices overturned Alvarez’s conviction in a 6-3 vote, but no five justices could agree on the reasoning. Justice Anthony Kennedy and three of his colleagues simply held that the Stolen Valor Act violated the First Amendment by criminalizing a type of speech without providing sufficient justification. Justices Stephen Breyer and Elena Kagan also found the act unconstitutional, but suggested that a narrower version of it could survive judicial scrutiny. Justices Samuel Alito, Clarence Thomas, and Antonin Scalia found no constitutional violation whatsoever and dissented from the court’s decision.

Central to the justices’ analysis was the extent to which the First Amendment protected outright lies and other falsehoods. “The Court has never endorsed the categorical rule the Government advances: that false statements receive no First Amendment protection,” Kennedy wrote. “Our prior decisions have not confronted a measure, like the Stolen Valor Act, that targets falsity and nothing more.” He also made clear to distinguish the act from laws involving fraud and defamation, where there are actual victims, and from those that prohibit perjury and false testimony, which impede basic government functions.

In response, Congress passed a new version of the Stolen Valor Act in 2013 that narrowed its application. As shown by Alvarez’s experience, the original iteration could be used to prosecute even harmless forms of lying about a military honor. In contrast, the new law only punishes those who make false claims to “receive money, property or other tangible benefit,” essentially transforming it into an anti-fraud statute.

The Deceptive Practices and Voter Intimidation Act can be said to perform a similar role. After all, the government has no interest stronger than preserving the integrity of the American democratic process. Those who mislead or deceive voters about exercising their right to cast a ballot also commit a fraud of sorts—one that harms not only each individual voter it affects, but the vitality of American democracy as a whole.