SAN DIEGO — California’s attorney general has told the owners of two San Diego strip clubs to follow orders because he said they are violating the state’s new stay-at-home policy, which bars social gatherings in an effort to limit the spread of the coronavirus.

In a letter sent Friday to Midway Ventures LLC and F-12 Entertainment Group, the owners of Pacers Showgirls International and Cheetahs Gentlemen’s Club, respectively, Xavier Becerra said the clubs must change their policies because they are in violation of the order, issued Dec. 6, that covers Southern California.

“Specifically, the Regional Stay at Home Order requires that restaurants, including your clients’ restaurants, may continue to operate for carry-out and delivery services but may not offer indoor or outdoor dining or other services that cause people from different households to come into contact for extended periods of time and thereby increase the risk of transmission of COVID-19,” Becerra said.

“Therefore, MIDWAY AND F-12 are hereby ordered to cease and desist from operating in violation of the Regional Stay at Home Order.”

Becerra said the state will pursue legal action if the companies don’t comply. The clubs could not immediately be reached for comment.

The clubs sued the county in October after officials ordered them to close, saying live entertainment was not allowed under the public health order.

A judge issued a preliminary injunction Nov. 6, protecting the establishments from enforcement actions by state and local officials, though the businesses must still adhere to a 10 p.m. curfew and close early.

San Diego Superior Court Judge Joel R. Wohlfeil sided with the clubs, saying adult live entertainment is “constitutionally protected speech” and said the harm would be greater to the businesses than to the government.

That argument set the strip clubs apart from restaurants or gyms, whose pleas to allow indoor activity was rejected by another San Diego judge last month when the county moved into the state’s most restrictive tier because of spiraling coronavirus cases.