Attorney General Jeff Sessions has ended an Obama-era Justice Department policy that required companies and banks to donate a portion of settlement funds to charities or other outside organizations.

In a June 5 memo sent to all Justice Department component heads and U.S. attorneys, Sessions said DOJ attorneys may no longer enter settlement agreements on behalf of the nation that direct or provide “for a payment or loan to any non-governmental person or entity that is not a party to the dispute.” That includes civil litigation settlements, plea agreements and other agreements in which DOJ defers or declines prosecution in criminal matters.

“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 written statement released Wednesday. “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. 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 policy is effective immediately, and applies when the government is both the plaintiff and defendant. The use of third-party settlements in the Obama administration was largely criticized by Republicans in Congress, who say it creates “slush funds” that are used by special-interest groups instead of directly paying victims. Several hearings were held in 2014 and 2015 on the issue, and House Judiciary Chairman Bob Goodlatte introduced a bill earlier this year to bar DOJ and other government agencies from requiring defendants to donate money to outside groups.

The U.S. Chamber of Commerce called for the passage of Goodlatte's bill Wednesday in praising Session's memo.

“We commend Attorney General Sessions for directing Department of Justice officials to seek justice in a manner consistent with the public interest, not how much money they can generate for outside interest groups unconnected with the underlying enforcement action,” said chamber President Lisa Rickard in a blog post.

Just last month, a federal appellate judge decried the use of a provision in a class action discrimination settlement with the government to donate leftover funds to outside groups that help Native American farmers. Those types of agreements, referred to as “cy pres” provisions, are prohibited by Sessions' memo. The funds in that case, totaling more than $200 million, should be returned to the Treasury, D.C. Circuit Judge Janice Rogers Brown wrote in a dissenting opinion.

The new policy does not apply to payments for legal or other professional services or payments that provide restitution as expressly authorized by a certain law. It also makes an exception for payments to directly remedy “the harm that is sought to be redressed,” such as “harm to the environment or from official corruption,” the memo said.

Under Obama, DOJ used the practice several times in settlements with banks following the 2008 financial crisis. That included a $16.65 billion settlement with Bank of America in 2014, in which the bank was required to donate millions to housing nonprofits and other community development organizations.

The practice was also employed recently in DOJ's civil settlement with Volkswagen over its emissions cheating scandal. That agreement required VW to direct $2 billion “toward improving infrastructure, access and education to support and advance zero emission vehicles.” The company was sentenced for criminal violations in April.