IBM could face a $120m bill after losing its case against the US state of Indiana over a botched government project.

A ruling [PDF] from the Indiana State Supreme Court this week sided with the government in finding Big Blue in breach of contract following the failed launch of a web portal.

Each side had filed against the other for breach of contract after the state terminated a $1.3bn Master Services Agreement (MSA) contract with Big Blue to build a new website for its Family and Social Services Administration's welfare eligibility system.

The project, launched in 2006, sought to create an internet home for Indiana residents to check eligibility and apply for welfare benefits online or through a call center.

Following a series of setbacks and missed goals, including problems stemming from a series of floods in Indiana, the state opted to terminate the contract in 2009, citing issues including "excessive wait times at local offices and for appointments, incorrectly categorized imaged documents, high staff turnover, inaccurate and incomplete data gathering, scheduling problems, clients not receiving mailed correspondence, poor communication to all staff, unresolved help-ticket requests and untimely application and redetermination processing times for various welfare programs."

In 2010 both sides filed suit seeking damages, each accusing the other of failing to hold up their end of the contract.

A district court found in favor of IBM, but that decision was reversed by an appeals court before arriving at the state's supreme court, which this week upheld the appeals court decision, but also allowed IBM to collect $50m in damages while leaving a lower court to decide how much of Indiana's $170m damages claim will be levied against Big Blue. And breathe.

IBM made a $13.19bn profit in 2015.

"Because IBM failed to perform satisfactorily as determined by the State (and by its own admission), consistently failed to meet certain timeliness metrics, and failed to assist the State in achieving its Policy Objectives, we hold that IBM did materially breach the MSA through its collective breaches in light of the MSA as a whole," the court said in issuing its decision.

IBM did not respond to a request for comment on the ruling. ®