California sued OpenAI on Monday, alleging that the company put the public at risk by failing to provide appropriate safeguards for its artificial intelligence systems.

The 31-page lawsuit, filed in San Francisco Superior Court, says OpenAI’s lax safeguards led to cyberattacks by its A.I. products during testing. The state cited a breach this year in which OpenAI’s agents went rogue and attacked the A.I. start-up Hugging Face’s systems. It said the company’s conduct created a public nuisance and violated a legal prohibition on unfair or fraudulent business practices.

“OpenAI’s failure to adequately secure and monitor the testing of its highly capable and increasingly powerful A.I. models represents a danger to the public that must be remedied,” the state said in the lawsuit.

The suit is the latest challenge to the company, which, along with other technology industry players, has faced scrutiny over efforts to develop A.I. quickly, potentially at the expense of consumer safety. It also comes amid growing concerns about A.I. systems behaving unexpectedly.

In recent months, A.I. systems made by OpenAI, Anthropic and Google have broken out of testing environments intended to prevent them from launching cyberattacks on companies and governments. Courts must still determine how legal liability applies in such cases, as calls grow for developers of powerful A.I. systems to be held responsible when those systems behave unexpectedly.