Technology giant IBM scored a victory over Queensland government in a long legal battle over a failed payroll system it instituted in the Health department. IBM will have to be paid off and it will cost the taxpayers $1.2 billion.

The said payroll system had been plagued by delays and cost overruns and failed to go live until 2010. It was one of the worst public administration failures in Australia’s history.

The problem caused thousands of staff being left either unpaid or paid incorrectly.  The Newman government of Liberal Party launched legal action against IBM in 2013, accusing the company of misleading it on its capability to deliver the $6 million contract on time and within budget, reports The ABC.

Later the Palaszczuk Government decided to follow it up, despite calling it a waste of money in the past.

IBM went on to challenge the lawsuit of the government and argued that a 2010 agreement made it immune from entertaining any damages claim.

In December 2015, the Supreme Court ruled in favour of IBM, supporting that argument. Finally, on Thursday, Justice Glenn Martin dismissed the case after the Queensland Government agreed to pay all costs incurred by IBM.

Many technocrats had blamed the failed system partly on the fault of public servants who could not manage it properly.

The turning point for IBM was Judge Glenn Martin agreeing to a legal waiver that had given IBM the right to demand costs on an “indemnity basis” –above the default “standard basis.”

The Queensland government estimated that the full cost of the failed Health payroll was in the vicinity of $1.25 billion.

However, Justice Martin refrained from making a final ruling on costs presented in the government’s original pre-appeal case, reports IT News.

The state government also got a reprieve when the judge said he saw “no reason why that matter should not be dismissed” while agreeing to hear arguments from both parties before pronouncing a decision.