In a major blow to Wal-Mart Stores Inc, a sex-discrimination lawsuit against the retailer can proceed as a class-action case covering more than 1 million female employees, a U.S. court ruled on Monday.

Wal-Mart, the world's largest retailer, had asked the Ninth Circuit Court of Appeals in San Francisco to undo class-action certification in what could be the largest sexual discrimination lawsuit in the nation's history.

The lawsuit argues that female workers were paid less and received fewer promotions at Wal-Mart than male counterparts, and that the retailer's corporate structure fostered this gender discrimination.

It's good day, said Brad Seligman, an attorney for the plaintiffs. We've been in the Ninth Circuit for five years. It's been long awaited.

Wal-Mart was not immediately available for a comment.

Paul Secunda, an associate professor of law at Marquette University Law School, called the ruling a huge win for the plaintiffs, and a tremendous loss for Wal-Mart.

Wal-Mart has potentially huge liability, he said. Given the number of employees involved and many years of pay at issue the amount of liability can be many billions of dollars.

The class action will now cover the claims made by women who have worked at Wal-Mart since June 2001, when the lawsuit was filed.

Class-action lawsuits generally make it easier for groups of plaintiffs to sue well-heeled corporations and have led to large payouts by tobacco makers, and oil and food companies in the United States.

Wal-Mart had argued that it would be too unwieldy to bring the case forward as a class action -- a premise the appeals court dismissed.

Although the size of this class action is large, mere size does not render a case unmanageable, the court wrote.

Seligman called Wal-Mart's argument a version of too big to fail.

Other than its size, which is huge, the issues in this case are not remarkable, Seligman said. This is a garden variety, old-school discrimination case. If this was a class of 500 people, no one would be saying anything.

The court said on Monday that it agreed with a lower court's ruling that female workers can bring claims for injunctive and declaratory relief and back pay through a class- action lawsuit.

It ruled that the district court should consider whether to certify the class for claims of punitive damages. It also sent back to the lower court claims of potential plaintiffs who no longer worked for Wal-Mart when the complaint was filed in 1998.

Seligman said those members made up roughly 20 percent of the class.

The suit originated with Wal-Mart worker Betty Dukes who sued for sexual discrimination in 2001 with six other plaintiffs in a class-action lawsuit that extended the case to all women who had worked at the company since 1998.

A trial judge certified the case as a class-action in 2004.

The plaintiffs had been seeking an undetermined amount in lost pay and punitive damages, together with injunctive and declaratory relief, which would require Wal-Mart to rectify the pay and promotion inequities.

Wal-Mart also has argued that establishing a national class was unwarranted because its store managers acted with discretion when promoting workers.

Wal-Mart's shares slid 0.6 percent to $54.20 in afternoon trading.

(Additional reporting by Jonathan Stempel; Editing by Tim Dobbyn and Maureen Bavdek)