Elon Musk, SpaceX CEO and X owner, announced Tuesday that he plans to move the headquarters of both companies from California to Texas.

Musk shared the news on X, saying Gov. Gavin Newsom’s signing of a law that bars California school districts from notifying parents of a child’s gender identification change was “the final straw.”

The SpaceX headquarters will move from Hawthorne to Starbase, Texas, while the X HQ will move from San Francisco to Austin, Musk said.

“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 said in a post.

This isn’t the first time Musk has announced plans to move his companies out of the Golden State.

Musk moved the Tesla corporate headquarters to Austin from Palo Alto in 2021 but later announced plans to move back in 2023.

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 dubbed Starbase. The company’s smaller Falcon 9 rockets take off from Cape Canaveral, Florida, and Southern California.

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

The Associated Press contributed to this report.