A 1986 federal law makes it a crime to “encourage” unauthorized immigrants to come to or stay in the United States.

“The statute potentially criminalizes the simple words — spoken to a son, a wife, a parent, a friend, a neighbor, a co-worker, a student, a client — ‘I encourage you to stay here,’” Judge A. Wallace Tashima wrote last year for a unanimous panel of the United States Court of Appeals for the Ninth Circuit, in San Francisco, in striking down the law.

The law applies to a grandmother urging a grandchild to overstay a visa or a lawyer advising a client to stay in the country while fighting deportation, Judge Tashima wrote. It may cover public officials helping immigrants in sanctuary cities and perhaps even speeches at immigration rallies, he wrote.