The state Attorney General’s lawsuit against Amazon -- over allegations of unsafe working conditions at two New York City facilities during the pandemic -- can stay in state court instead of being moved to federal court, a federal judge ruled Friday.

The ruling by U.S. District Judge Jed Rakoff is a setback for Amazon’s defense that argued federal, not state, law should apply for workplace safety cases, Reuters reported.

“As we have contended all along, Amazon has forced its employees to work in unsafe conditions throughout this pandemic, in violation of New York state labor laws. We are pleased with today’s decision to allow this case to be heard in state court, where it belongs. We look forward to making our case and continuing our work to protect workers,” said New York Attorney General Letitia James in a statement Friday.

A request for comment to Amazon was not immediately answered Saturday.

In February, James filed a lawsuit against Amazon over allegations the company failed to provide adequate safety measures for its New York City employees during the COVID-19 pandemic and retaliated against whistleblowers who complained.

READ MORE: Amazon's Plan To Smear And Silence A Fired Worker Failed: "This Country Needs To Wake Up"

James opened an investigation into Amazon in March 2020 after receiving complaints about working conditions at two of the company's facilities -- JFK8, a fulfillment center on Staten Island, and DBK1, a distribution center in Queens. The lawsuit said at least 250 employees at the JFK8 Staten Island center tested positive or were diagnosed with COVID-19, with more than 90 of those employees having been at the facility within seven days of alerting the company of their diagnoses. Yet in the vast majority of cases, Amazon did not close the facility after being notified of sick employees, James said.

Amazon has also sued James, saying that her legal action was based on "threats and unwarranted demands,” the company’s safety measures “far exceed what is required under the law,” and that the federal government, not the state, was the appropriate oversight entity for workplace safety.