Workers at Tesla Inc.’s California vehicle factory are deemed essential and are not impacted by the state’s latest restrictions to curb a new surge in coronavirus infections, the California health department said on Friday.

Tesla and local California officials in March engaged in a heated months-long standoff over restrictions imposed to curb the first wave of infections, which culminated in the company’s chief executive, Elon Musk, defying health orders, suing local officials and threatening to leave the state.

California’s governor on Thursday imposed a curfew on social gatherings and other nonessential activities.

Beginning on Saturday, the stay-at-home order prohibits non-essential business from 10 p.m. until 5 a.m. each day and applies in the majority of the state’s counties, including Alameda County, where Tesla’s factory is located.

Asked whether the order applied to workers at Tesla’s Fremont factory, the California Department of Public Health in a statement said it did not apply to employees deemed essential workers, with manufacturing listed as an essential workforce.

“The Critical Manufacturing Sector identifies several industries to serve as the core of the sector including Transportation Equipment Manufacturing Products,” the office said.

CNBC first reported on the health department’s policies.

Under California law, local counties can impose more restrictive measures than mandated by the state. Alameda County on Friday did not immediately respond to a request for comment.

In a statement on Monday the county’s health department said it was following state guidance, but may act to restrict activities beyond the state’s requirements.

During the initial virus outbreak in March, local officials ordered Tesla to halt production and Tesla’s factory remained shut down for roughly six weeks. Billionaire Musk in early May defied county orders by reopening the factory, telling county officials he stood ready for arrest.