New York’s attorney-general has sued Amazon over claims it failed to protect its employees adequately during the coronavirus pandemic, days after the ecommerce giant accused her of overstepping her authority.

In court documents filed in state court on Tuesday, Letitia James sued Amazon over alleged failings in handling safety at two facilities in the state. The suit also accused the company of illegally dismissing an employee for publicly raising concerns about conditions.

“Throughout the historic pandemic, Amazon has repeatedly and persistently failed to comply with its obligation to institute reasonable and adequate measures to protect its workers from the spread of the virus,” the filing reads.

The action comes just four days after Amazon attempted to block James’s case with a pre-emptive lawsuit that argued the attorney-general lacked the legal power to intervene on issues of worker safety, instead suggesting it was a matter for the federal courts.

The case reflects a bitter mood among many elected officials in the US that Amazon’s pandemic success — which has seen its stock rise more than 50 per cent in the past 12 months — has come off the backs of low-paid workers, and served to further entrench Amazon’s position in ecommerce.

“We care deeply about the health and safety of our employees, as demonstrated in our filing last week,” Amazon said in a statement provided to Reuters. “We don’t believe the attorney-general’s filing presents an accurate picture of Amazon’s industry-leading response to the pandemic.”

In her filing, the attorney-general, long an outspoken critic of Amazon, accused the company of failing to comply with Covid-19 protocols, such as thorough sterilisation and ventilation in areas where infected workers had been stationed.

James alleged Amazon’s process of notifying workers about infections among their colleagues was “legally deficient” and lacked adequate contact tracing in order to reduce spread. At the same time, the filing alleged, Amazon neglected to adjust its productivity requirements to ensure sufficient time for breaks was possible while social distancing.

“Amazon has cut corners in complying with the particular requirements that would most jeopardise its sales volume and productivity rates,” the filing read. “Thereby ensuring outsize profits at an unprecedented rate of growth for the company and its shareholders.”

The lawsuit deals specifically with two major facilities in New York state: JFK8, a fulfilment centre on Staten Island, and DBK1, a distribution centre in the borough for Queens. After a small demonstration was held at JFK8 in late March last year, employee Christian Smalls, a process assistant at the facility, was fired by Amazon.

The suit alleges it was in retaliation for his involvement in the protest and posts on social media. Amazon said it was due to breaches of social-distancing guidelines, noting that Smalls had been told by bosses to quarantine after coming into contact with a worker who later tested positive for coronavirus.

Later, in an internal memo obtained by Vice News, Smalls was described by Amazon general counsel David Zapolsky as “not smart or articulate” and could be made “the most interesting part of the story, and if possible make him the face of the entire union/organising movement”. Zapolsky told Vice his comments had been “personal and emotional”.

In its filing last week, Amazon said it had gone “well beyond measures” that had been required of it, a fact it said was confirmed after an “unannounced” inspection at JFK8 on March 30, carried out by the New York City Sheriff’s Office. It was said to have concluded there “were absolutely no areas of concern”.

The lawsuit seeks changes to Amazon’s protective measures, as well as reinstatement, back pay and damages for Smalls.