WASHINGTON - Western Union agreed to pay $586 million to settle allegations that it failed to prevent criminals from using its service for money laundering and fraud, the US Department of Justice said in a statement on Thursday.