An outraged Elon Musk announced Tuesday that he will move the headquarters of SpaceX and X to Texas after a California law prohibits schools from requiring teachers to disclose information to parents about racial identity of their children.

“That was the last straw,” Musk told X a day after California Gov Gavin Newsom signed the controversial bill into law that is sparking new controversy in an already tumultuous US election year.

“Due to this law, and many others that have come before it, that attack both families and companies, SpaceX will now move its headquarters from Hawthorne, California to Starbase, Texas,” Musk announced.

The billionaire also emphasized that he was moving X, formerly Twitter, from its art-deco headquarters in San Francisco to Austin, a threat he had made in the past but never followed through on.

“I’m tired of avoiding gangs violent junkies just to get in and out of the building,” Musk wrote.

The tycoon has already moved Tesla’s headquarters from Silicon Valley’s Palo Alto to Austin, Texas, but still maintains an “engineering headquarters” in California.

The LGBTI community argues that students have a right to privacy, but some counter that parents have a right to know what’s going on with their children.

Musk is the father of a transgender daughter from whom he is estranged, and he blames a private school in California for turning far-left and turning against him. He calls his transgender daughter a “communist” who believes that “every rich person is bad.”