Credit: Unsplash/CC0 Public Domain

A federal judge on Wednesday night blocked a Texas law that would allow any state resident banned from a social media platform for their political views to sue the companies.

The came one day before the law was scheduled to take effect.

The decision is a blow to Texas lawmakers who alleged Facebook, Twitter and Google's YouTube censor right-wing views. The was motivated in part by the social suspensions of former President Donald Trump after the Jan. 6 attack on the Capitol.

Technology trade groups that represent the major social media companies challenged the law signed in September by Texas Republican Gov. Greg Abbott, saying it would chill the First Amendment rights of corporations to "exercise their own editorial discretion and to be free from state-compelled speech."

"Texas' law would have forced online platforms to pull the referees from , giving anti-vaxxers, conspiracy theorists, and insurrectionists free reign," Chamber of Progress CEO Adam Kovacevich said in an emailed statement. "Today's court decision is a big victory for social media users who want less hate speech and misinformation in their online communities."

Abbott did not immediately respond to a request for comment. In a Washington Post op-ed, he claimed the law is needed to rein in the unbridled power of the nation's leading tech companies.

Texas is the second state to target the companies for restricting or removing content or accounts.

A federal judge blocked a similar Florida law in June, one day before it could take effect after the trade groups, NetChoice and the Computer and Communications Industry Association, challenged the constitutionality of the law in court.

The trade groups say the Texas law in much the same way tramples the First Amendment rights of social media companies to moderate content by forcing them to host harmful speech including hate speech.

The First Amendment protects people from censorship by the federal government, not from content moderation decisions by private companies. Social media companies say they don't target conservatives, only harmful content that violates their rules.

Dozens of states are considering legislation to restrict how social media platforms regulate people's speech, though few have gotten this far.

These bills resonate with conservatives who believe their First Amendment rights are violated when social media posts are labeled or removed or when their accounts are banned for violating the policies of social media platforms. They were also angered by Trump's bans from the major platforms.

Steve DelBianco, president and CEO of NetChoice, told U.S. TODAY in September that he expects a slew of bills in Republican-led states in 2022. How far reaching those bills are will depend on the outcome of the cases in Florida and Texas.

Florida was the first state to push through legislation when Gov. Ron DeSantis, a Trump ally, signed a bill in May that would penalize social media companies for removing or barring the speech of politicians. DeSantis is appealing the 's temporary injunction.

The Texas law goes further than Florida's. It applies to all users and prevents social media platforms from making decisions based on the "viewpoint" expressed in the post.