FREMONT, Calif. - Tesla CEO Elon Musk confirmed on Twitter Monday that the company has restarted its California factory in violation of local government orders.

In the afternoon tweet, Musk wrote that he would be on the assembly line and asked that he be arrested if authorities take anyone into custody.

State law allows a fine of up to $1,000 a day or up to 90 days in jail for operating in violation of health orders.

The plant in Fremont, which is south of San Francisco, had been closed since March 23 under orders to prevent the spread of coronavirus.

Early Monday, the parking lot was nearly full at the massive plant, which employs 10,000 workers, and semis were driving off loaded with vehicles that may have been produced before the shutdown.

The restart violates orders from the Alameda County Health Department, which has deemed the factory a nonessential business that can't open under restrictions intended to help stop the spread of the coronavirus.

Alameda County Sheriff Sgt. Ray Kelly said Monday that any enforcement of the order would come from Fremont police. Geneva Bosques, Fremont police spokeswoman, said officers would take action at the direction of the county Health Officer. She referred further comment to the Health Department, where the AP left messages seeking comment.

The Health Department said Saturday it was in talks with Tesla to reopen the plant safely.

The restart came two days after Tesla sued the county health department seeking to overturn its order, and Musk threatened to move Tesla's manufacturing operations and headquarters from the state.

Tesla contends in the lawsuit that Alameda County can't be more restrictive than orders from California Gov. Gavin Newsom. The lawsuit says the governor's coronavirus restrictions refer to federal guidelines classifying vehicle manufacturing as essential businesses that are allowed to continue operating.

“Frankly, this is the final straw,” Musk wrote in a now-deleted tweet. “Tesla will now move its HQ and future programs to Texas/Nevada immediately.”

He wrote that whether the company keeps any manufacturing in Fremont depends on how Tesla is treated in the future.

On Monday, Newsom professed not to know if Tesla had reopened. “Not aware (of) the details of that,” he said.

“I have great expectations that we can work through at the county levels,” the governor said about conflicts involving the Fremont plant. He said county health directors are in charge of restrictions and the timing of any resumption of manufacturing.

The Bay Area order currently calls for limited return of business and manufacturing, with health restrictions, starting May 18, the same day as Detroit automakers plan to restart assembly plants.

“We look forward to many, many decades of that relationship” with Tesla, Newsom said.

The governor has repeatedly said that counties can impose restrictions that are more stringent than state orders. Alameda County was among six San Francisco Bay Area counties that were the first in the nation to impose stay-at-home orders in mid-March.

Early in the coronavirus crisis, Newsom praised Musk as the “perfect example” of the private sector assisting the state in the pandemic. His comments came after Musk pledged to provide more than 1,000 ventilators to California hospitals, a fact Newsom repeated often and called a “heroic effort.”

But whether Musk made good on the promise remains in dispute. Several weeks after Newsom was touting the ventilators, the state said it hadn't heard of any being delivered. Musk responded, demanding on Twitter that Newsom correct the record and sharing tweets and screenshots from hospitals and Los Angeles County thanking him for sending supplies.

Musk has been ranting about the stay-home order since the company's April 29 first-quarter earnings were released. He called the restrictions fascist and urged governments to stop taking people's freedom.

Public health experts say stay-home orders have reduced the number of new coronavirus cases nationwide.

The coronavirus causes mild or moderate symptoms for most people. But it has killed nearly 80,000 people in the U.S., with the death toll rising.

The Health Department said Saturday it looks forward to reaching agreement on a plan to reopen “very soon,” but noted that given the sacrifices made to protect public health, “it is our collective responsibility to move through the phases of reopening and loosening the restrictions” in the safest way possible.

Tesla says it has safety procedures to protect workers including increased cleaning, enforcement of social distancing, providing face coverings and gloves where needed, installing barriers between workers when necessary and worker temperature checks at “some locations.”

Despite Musk's threat, it would be costly and difficult to quickly shift production from Fremont to Texas or Nevada. The Fremont facility is Tesla's only U.S. vehicle assembly plant, and the company would lose critical production if it shut down the plant to move equipment.

Musk plans another U.S. factory to increase output, possibly in Texas, and could move production once that plant is up and running.

The lack of production in Fremont is a big financial strain on the company. On a conference call last month, Musk called the closure of Fremont a “serious risk.”

Krisher reported from Detroit. AP Reporters Janie Har and Juliet Williams in San Francisco and Kathleen Ronayne in Sacramento, California, contributed to this report.