REPORTS OF the death of class-action lawsuits are greatly exaggerated.

Yes, a unanimous Supreme Court on Monday blocked a mammoth case against Wal-Mart Stores, in which lawyers claimed to represent roughly 1.5 million former and current female employees suing the retailer for alleged sex discrimination. All nine justices gave Wal-Mart and other corporate defendants a victory by ruling that they must be allowed to beat back individual monetary claims and not be bound by statistical models pushed by the plaintiffs. In an opinion joined by five justices, the court adopted standards that will make it harder for plaintiffs to prevail.

But these changes are largely sensible and likely to lead to some welcome developments, including smaller (although not necessarily small) and more cohesive class-action suits.

The federal rules that govern class actions require members of the class to share “questions of law or fact”; they also require that “the representative parties will fairly and adequately protect the interests of the class.” It was always hard to imagine how the disparate group of Wal-Mart employees could meet that test. As Justice Antonin Scalia reiterated in the majority opinion, the Wal-Mart employees “held a multitude of different jobs, at different levels of Wal-Mart’s hierarchy, for variable lengths of time, in 3,400 stores, sprinkled across 50 states, with a kaleidoscope of supervisors (male and female), subject to a variety of regional policies that all differed.”

The women had argued that the unifying factor in all of their cases was Wal-Mart’s policy of allowing managers almost complete discretion in hiring and promotion decisions; that discretion, the women argued, led to discriminatory abuses. But if this discretion is nearly absolute, how could the company itself be accountable for an allegedly discriminatory nationwide policy?

The class’s attempt to prove discrimination through statistical analysis was also problematic. Of the 120 or so affidavits submitted by women alleging to have been wronged, more than half came from six states; there were no claims of wrongdoing in 14 states where employees would nevertheless be included in the class action. In the future, class members will have to show a stronger link between the harm they say they have experienced and the purportedly discriminatory policies of the employer.

Justice Ruth Bader Ginsburg, writing for the four more liberal justices, argued that the women’s statistical and anecdotal case was stronger than her conservative colleagues allowed. She would have permitted a lower court judge to determine whether the women’s case could proceed under a different part of the class-action statute.

That may yet be possible. The court did not foreclose a smaller and better-defined class action against Wal-Mart. Individual women may also bring cases, though for many the costs could be prohibitive. Class actions may no longer be the blunt instruments they once were, but they can and should remain an important, more focused tool that gives workers the strength in numbers often needed to combat discrimination.