A unanimous Supreme Court has overturned a circuit court’s decision throwing out the award of $4.5 million in attorney’s fees to a trucking company, which had won a class action sexual harassment lawsuit brought against it by the Equal Employment Opportunity Commission (EEOC).

The EEOC brought the class action lawsuit against CRST Van Expedited Inc. to district court, alleging female employees had been sexually harassed or assaulted while on the job. The court threw out the lawsuit, however, because the agency never bothered to investigate or to reconcile its claims. The district court then awarded the prevailing party (the trucking company) $4.5 million in attorney’s fees, to be paid by the EEOC.

Upon review, the circuit court threw out the award because the prevailing party had not won on “the merits.” The Supreme Court disagreed, 8-0, and remanded the case back to the lower court.

“In cases like these, significant attorney time and expenditure may have gone into contesting the claim,” Justice Anthony Kennedy wrote in delivering the opinion of the court. “Congress could not have intended to bar defendants from obtaining attorney’s fees in these cases on the basis that, although the litigation was resolved in their favor, they were nonetheless not prevailing parties.”