Elon Musk (Chief Technology Officer X) conference at the 71st edition of the Cannes LIONS (International Festival of Creativity) at Palais des Festivals et des Congres, Cannes FRANCE - 19/06/2024
New York CNN  — 

Elon Musk says he’s moving his companies out of California.

In two posts on X Tuesday, the billionaire said he will move SpaceX’s HQ from Hawthorne, California, to Starbase, Texas, a company town being built in the southern part of the state. Social media platform X will move from San Francisco to Austin, Texas, he then said.

Musk said that the SAFETY Act, a law California Gov. Gavin Newsom signed that would prohibit school districts from requiring teachers to inform parents if a child wants to be identified by a different gender, was “the final straw.”

“Because of this law and the many others that preceded it, attacking both families and companies, SpaceX will now move its HQ from Hawthorne, California, to Starbase, Texas,” Musk posted on X.

One of Musk’s children petitioned a California court in 2022 to recognize her new name and gender, saying she no longer wished to be related to her famous and wealthy father “in any way, shape or form.” Musk has been criticized for some of his statements on X regarding gender identity issues.

Musk said in a follow-up post that he was tired of what he described as violent crime surrounding the building where X is located in San Francisco.

Musk has had an inclination toward the Lone Star State for a few years now. In February, SpaceX filed to move its business incorporation location from Delaware to Texas, after a Delaware state judge struck down Musk’s 2018 Tesla pay package, siding with a shareholder who had challenged it as excessive.

In 2021, Musk said he would move Tesla HQ from the Bay Area to Austin, Texas. And Musk said in December 2020 that he moved to Texas.

CNN has reached out to X, SpaceX and Newsom’s office for comment.

CNN’s Chris Isidore contributed to this report.