An appeals court has ruled that International Business Machines botched an assignment to privatize Indiana’s welfare benefits system, putting the computing giant on the hook for as much as $177 million in damages. The ruling is a major reversal of fortune for the state and its lawyers at Barnes & Thornburg, who were up against high-powered opponents at Kirkland & Ellis.

Overturning a trial judge, the Indiana Court of Appeals ruled on Thursday that IBM didn’t hold up its end of a 10-year, $1.3 billion contract with the state. The appeals court remanded the case for a hearing on damages. The state is seeking $177 million.