The US state of Texas has made it illegal for social media platforms to ban users “based on their political viewpoints”.
Prominent Republican politicians have accused Facebook, Twitter and others of censoring conservative views.
Former US president Donald Trump was banned from Facebook and Twitter after a group of his supporters attacked the Capitol in January.
The social networks have all denied stifling conservative views.
However, they do enforce terms of service which prohibit content such as incitement to violence and co-ordinated disinformation.
“Social media websites have become our modern-day public square,” said Texas governor Greg Abbott, after signing the bill into law on Thursday.
“They are a place for healthy public debate where information should be able to flow freely.
“But there is a dangerous movement by social media companies to silence conservative viewpoints and ideas.”
The new law states social media platforms with more than 50 million users cannot ban people based on their political viewpoints.
Facebook, Twitter and Google’s YouTube are within its scope.
Critics say the law does not respect the constitutional right of private businesses to decide what sort of content is allowed on their platforms.
“This bill abandons conservative values, violates the First Amendment, and forces websites to host obscene, anti-semitic, racist, hateful and otherwise awful content,” said Steve DelBianco, president of NetChoice trade association.
“Moderation of user posts is crucial to keeping the internet safe for Texas families, but this bill would put the Texas government in charge of content policies.”
The law is due to come in to force in December, but may face legal challenges.
In May, Florida passed a law which banned social networks from de-platforming politicians.
However, some parts of that bill were suspended by a federal judge, who ruled that it violated the First Amendment right to free speech.
Another Texas law, changing the rules around abortion in the state, is currently being challenged by the US Department of Justice.