Elon Musk, the CEO of SpaceX and owner of the social media platform X, declared on Tuesday that the headquarters of both SpaceX and X would be moving from California to Texas, a decision rooted in his opposition to a new California law.

A key factor propelling Musk’s decision appears to be California’s Assembly Bill 1955 (AB1955). Signed into law by Governor Gavin Newsom on July 15, this legislation prohibits schools from requiring staff to reveal when students ask to change their gender identification to anyone without their consent, including parents. While Musk, who has a transgender daughter, expressed disapproval of the law, his stance seems somewhat conflicted. He has previously voiced support for transgender rights, but also raised objections to certain aspects of gender identity discussions.

However, AB1955 likely acted as a tipping point for a pre-existing dissatisfaction with California’s business environment. Musk’s criticism of the current state of affairs in San Francisco has been vocal. In a post on X, he mentioned, “Have had enough of dodging gangs of violent drug addicts just to get in and out of the building.” This statement underscores his dissatisfaction with the city’s handling of public safety and its impact on business operations.” Musk had acquired the social media platform in a $44 billion deal two years ago, and since them, he has faced multiple operational challenges in San Francisco, including legal disputes over unpaid rent and public safety concerns.

“California literally made you with taxpayer subsidies & because it’s the best place around. Will this be a fake temper tantrum move just like Tesla’s fake ‘move’ to Texas?” Scott Wiener, member of the California State Senate, commented on Musk’s post.

The chosen destination for both companies is Texas. SpaceX’s new headquarters will be situated in Starbase, a location in southern Texas where the company already boasts a significant presence for Starship development and testing. X’s headquarters will find a new home in Austin, Texas, where Tesla, another Musk-led company, has already established its headquarters. Still, while the headquarters themselves are shifting, there is no guarantee that all employees will be uprooted and relocated to Texas. Tesla, for instance, maintains a substantial workforce in California despite its headquarters being in Texas.

This shift is expected to be a big blow for California’s economy, of which SpaceX is a major contributor. The departure of such a large employer could lead to job losses and a decrease in local economic activity, particularly in the aerospace sector. Same for the relocation of X (formerly Twitter) from San Francisco to Austin, which is likely to affect the Bay Area’s commercial real estate market. For Texas, though, the influx of high-profile companies like SpaceX and X is a substantial boon. The state stands to gain economically through job creation, increased business activity, and greater tax revenues. Texas Governor Greg Abbott welcomed the news, stating, “This cements Texas as the leader in space exploration.”

This is not the first time Musk has threatened to leave California, who has been gradually shifting his business operations to Texas. In 2021, the billionaire moved Tesla’s headquarters from Palo Alto, California, to Austin, Texas. This decision was influenced by the challenges Tesla faced during the COVID-19 pandemic when California’s health officials shut down the Fremont factory.