Tesla announced on March 19th that it would temporarily shut down its electric car factory in California, after back-and-forth with local officials about whether the plant was subject to a county-wide coronavirus shelter-in-place order. But the Silicon Valley automaker fought to keep the factory open after that announcement as well, according to new emails obtained by Protocol. It also came after the county’s health officer decided that keeping the plant open was a “public health risk.”

The emails were sent by the local police chief to Tesla’s senior policy advisor, Dan Chia. Each one includes a letter memorializing calls and virtual meetings between Tesla and local city and county officials. They help shed light on the deliberations between the company and the authorities about whether the factory was an “essential business,” which would have allowed it to stay open following the county-wide (and eventually state-wide) shelter-in-place orders meant to help combat the spread of the novel coronavirus.

Tesla’s argument to those local officials, and to its own workers, has been that the company believes it should be considered “national critical infrastructure,” according to public guidelines from the Department of Homeland Security’s Cybersecurity and Infrastructure Security Agency, or CISA. CISA issued guidelines outlining what it considered to be critical infrastructure in 2015 that included “vehicles and commercial ships manufacturing.” But in a March 28th memorandum about the novel coronavirus pandemic, vehicle manufacturing is not specifically listed in the “critical manufacturing” section of CISA’s guidance. At the same time that Tesla was making this argument, every other major automaker ceased manufacturing operations in the US.

Tesla wanted to stay open because it believed it was “national critical infrastructure”

Tesla tried to convince city and county officials of this in the days leading up to the shutdown announcement, and asked to be deemed an “essential business” so it could keep producing the Model 3, Model S, Model X, and the Model Y (which the company had just started delivering) at the California factory.

Kimberly Petersen, the chief of police in Fremont, California (where the factory is located), told Chia on March 18th that the county’s interim health officer had decided Tesla’s factory was not essential, according to the emails, meaning it would have to abide by the March 16th shelter-in-place order and stop operations. The county health officer also told the city that keeping the manufacturing plant open and making the 10,000 or so workers report in would be a “public health risk,” though it’s unclear in the emails if this was specifically communicated to Tesla. The company did not immediately respond to a request for comment.

The next day, Chia and a number of other Tesla executives told the city in a virtual meeting that the company would comply with the order. “I would like to reiterate that the City of Fremont highly values Tesla as a partner and appreciates what you do for our economy and our community,” Petersen wrote in her email memorializing the meeting, which was dated March 21st. “We are extremely grateful for your willingness to collaborate in our fight against the spread of COVID-19 by placing public health ahead of all other priorities.”

Later that day, though, Chia told the deputy city manager that he felt Petersen’s letter was “not fully accurate,” and the two sides had another virtual meeting on March 22nd. During that meeting, Tesla’s acting general counsel told the city that he believed the state-wide shelter-in-place order issued by Gov. Gavin Newsom superseded the county order, and that the language of the state order left room for Tesla to remain open. In another memo sent to Tesla on March 22nd, Petersen writes that she nonetheless felt “bound to uphold [the county health officer’s] interpretation” of the county-wide order.

Tesla ultimately decided to keep winding down its operations at the factory, save for basic operations like payroll. It also told the city that it would keep bringing in some factory workers to perform so-called “end-of-line” work, and the Fremont police department found Tesla to be “in compliance” during a post-shutdown inspection, as was first reported by The Verge last week.

The company has since gone on to scale back operations at the Gigafactory in Nevada by more than 75 percent, and has also shut down its solar panel factory in New York. Curiously, Petersen told Tesla in one of the emails that if the company “transition[ed] to manufacturing ventilators, or other equipment intended to aid in the fight against COVID-19,” it could have kept the factory open. Tesla is currently sourcing and delivering desperately needed ventilators in California and New York, along with surgical masks, and CEO Elon Musk has said he wants to manufacture ventilators with help from Medtronic. But Musk has said he plans to make the ventilators at Tesla’s New York factory, not in California.