SEATTLE — California Attorney General Xavier Becerra filed suit against Amazon on Monday, accusing the e-commerce giant of months of foot-dragging as the state seeks information about the outbreak of coronavirus cases and safety measures at warehouses in the state.

Becerra has pressed Amazon since May to provide information about the number of warehouse workers who have contracted the virus as well as information about steps the company has taken to protect those employees, according to the lawsuit.

But the state has received only cursory replies, the lawsuit alleges. Becerra, whom President-elect Joe Biden has chosen to lead the Department of Health and Human Services, claims that Amazon’s obstinacy is preventing the state from protecting its citizens.

“If the Attorney General is to meaningfully take steps to try and quell the rampant and lethal wildfire-like spread of SARS-CoV-2 among California workers, he requires more than the limited data produced and broad assurances that Amazon is complying with its own internal policies and procedures,” the suit, filed in Sacramento County Superior Court, says.

Amazon has been working with Becerra’s office and has taken steps to protect workers, such as providing them with personal protective equipment, spokeswoman Jodi Seth said in an emailed statement.

“We’re puzzled by the attorney general’s sudden rush to court, because we’ve been working cooperatively for months and their claims of noncompliance with their demands don’t line up with the facts,” Seth said. She didn’t respond to additional questions.

(Amazon chief executive Jeff Bezos owns The Washington Post.)

Becerra’s office began investigating conditions at Amazon’s warehouses and sent the company an email with questions on May 11, seeking a response by May 22, according to the suit. When the attorney general didn’t receive a timely response, his office pressed the company only to be told on May 28 that the original “letter had been lost internally.”

The suit details months of back-and-forth with the attorney general seeking detailed responses to questions about the number of workers who contracted the virus, the location of those workers and the steps the company took to notify co-workers, among other queries.

Media reported employees dying of covid-19 who worked at Amazon facilities in Irvine, Tracy and Hawthorne, but Amazon made no mention of the deaths “despite the Attorney General’s specific request for information for all confirmed and suspected COVID-19 cases,” the suit alleges.

After not receiving answers he deemed adequate, Becerra issued subpoenas in August to compel the company to provide the information. Monday’s filing asks a judge to order Amazon to comply.

The suit comes as Amazon’s sales have jumped, fueled by a surge in e-commerce from shoppers nervous about heading to stores during the pandemic. Amazon’s fulfillment business, though, clogged in the first several months of the pandemic, overwhelmed by the rapid spike in business. Its warehouse workers in the United States and abroad sounded alarms about fears that Amazon wasn’t doing enough to protect them.