A federal appeals court on Tuesday struck down a portion of federal law that makes it a crime to encourage illegal immigration, ruling that the statute violates the First Amendment.

“Criminalizing expression like this threatens almost anyone willing to weigh in on the debate,” Judge A. Wallace Tashima wrote in his opinion for the 9th Circuit Court of Appeals, Politico reported.

Federal prosecutors argued that the law should apply only to individuals who provide "substantial assistance" to immigrants entering or residing in the U.S. illegally, according to Politico, which noted that the law took effect before President Trump Donald John TrumpOmar fires back at Trump over rally remarks: 'This is my country' Pelosi: Trump hurrying to fill SCOTUS seat so he can repeal ObamaCare Trump mocks Biden appearance, mask use ahead of first debate MORE took office.

ADVERTISEMENT

Tashima disagreed with prosecutors, saying that their reading was "strained."

“Although the ‘encourage or induce’ prong … may capture some conduct, there is no way to get around the fact that the terms also plainly refer to First Amendment-protected expression,” Tashima wrote.

The Justice Department told The Hill that it is looking over the ruling and reviewing its options.

"It is illegal to knowingly assist in the commission of violent crimes, drug crimes, and a variety of other crimes; it is only right that Congress, on a fully bipartisan basis, has criminalized assisting in the commission of immigration crimes as well," department spokesman Steven Stafford told The Hill.

"The Department is reviewing this ruling and considering our options."

A former California immigration consultant, Evelyn Sineneng-Smith, filed the appeal.

Sineneng-Smith was sentenced in 2015 to 18 months in prison after a jury convicted her on tax and mail fraud charges as well as a violation of the law that the 9th Circuit Court ruled against Tuesday.

Prosecutors argued that she used her business as a scam and urged immigrants to apply for programs that had already ended or for which they were clearly not eligible.

The 9th Circuit Court upheld the other convictions for Sineneng-Smith's other crimes.