On Tuesday, Texas Republicans narrowly lost their attempt to repeal social media companies’ First Amendment rights.

In a 5-4 ruling, the Supreme Court granted an emergency stay request on Tuesday upholding a request by technology companies to block the law, which is being challenged in a federal appeals court.

Chief Justice John Roberts, along with Justices Stephen Breyer, Sonia Sotomayor, Brett Kavanaugh and Amy Coney Barerett, granted the stay, reversing the 5th Circuit Court ruling that overturned an earlier order by a Texas district court.

Justice Samuel Alito wrote a dissent, joined by Justices Clarence Thomas and Neil Gorsuch. Justice Elena Kagan also dissented but she did not join Alito’s dissent and did not explain the reason for her action.

“We are encouraged that this attack on First Amendment rights has been halted until a court can fully evaluate the repercussions of Texas’ ill-conceived statute,” said Matthew Schruers, president of the Computer and Communications Industry Association, which filed the petition.

The law, HB 20 seeks to ban online platforms from restricting posts by users based on their political views. Activation of the law means that social media companies are prevented from properly monitoring content on their platforms.