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."