Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

In the Houston suburb of Dickinson, residents are struggling to get their lives back on track. Hurricane Harvey devastated the city, destroying scores of homes and businesses. The city, fortunately, has a plan to help. Officials there are accepting applications for relief grants "from funds that were generously donated to the Dickinson Harvey Relief Fund."

But there's a catch.

The application, recently posted online, includes a provision requiring Dickinson residents to vow in writing that they will not boycott Israel. The relevant section, titled "Verification not to Boycott Israel," reads:

By executing this Agreement below, the Applicant verifies that the Applicant: (1) does not boycott Israel; and (2) will not boycott Israel during the term of this Agreement.

The city attorney, David Olson, said Dickinson officials are following a Texas law that blocks state agencies from contracting with or investing in companies that boycott Israel.

"The city in no way advocates on behalf of the underlying political issue, but we're doing everything in our power to follow state law," Olson told NBC News on Friday.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Gov. Gregg Abbott signed that legislation in May, declaring that "anti-Israel policies are anti-Texas policies." The so-called Anti-BDS (Boycott, Divestments, and Sanctions) law took effect on Sept. 1.

The American Civil Liberties Union sharply criticized the boycott provision of the relief application as a violation of free speech.

A volunteer looks for evacuees amid floodwaters in Dickinson, Texas, Aug. 28, 2017. Rick Wilking / Reuters

“The First Amendment protects Americans’ right to boycott, and the government cannot condition hurricane relief or any other public benefit on a commitment to refrain from protected political expression,” ACLU of Texas Legal Director Andre Segura said in a statement.

“Dickinson’s requirement is an egregious violation of the First Amendment, reminiscent of McCarthy-era loyalty oaths requiring Americans to disavow membership in the Communist party and other forms of ‘subversive’ activity."

It was not immediately clear why citizens applying for disaster aid would be subject to a law that nominally applies to state agencies and businesses.

A spokeswoman for the Texas attorney general Ken Paxton said his office could not comment on the Dickinson application, but noted the state law is "specific to companies, not individual citizens."

For more than a decade, the BDS movement has sought to punish Israel economically to protest the treatment of Palestinians. Its supporters lobby corporations and other institutions, including universities and colleges, to cut business ties with the Jewish state.

But critics say the movement threatens to delegitimize Israel, and the head of the Anti-Defamation League has said some BDS activism "plays out on the college campus in the form of anti-Semitic speech and incidents."

The ACLU has pushed back on anti-BDS moves, filing a lawsuit earlier this month challenging anti-BDS legislation in Kansas.

"The Supreme Court ruled decades ago that political boycotts are protected by the First Amendment," the ACLU said in its statement on the Dickinson application, "and other decisions have established that the government may not require individuals to sign a certification regarding their political expression in order to obtain employment, contracts, or other benefits."