SAN FRANCISCO (AP) — Billionaire Elon Musk says he’s moving the headquarters of SpaceX and social media company X to Texas from California.

Musk posted on X Tuesday that he plans on moving SpaceX from Hawthorne, California to the company’s rocket launch site dubbed Starbase in Texas. X will move to Austin from San Francisco.

He called a new law signed Monday by California Gov. Gavin Newsom that bars school districts from requiring staff to notify parents of their child’s gender identification change the “final straw.”

“I did make it clear to Governor Newsom about a year ago that laws of this nature would force families and companies to leave California to protect their children,” Musk wrote.

Tesla, where Musk is CEO, moved its corporate headquarters to Austin from Palo Alto, California in 2021.

Musk has also said that he has moved his residence from California to Texas, where there is no state personal income tax.

SpaceX builds and launches its massive Starship rockets from the southern tip of Texas at Boca Chica Beach, near the Mexican border at a site called Starbase. The company’s smaller Falcon 9 rockets take off from Cape Canaveral, Florida, and Southern California.

It’s just below South Padre Island, and about 20 miles from Brownsville.