U.S. Attorney General Jeff Sessions speaks at the opening session of the National Law Enforcement Conference on Human Exploitation at the Sheraton Atlanta Hotel in Atlanta. (Bob Andres/AP)

Attorney General Jeff Sessions is reversing an Obama administration practice that encouraged and sometimes required banks and other companies to donate large amounts of money to outside groups as part of settlement agreements with the federal government.

In the Obama administration, the Justice Department negotiated settlements, especially with large banks in connection with the residential mortgage-backed securities crisis, that required the settling parties to pay funds to third-party community organizations, such as the National Council of La Raza, Habitat for Humanity and the National Urban League.

“These third-party organizations were neither victims nor parties to the lawsuits,” Sessions said in a memo sent Wednesday to senior Justice Department officials and U.S. attorney’s offices. Sessions said that, effective immediately, settlement payments to nongovernmental third parties, such as advocacy or housing groups, are prohibited.

“When the federal government settles a case against a corporate wrongdoer, any settlement funds should go first to the victims and then to the American people — not to bankroll third-party special interest groups or the political friends of whoever is in power,” Sessions said in a statement.

“Unfortunately, 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. “With this directive, 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 Obama administration’s third-party settlement practice had been criticized by Republican commentators and lawmakers, who have referred to it as a “slush fund.” In January, House Judiciary Committee Chairman Bob Goodlatte (R-Va.) introduced legislation to prohibit the Justice Department and other federal agencies from requiring defendants to donate money to third-party groups as part of a settlement.

In 2013, the Department of Justice reached settlements with several banks, ranging from $7 billion (Citigroup) to $16.65 billion (Bank of America) related to the selling of residential mortgage-backed securities. As part of those settlements, the department required banks to pay approximately $3 billion to third-party groups, such as NeighborWorks and state legal aid organizations, according to Justice officials.

In 2015, the Justice Department settled claims with JPMorgan Chase related to robo-signing practices and required JPMorgan to pay $7.5 million to the American Bankruptcy Institute’s endowment for financial education, Justice officials said.

And in 2016, as part of a civil settlement, the Justice Department required Volkswagen to invest $2 billion to fund zero-emission technology and infrastructure and to promote zero-emission vehicles — funding that would not be allowed under the new policy.

Under Sessions’s policy, settlement funds will go to the U.S. Treasury. An exception to the policy are payments that directly remedy the harm addressed in the settlement, including harm to the environment or from official corruption, according to the memo. The policy also does not apply to payments for legal or other professional services in connection with the case and to payments that provide restitution to a victim.