Citigroup (C 0.80%) made a huge error last year when it accidentally wired $900 million to several lenders of the cosmetics brand Revlon.

Now, it's really going to have to pay for that mistake.

A U.S. district court in New York recently ruled that 10 asset managers will not have to return more than $500 million they received from Citigroup by mistake, according to Bloomberg.

"We strongly disagree with this decision and intend to appeal," Danielle Romero-Apsilos, a spokesperson for Citigroup, said in a statement. "We believe we are entitled to the funds and will continue to pursue a complete recovery of them."

The inside of a Citibank office.

Image source: Citigroup.

The mess all started last August when Citigroup accidentally wired $900 million to several lenders of Revlon, a mistake the bank would later attribute to a "clerical error" and "out-of-date" software.

Revlon's lenders had loaned the company $1.8 billion in 2016 to help acquire the makeup brand Elizabeth Arden. Citigroup served as the agent for the arrangement.

The $900 million apparently covered money that Revlon owed its lenders, and some of them refused to pay Citigroup back the portion they had received. The bank then sued some of Revlon's lenders, attempting to recoup the funds.

But today, U.S. District Court Judge Jesse Furman ruled that several of the lenders that mistakenly received the funds do not have to pay Citigroup back more than $500 million.

"To believe that Citibank, one of the most sophisticated financial institutions in the world, had made a mistake that had never happened before, to the tune of nearly $1 billion would have been borderline irrational," Furman wrote in his decision, according to Bloomberg.

Citigroup came under fire in 2020 for long-standing deficiencies related to the bank's internal controls over data, compliance, and risk management. 

Regulators hit the bank with a $400 million fine for these deficiencies.

The matter also reportedly forced CEO Michael Corbat to retire sooner than most expected. The bank is already in the process of spending billions to correct these regulatory issues.