Tesla recently rolled its millionth electric car off the assembly line.

Now, it must shut down its famous Fremont factory, the centerpiece of the electric car maker’s global operations. After some confusion, the Alameda County Sheriff’s Department said Tuesday the car plant was not “essential,” and like most other businesses must shut down under the county’s shelter-in-place order which took effect Tuesday.

The move under the health order, imposed to slow the spread of the coronavirus, will send most of the factory’s 10,000 workers home.

“Tesla can maintain minimum basic operations per the Alameda County Health Order,” the sheriff’s department said on Twitter.

Only essential businesses like grocery stores and pharmacies may stay open, and there is no broad exemption for automakers or other manufacturers in the text of the orders issued Monday, which took effect at 12:01 a.m. Tuesday.

Under the order, businesses deemed nonessential can continue to perform the “minimum necessary activities to maintain the value of the business’s inventory, ensure security, process payroll and employee benefits, or for related functions,” as well as the “minimum necessary activities to facilitate employees of the business being able to continue to work remotely from their residences.”

Social distancing — the maintenance of a six-foot separation between workers — must be observed, according to the order.

The Fremont Police Department and Alameda County Public Health Department, the agencies most directly responsible for enforcing the order at the plant, could not be reached for comment.

Tesla did not immediately respond to emails seeking comment.

CEO Elon Musk told employees in an email Monday night that if they feel even slightly ill that they should not come to work. He said he would be coming to work and downplayed the danger of the virus compared with the panic around it, however, and expressed doubt it will infect a significant number of people in the U.S.

“if we over-allocate medical resources to (the) corona(virus), it will come at expense of treating other illnesses,” Musk said on Twitter Monday.

In an email obtained by The Chronicle, Justin Kirkland, a plant manager, wrote to some Tesla employees at the Fremont plant Monday night that they should report to work until they hear otherwise from the company.

Another email sent to a Tesla employee instructs employees who are following the shelter in place order to take paid vacation days for days they do not show up to work and to contact human resources if they run out of those days.

Chase DiFeliciantonio is a San Francisco Chronicle staff writer. Email: chase.difeliciantonio@sfchronicle.com Twitter: @ChaseDiFelice