Western Union Co (wu), the world’s biggest money-transfer company, agreed to pay $586 million and admitted to turning a blind eye as criminals used its service for money laundering and fraud, U.S. authorities said on Thursday.
Western Union, which has over half a million locations in more than 200 countries, admitted “to aiding and abetting wire fraud” by allowing scammers to process transactions, even when the company realized its agents were helping scammers avoid detection, the U.S. Department of Justice and the Federal Trade Commission said in statements.
With the help of Western Union agents, Chinese immigrants used the service to send hundreds of millions of dollars to pay human smugglers, wiring the money in smaller increments to avoid federal reporting requirements, U.S. authorities said.
Fraudsters offering fake prizes and job opportunities swindled tens of thousands of U.S. consumers, giving Western Union agents a cut in return for processing the payments, authorities said.
Between 2004 and 2012, the Colorado-based company knew of fraudulent transactions but failed to take steps that would have resulted in disciplining of 2,000 agents, authorities said.
“Western Union is now paying the price for placing profits ahead of its own customers,” said Acting Assistant Attorney General David Bitkower.
A Western Union spokesman said that the company didn’t “do as much as it should have” to oversee its agents between 2004 and 2012 but is committed to improving its procedures.
Western Union, which helped clients move over $150 billion in 2015, said in a press release that more than one-fifth of its work force is currently devoted to compliance. It also said consumer fraud accounts for less than one-tenth of 1 percent of consumer-to-consumer transactions.
For more on scammers, watch Fortune’s video:
The settlement will fund refunds for customers who were victims of scams, authorities said. It will also implement a comprehensive anti-fraud program to train agents to identify and stop transactions that result from fraud.
Between 2004 and 2015 Western Union collected 550,928 complaints about fraud, with 80 percent of them coming from the United States where it has some 50,000 locations, the government complaint said. The average consumer complaint was for $1,148, the government said.
Western Union reported revenues of $1.4 billion for the quarter that ended on September 30, 2016, according to a government filing. The company said it spent some $200 million a year on compliance.