Tesla CEO, Elon Musk tweeted on Saturday that Tesla will move its headquarters and future programs to Texas or Nevada from California immediately.

Infinity Tyres

“If we even retain Fremont manufacturing activity at all, it will be dependen (sic) on how Tesla is treated in the future,” he wrote on Twitter, referring to the facility in the San Francisco Bay area that is Tesla’s only U.S. vehicle factory.

Musk also tweeted about suing Alameda County, California, after its health department said the electric carmaker must not reopen the Fremont factory as local lockdown measures to curb the spread of the coronavirus remain in effect.

Musk told employees on Thursday that limited production would restart at Fremont on Friday afternoon.

California Governor Gavin Newsom said on Thursday that manufacturers in the state would be allowed to reopen. But Alameda County, where the factory is located, is scheduled to remain shut until the end of May with only essential businesses allowed to reopen.

Alameda County said on Saturday that it has been working with Tesla to develop a safety plan that “allows for reopening while protecting the health and well-being of the thousands of employees” that work at the factory and that it looks forward to coming to an agreement on a safety plan very soon.

On Friday, the county health department recommended that Tesla wait at least another week to monitor infection rates and discuss safe ways to resume production.

But Fremont Mayor Lily Mei expressed concern about the potential economic implications of continuing the shelter-in-place order without provisions for manufacturers such as Tesla to resume. Mei on Saturday urged the county to work with businesses on “acceptable guidelines for re-opening.”

Musk, who sparred with California officials in March over whether Tesla had to halt production at Fremont, has criticized the lockdown and stay-at-home orders, calling them a “serious risk” to U.S. business and “unconstitutional.”

Tesla builds more than 415,000 EVs per year at the Fremont plant and moving the entire production facility would be a massive undertaking.

Dan Ives, a Wedbush analyst, on Saturday estimated it could take the company 12 to 18 months to relocate production.

The threat to relocate the facility also comes as Tesla aims to ramp up production at Fremont of the Model Y crossover, the carmaker’s most profitable vehicle to date.

The tweets raise pressure on Newsom and San Francisco Bay area officials who were among the first in the U.S. to implement shelter-in-place orders and have been cautious about lifting them.

Musk has arguably been the tech sector’s loudest voice advocating for the reopening of the economy, which has drawn criticism from some of his peers in the business community and cheers from conservative political circles.

Tesla has roughly 20,000 employees in the region, including its headquarters in Palo Alto. Moving the headquarters and future programs to Texas and Nevada, where Tesla has its massive battery plant, is a threat that would be relatively easier for Musk to follow through on.

But the Fremont plant is the only place in the world where Tesla makes the Model S, X and Y, and the company has sunk billions of dollars into the site over the years.

“Picking up and leaving isn’t really an option right now,” Ben Kallo, an analyst at Robert W. Baird & Co., said by phone. “I don’t know if you can quickly say ‘I’m leaving.’”

Musk has been scouting locations for a new U.S. factory to build the Cybertruck and has hinted it could be constructed in Texas, where part of Tesla’s chip team is based. His rocket company Space Exploration Technologies Corp. also has operations in the state.

Missouri also has been making a pitch for the plant.