New York’s attorney general, Letitia James, sued Amazon on Tuesday evening, arguing that the company provided inadequate safety protection for workers in New York City during the pandemic and retaliated against employees who raised concerns over the conditions.

The case focuses on two Amazon facilities: a large warehouse on Staten Island and a delivery depot in Queens. Ms. James argues that Amazon failed to properly clean its buildings, conducted inadequate contact tracing for known Covid-19 cases, and “took swift retaliatory action” to silence complaints from workers.

“Amazon’s extreme profits and exponential growth rate came at the expense of the lives, health and safety of its frontline workers,” Ms. James argued in the complaint, filed in New York Supreme Court.

Kelly Nantel, a spokeswoman for Amazon, said the company cared “deeply about the health and safety” of its workers.