WASHINGTON — On May 2, Israel’s Independence Day, Texas state Rep. Phil King stood smiling as Gov. Greg Abbott signed King’s bill banning the state from doing business with boycotters of Israel.

“Anti-Israel policies are anti-Texas policies, and we will not tolerate such actions against an important ally,” Abbott said of the bill that overwhelmingly passed the Legislature.

Less than six months later, King had to explain why his signature pro-Israel policy was not an anti-Texas policy.

City officials in Dickinson, a suburb of Houston hard hit by Hurricane Harvey, required any applicant for relief grants to verify that he or she “(1) does not boycott Israel; and (2) will not boycott Israel during the term of this Agreement.” The American Civil Liberties Union took notice and loudly objected. Observers noted the queasy-making optics of a pro-Israel policy standing in the way of hurricane relief.

King, a Republican whose district includes Fort Worth, immediately started making calls to track down the Dickinson officials who drafted the contract.

“It’s a complete misunderstanding of the statute,” he said in an interview after what had been for him a surprisingly busy Friday, after the ACLU’s objections made news. The office of Larry Taylor, a Republican who sponsored the law in the state Senate and whose district includes Dickinson, also was fielding questions about the law on Friday.

If Dickinson is indeed misunderstanding the law, the case nevertheless brought to the fore misgivings about the measures passed in more than 20 states targeting the Boycott, Divestment and Sanctions movement aimed at Israel. Critics say they may impinge on free speech rights and create a backlash by making it seem the government is using the law to suppress one side in a political debate.

A federal law prohibiting compliance with or support of a boycott of Israel is facing stumbling blocks.

Opponents of the laws say the Dickinson case, and one in Kansas, where a teacher trainer who supports a boycott of Israel is refusing to sign a state contract that includes an anti-boycott clause, prove their point.

“In addition to being mystifying — what do home repairs in Texas have to do with a country more than 7,000 miles away? — this requirement is clearly unconstitutional,” Brian Hauss, an ACLU staff attorney wrote in a blog post.

The ACLU, which says it takes no position on boycotts per se, is leading a campaign to stem the tide of anti-BDS laws.

“The First Amendment protects the right of Americans to participate in political boycotts, a right explicitly recognized by the Supreme Court in a case that concerned an NAACP-organized boycott to protest white supremacy in Port Gibson, Mississippi,” Hauss wrote.

Defenders and sponsors of the law say that like many laws, the anti-BDS statutes are undergoing birth pains.

“These are new laws, they’ve been passed in the last couple of years and not everyone is going to immediately understand what they’re supposed to do,” Eugene Kontorovich, a legal scholar who helped draft many of the laws, said in an interview.

The Israel Project, among an array of national groups that advocated for the laws, said it was reaching out to officials on a case-by-case basis to make sure the laws are understood.

“We’ve been in touch with legislators when issues have come up, we’ve spoken with attorneys and legislators in various states,” said Jacob Millner, the Midwest director for The Israel Project.

The controversies over Dickinson and the Kansas case come at a critical time for a congressional bill that would extend 1970s laws targeting the Arab League boycott to those who comply with boycotts initiated by international organizations like the European Union or United Nations. The Israel Anti-Boycott Act, which has support from the American Israel Public Affairs Committee, also would expand the prohibited boycotts to those that target only settlement goods. Violators who do participate in boycotts face fines and, in some cases, imprisonment.

AIPAC wants broad bipartisan backing for the bill, but only 14 of the Democratic caucus’s 48 members are co-sponsoring the legislation. Notably, Sen. Kirsten Gillibrand of New York — who in the past has assiduously courted the pro-Israel community — dropped her co-sponsorship after representations from the ACLU and pro-Palestinian activists.

Sen. Ben. Cardin, D-Md., the lead Democratic sponsor of the bill, said the law is sound, but he is open to some revisions to make it clearer that it does not undercut free speech.

Dickinson City Management assistant Bryan Milward told JTA on Friday that the city was applying the law correctly.

“Because our application also functions as a contract, it was included in there,” he said.

King said that was simply not the case.

“My understanding of what Dickinson is doing is they have private funds being distributed for a grant program for individuals,” he said in the interview. “The law has nothing to do with private funds, it has nothing to do with individuals.”

A reading of the law bears out King’s bafflement: It refers only to for-profit “companies” as the targeted boycotters, and goes to lengths to define “company” as not applying to an individual. It also lists six specific government “entities” that are required not to do business with the targeted companies: five retirement systems and the school fund. Dickinson’s grant program, with funds raised from private individuals, would not qualify. A survey of other hurricane-afflicted local authorities in Texas by Electonic Intifada, a pro-Palestinian news site, found no other such requirement.

Laws have unintended consequences and even when misapplied can backfire on their drafters’ intent, said Rachel Lerner, the senior vice president for community relations at J Street. The liberal Jewish Mideast lobby opposes BDS, but sees the anti-BDS laws as infringing on free speech. Pro-Israel groups should stick to advocacy to counter BDS and avoid legislative bids to stop the boycotts, says J Street.

“You’re pursuing a strategy that’s out of your control how it’s implemented,” Lerner said. “It’s like using a cudgel for an issue; it’s the wrong tool. It’s not good for the Jews or Israel that people think that they can’t have a roof over their head if they boycott Israel.”

The New Israel Fund, another liberal group, said in a release that the Texas case proved the anti-BDS laws were “just plain wrong.”

The Jewish Federations of North America will feature a session at its General Assembly in Los Angeles next month on how to pass such laws. The session, featuring three lawmakers who put forward such bills, is still very much on, said Ethan Felson, the director of the JFNA-affiliated Israel Action Network.

“These laws are necessary, they’re effective and they need to be enforced appropriately,” he said in an interview. “These are laws that take a stand against discrimination, as drafted they do not infringe on individuals’ liberties.” (Also still on at the G.A.: a session on how best to assist Houston, post-Harvey.)

The case in Kansas may be stickier to defend: The state’s law does include “individuals” who boycott Israel as targets.

“The state shall not enter into a contract with an individual or company to acquire or dispose of services, supplies, information technology or construction unless such individual or company submits a written certification that such individual or company is not currently engaged in a boycott of Israel,” the measure says.

The law led the state Department of Education to send to Esther Koontz, who had completed a course on training math teachers, a form titled “Certification Individual or Company Not Currently Engaged in a Boycott of Israel.” Koontz, inspired by her Mennonite church, was boycotting Israel and would not sign the document. The ACLU filed a lawsuit on her behalf in a federal court.

Kontorovich said that in the Kansas case, it was Koontz and the ACLU who were misconstruing the statute: Koontz would still have the right to boycott Israel as an individual as long as she did not boycott it as a contractor — an unlikely scenario, he said, for someone who trains Kansas math teachers in how to improve their teaching skills.

“She’s a consumer boycotter, she’s trying to bootstrap that onto the commercial boycott” banned by the law in order to make a federal case, he said. “Her personal and her business relationship cannot be conflated.”

Hauss of the ACLU, who is representing Koontz, said the Kansas Education Department was enforcing exactly what the Kansas law, enacted this summer, prescribes.

“It seems to me that they’re enforcing the statute as written,” he said. “These laws are meant to do precisely the thing the Supreme Court has said is prohibited, which is to suppress the right to boycott.”

Also seizing on the Kansas and Texas cases to illustrate the pitfalls of the laws is Jewish Voice for Peace, a group that supports BDS. Its government affairs liaison, Rabbi Joseph Berman, calls the federal bill and the Kansas law “an anti-democratic attempt to silence a nonviolent movement for equality for Palestinians and a just peace for everyone in the region.”

Peggy Shapiro, the Midwest director of StandWithUs, a pro-Israel group that has advocated for the laws, said that opponents were cherrypicking cases in order to make the laws look bad.

“The fact that people want to generalize one or two outliers, their intention is not to expose the errors but to undermine the ability to prevent discrimination against Israel,” she said.

It has yet to be seen whether Dickinson and Kansas are anomalies, or whether there are other controversies in the offing. In its survey of Texas towns, Electronic Intifada found that Galveston, Austin and San Antonio extend the ban to include companies bidding to make uniforms and organize programming for 4-year-olds.

Rabbi Jill Jacobs, the director of T’ruah, a rabbinical human rights advocacy group, said the laws were likely to continue to backfire. She said the focus of pro-Israel advocacy should be on Israel’s government and its practices.

“The way to increase support for Israel is not to shut down dissent but make Israel a place we can be more proud of, and central to that is ending the occupation and making Israel a more democratic state,” she said.