The Supreme Court on Monday blocked a massive sex discrimination lawsuit against Wal-Mart on behalf of women who work there.

The court ruled unanimously that the lawsuit against Wal-Mart Stores Inc. cannot proceed as a class action, reversing a decision by the 9th U.S. Circuit Court of Appeals in San Francisco. The lawsuit could have involved up to 1.6 million women, with Wal-Mart facing potentially billions of dollars in damages.