A US federal judge has blocked the enforcement of a Texas law that punishes contractors and businesses that support the anti-Israel Boycott, Divestment, and Sanctions movement (BDS).

The law, which was signed into law by Gov. Greg Abbott in 2017, requires contractors to certify that they do not boycott the Jewish state. It prohibits all states agencies "from contracting with, and certain public funds from investing in, companies that boycott Israel.

US District Judge Robert Pitman released an opinion Thursday delcaring that boycotts are protected speech and the law does not serve a compelling state interest.

The American Civil Liberties Union of Texas led the fight against the law and filed a federal lawsuit in December.

ACLU attorney Tommy Buser-Clancy called Judge Pitman's decision "a victory for the free speech of all Texans. The right to boycott is deeply ingrained in American tradition, from our nation's founding to today."

When Gov. Abbott signed the legislation into law in 2017, he said "anti-Israel policies are anti-Texas policies, and we will not tolerate such actions against an important ally."

Texas is one of 25 states to enact similar bans on the BDS movement.