Companies that are sued in class actions often face two options, neither of which is pleasant: pay money to settle a baseless lawsuit or continue fighting until the court acknowledges the flaws in the case and dismisses it. First American Home Buyers Protection Company recently chose the fight option and won—but only after a years-long battle.

In the case, Carrera v. First American Home Buyers Protection Company, an insured alleged that her home-warranty company had violated California law by the way it solicited and administered its contracts. According to Carrera, First American concealed material information about how it provides coverage. That information supposedly would have revealed that the company replaces defective appliances at a very low rate (and instead nearly always repairs them, which is generally less expensive), that it incentivizes contractors to cut corners, and that it supposedly pays kickbacks to real estate agents for signing up customers. The parties litigated those claims for nearly four years, going up on appeal and back down again during that time. The trial court eventually denied the plaintiffs’ motion for class certification. The presiding appellate court, the Ninth Circuit Court of Appeals, then agreed to review that order. Given that the Ninth Circuit is arguably the most consumer-friendly jurisdiction in the country, everyone thought that the plaintiffs would again prevail on appeal.

That turned out not to be the case. The Ninth Circuit affirmed the lower court’s order denying the plaintiffs’ motion for class certification. The main problem, the Ninth Circuit noted, was that the plaintiffs had to show that all class members had some exposure to allegedly fraudulent misrepresentations. Since the plaintiffs could not do that on a classwide basis, the order denying class certification was not an abuse of discretion, the appellate court held.

Although this is the correct outcome, it is nonetheless surprising coming from the Ninth Circuit. Class-certification standards reflect some degree of vagueness, and many tribunals that have a result-oriented mindset will allow faulty cases to proceed for years, until the defects can no longer be ignored. In the end, this decisive victory was a smart move for First American because it serves as a strong deterrent to would-be plaintiffs.