The US Supreme Court has upheld a Texas law that requires users accessing pornography sites to verify their age using a government ID or a face scan.

The 2023 law was challenged by PornHub and other sites that argued the requirement violated constitutional rights to free speech by placing a burden on adults who want to access that content.

Texas has defended the law, saying it was created to limit harm to minors. More than a dozen other states have passed similar laws.

Ultimately, the justices voted 6-3 along ideological lines in a decision released on Friday.

"The power to require age verification is within a State's authority to prevent children from accessing sexually explicit content," Justice Clarence Thomas, who authored the opinion, wrote.