Tesla CEO Elon Musk threatened to pull his company's factories and headquarters from out of California on Saturday due to the state's strict coronavirus regulations. 

Per ABC, Musk is suing the local officials in Alameda County for overstepping state and federal restrictions. The Alameda County Health Department stopped Tesla from starting production at its factory in Fremont. Musk's lawsuit claims that this is an abuse of power because factory employees are allowed to work during the state's stay-at-home order since the facility is considered "critical infrastructure."

"Frankly, this is the final straw. Tesla will now move its HQ and future programs to Texas/Nevada immediately," Musk tweeted. "If we even retain Fremont manufacturing activity at all, it will be dependen on how Tesla is treated in the future. Tesla is the last carmaker left in CA."

Despite the friction, its unlikely that Tesla will leave the Golden State. Keeping Tesla in California is important to the Fremont community. In a statement released on Saturday, Alameda County Health Department claims to be working with Tesla in hopes of reopening the plant safely. 

"We look forward to coming to an agreement on an appropriate safety plan very soon," the statement reads. 

Fremont Mayor Lily Mei also revealed she is becoming concerned about the local economy and thinks there needs to be provisions for major manufacturers to resume production. 

"We know many essential businesses have proven they can successfully operate using strict safety and social distancing practices," the mayor said in a statement.

Adding to the local government's plea, moving Tesla from Fremont to Texas or Nevada would be an expensive step. Currently, Tesla's only U.S. vehicle assembly plant is in Fremont, and it is housed in a factory that used to be run by General Motors and Toyota. Setting up provisions to move out of the state would take more time than waiting out the virus restrictions. 

"Moving away from Fremont would take at least 12 to 18 months and could add risk to the manufacturing and logistics process in the meantime," Wedbush Securities analyst Daniel Ives wrote in a note to investors obtained by ABC

Still, Musk considers the closure of the Fremont factory a "serious risk." His tweets come as competitors in the like Toyota, General Motors, Ford, and Fiat Chrysler are making plans to restart production this month.