Citigroup lost a legal fight to retrieve $500 million it wrongly paid out to lenders of Revlon, after the mortifying faux pas forced the banking institution to answer to regulators and re-examine its internal controls, multiple news reports said.

U.S. District Judge Jesse Furman ruled in favor of 10 investment advisory companies that were collectively paid over half-a-billion dollars in mistaken wire transfers from Citigroup on Aug. 11, a Tuesday court filing showed.

Citi, the loans administrative agent, meant to wire around $8 million in interest payments to the lenders. Instead, Citibank inadvertently wired nearly 100 times that amount, including $175 million, to a hedge fund.

Citi quickly realized the blunder but was rejected the followingday by the lenders. In all, Citi accidentally sent $900 millionto the cosmetic company's lenders.

Revlon, which was not directly involved in the legal proceeding, narrowly avoided a bankruptcy filing last year.

The 10 asset managers for the lenders include HPS Investment Partners, Symphony Asset Management and Brigade Capital Management.

Shares of Citigroup inched up 0.7% lateTuesday in the U.S., pushing the stock's one-year advance to around 6.5%.

"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 almost $1 billion, would have been borderline irrational," CNN quoted the court document as saying.

The ruling follows what the judge called "one of the biggest blunders in banking history." Some lenders had reportedly returned part of the overpayment.

Citigroup spokesperson Danielle Romero-Apsilos strongly disagrees with the court's decision. "We believe we are entitled to the funds and will continue to pursue a complete recovery of them." She said they will make an appeal.

Furman said the assumption of lenders about repayment made sense considering that Revlon was known to be under financial pressure because of the ongoing global health crisis.

He said prior court rulings forced him to conclude that the lenders were entitled to take the money. "They can keep the money, pending an appeal, but they can't spend it," he said.

Furman said New York's top court adopted a "discharge for value" policy nearly three decades ago, making it clear that banks making wire transfers to creditors should bear the risk of loss in case of a mistake.