Since Monday, Tesla has been under pressure from officials in Alameda County to shut down operations of its car factory in Fremont, California, to fight the spread of the coronavirus. On Thursday, Tesla finally announced it would halt vehicle manufacturing in Fremont.

"We have decided to temporarily suspend production at our factory in Fremont, from end of day March 23, which will allow an orderly shutdown," Tesla said in a post on its website.

March 23 is next Monday—a full week after officials in seven Bay Area counties ordered non-essential businesses to close down. To make sure there was no confusion about Tesla's status, Alameda County tweeted on Tuesday that Tesla was not an essential business.

But Tesla persisted. In recent weeks, Elon Musk has been a vocal skeptic of efforts to slow the spread of the coronavirus. "Danger of panic still far exceeds danger of corona," Musk tweeted on Monday.

Earlier this week, Tesla claimed that it fell under a federal category of "national critical infrastructure" and hence was free to continue operating under federal law—even as automakers in Detroit announced they were suspending operations.

Operating the Fremont factory for an extra week gives Tesla time to make a few thousand extra vehicles. It's also an extra week when coronavirus could spread among Tesla employees—though no coronavirus-afflicted workers have been identified so far.

Tesla says that it will also suspend operations at its solar panel factory in New York. Tesla's battery factory in Nevada, dubbed the "Gigafactory," will continue operating, Tesla says.

It will be costly for Tesla to have its Fremont factory sit idle while its workers shelter in place. Luckily, Tesla says, it had $6.3 billion in the bank at the start of the year—before the company raised another $2.3 billion from capital markets. That should be enough cash to keep Tesla in business even if the coronavirus forces it to leave its factory idle for months.