NEW YORK/WASHINGTON (Reuters) - The U.S. Justice Department on Wednesday said it is barring legal settlements in federal investigations that include donating funds to community organizations or other third-party groups, rather than paying those directly harmed by the wrongdoing or involved in the cases. U.S. Attorney General Jeff Sessions said in a statement that settlement payments must be directed to victims impacted by the defendants’ actions and then to the federal government.  The change could impact banks and other corporations, and marks the latest action by the Republican Trump administration to end policies from the previous Democratic Obama administration. Such agreements were a feature of several U.S. settlements with banks following the 2008 financial crisis. Under former President Barack Obama, the Justice Department aimed to hold banks accountable for shoddy securities that contributed to the U.S. housing market collapse. From 2013 to 2016, the department reached $46 billion in settlements with U.S. banks that in part directed funds to approved housing aid and other related groups. In Obama’s final weeks in office, the department sued Barclays PLC (BARC.L) over similar claims. “In recent years the Department of Justice has sometimes required or encouraged defendants to make these payments to third parties as a condition of settlement,” Sessions said a statement. “We are ending this practice and ensuring that settlement funds are only used to compensate victims, redress harm, and punish and deter unlawful conduct.” The change could impact banks still under federal investigation over mortgage issues such as Credit Suisse Group AG (CSGN.S), Royal Bank of Scotland Group PLC (RBS.L), Wells Fargo & Co (WFC.N), UBS Group AG (UBSG.S) and HSBC (HSBA.L). Representatives for the banks could not be immediately reached.     Sessions, in a one-page memo dated Monday, told the nation’s 94 U.S. attorneys they could not make any agreements in civil or criminal cases “that directs or provides for a payment or loan to any non-governmental person or entity that is not a party to the dispute.” Sessions’ new policy “is ill-advised and ignores the tens of thousands of families who were helped by housing service providers across the country in the wake of the financial crisis,” said Amy Spitalnick, a spokeswoman for New York Attorney General Eric Schneiderman. Schneiderman was co-chair of a working group that investigated misconduct in the pooling and sale of mortgage securities in the run-up to the financial crisis. Sessions cited three exceptions to the new policy: payments or loans that directly aim to address harm such as to the environment or official corruption; legal or other professional services from the case; and restitution, forfeiture and other payments required by law. While the policy affects future deals, it would have impacted cases like the Environmental Protection Agency’s diesel emissions settlement with Volkswagen AG (VOWG_p.DE) that required the German automaker to invest $2 billion in zero-emission vehicle efforts over 10 years. Eric Schaeffer, executive director of the Environmental Integrity Project and a former EPA civil enforcement director, said the new ban could prevent a similar settlement after the Justice Department sued Fiat Chrysler Automobiles NV (FCHA.MI) last month over excess diesel emissions. The memo could ensure “violators won’t be required to support development of low emission vehicles to compensate for illegal pollution from the dirty engines they designed,” he said. The change could still affect a proposed $12 million Justice Department settlement with Harley-Davidson Inc (HOG.N) that was announced in August but not finalized that includes $3 million to reduce air pollution through a project to replace conventional woodstoves.    