A federal judge has blocked legislation allowing businesses to post signs disclosing whether they accept trans or non-binary customers to use bathrooms in line with their gender identity.

US District Judge Aleta Trauger of the Middle District of Tennessee filed an injunction to temporarily halt the state from enforcing the anti-trans law.

The law, which would allow businesses to display signs stating whether they allow non-binary and trans individuals to use bathrooms that corresponds their identity, went into effect earlier this July.

The American Civil Liberties Union (ACLU) filed a lawsuit last month to challenge the law on behalf of business owners in Nashville and Chattanooga who allow customers to use their preferred restroom.

House Bill 1182 stated: “A public or private entity or business that operates a building or facility open to the general public and that, as a matter of formal or informal policy, allows a member of either biological sex to use any public restroom within the building or facility shall post notice of the policy at the entrance of each public restroom and at each entrance of the building accessible by the general public.”

Republican Rep. Tim Rudd, who backed the bill, would have required businesses to state: “This facility maintains a policy of allowing the use of restrooms by either biological sex, regardless of the designation on the restroom.”

Speaking to CNN, Chris Sanders, executive director of the LGBTQ+ organization the Tennessee Equality Project. “This law is harmful because it attempts to create a stigmatizing fear around trans people and restrooms,” he said. “It is also harmful because it compels trans-inclusive businesses to put up a disparaging sign that actually makes going to the restroom more dangerous for trans people.”

Trauger stated plaintiffs were “likely to succeed on their challenge” to the controversial law. Additionally, the judge noted how the “First Amendment typically does not permit such a mandate unless it is narrowly tailored to satisfy a compelling government purpose”.

Hedy Weinberg, executive director of the ACLU of Tennessee, declared in a statement that the law is “bad for businesses” in the state and “harmful to transgender people”.

“We are glad the court saw that this law is likely unconstitutional and hope that the state gives up the wasteful effort to defend discrimination and a violation of the First Amendment,” Weinberg added.

Kye Sayers, owner of Chattanooga’s Sanctuary performing arts and community centre and one of the owners in the lawsuit, said that she’s also glad the court saw reason and decided it was “unconstitutional” to “display a sign that hurts” trans and intersex people.

“These signs would have damaged our businesses and the environment we have tried to create for our community, customers and staff,” she added.

Related: EU prepares to take legal action against Hungary’s anti-LGBTQ+ law