A federal judge in Topeka has ruled that Kansas cannot tell contractors what they can and cannot boycott. That would seem obvious to anyone familiar with free speech protections under the First Amendment.

But last summer, Kansas passed a law requiring all those who contract with the state to certify that they are not boycotting Israel.

Why? In his opinion blocking enforcement of the law while the suit by the American Civil Liberties Union continues, U.S. District Judge Daniel Crabtree wrote that its supporters in the Kansas Legislature argued that it was intended “to stop people from antagonizing Israel.”

They “emphasized the need to oppose ‘Boycott, Divestment, Sanctions’ campaigns,” Crabree wrote, “which protest the Israeli government’s treatment of Palestinians in the occupied territories.”

In other words, the law is supposed to limit political speech. A similar bill proposed in Congress, the Israel Anti-Boycott Act, would criminalize such speech outright.

Have we forgotten that the American Revolution grew out of a boycott of British goods? So did the civil rights protections won through the Montgomery bus boycott.

In 1982, the Supreme Court upheld boycotts as constitutionally protected political speech. In NAACP v. Claiborne Hardware Co., the high court looked at the boycott of white-owned businesses in Port Gibson, Mississippi, and found that “speech, assembly, and petition . . . to change a social order that had consistently treated [African Americans] as second-class citizens” are “on the highest rung of the hierarchy of First Amendment values.”

That’s why Crabtree ruled that the “Supreme Court has held that the First Amendment protects the right to participate in a boycott like the one punished by the Kansas law,” which took effect July 1.

The ACLU suit challenging the law was brought on behalf of Esther Koontz, a Mennonite math curriculum coach from Wichita who had been encouraged by her church to join a boycott of Israeli companies last spring.

A couple of months after Koontz decided to stop buying Israeli products, she was invited to start coaching teachers across the state, as part of the Kansas Department of Education’s Math and Science Partnerships program.

She was eager to take on the extra work, which pays $600 a day plus expenses. But the program director told her that she first had to sign a certificate that she wasn’t boycotting Israel.

After a lot of thought, Koontz decided that she couldn’t in good conscience do that.

The program director said that in that case, she couldn’t have a contract with the state.

In its defense, Kansas argued that it would have given Koontz a waiver on religious grounds had she asked for one.

But had she reached the same conclusion on non-religious grounds, she’d still have the same right to express herself politically.

Kansas also argued that Israel might refuse to do business with or in the state if it did not punish boycotters. But it presented no evidence of any threat to the Kansas economy.

And as a thought exercise, maybe Republican proponents of the law should consider how they’d react if the state barred boycotts of Keurig, or Starbucks, or Nordstrom, or Target or the NFL.

No sale, right? No in all cases.

By The Kansas City Star Editorial Board