WASHINGTON (Reuters) - The Supreme Court ruled for Wal-Mart Stores Inc on Monday in the largest sex-discrimination lawsuit in history, saying class-action status for female employees seeking billions of dollars had been improperly granted.

The justices overturned a U.S. appeals court ruling that more than a million female employees nationwide could join in the lawsuit accusing Wal-Mart of paying women less and giving them fewer promotions.

The Supreme Court agreed with Wal-Mart that the class-action certification violated federal rules for such lawsuits.

The high court accepted Wal-Mart's main argument that the female employees in different jobs at 3,400 different stores nationwide and with different supervisors do not have enough in common to be lumped together in a single class-action lawsuit.

The Supreme Court only decided whether the 10-year-old lawsuit can proceed to trial as a group, not the merits of the sex-discrimination allegations at the heart of the case.

Wal-Mart, the world's largest retailer and the largest private U.S. employer, has denied the allegations and said it has operated under a policy barring discrimination.

The ruling in the biggest business case of the high court's 2010-11 term could affect other class-action lawsuits against the tobacco industry and Costco Wholesale Corp. It also was the court's most important job-discrimination dispute in more than a decade.

Justice Antonin Scalia concluded for the court majority that the class was not properly certified.

He said there must be significant proof that Wal-Mart operated under a general policy of discrimination. "That is entirely absent here," he said, noting that Wal-Mart's official corporate policies forbid sex discrimination.

Wal-Mart shares rose after news of the decision, rising 46 cents, almost 1 percent, to $53.28 in morning trading on the New York Stock Exchange.

The court's four other conservatives joined all of Scalia's ruling. The court's four liberals joined part of it, but dissented in part.

(Reporting by James Vicini)