The Justice Department announced Wednesday it will no longer allow prosecutors to strike settlement agreements with big companies directing them to make payouts to outside groups, ending an Obama-era practice that Republicans decried as a “slush fund” that padded the accounts of liberal interest groups.

In a memo sent to 94 U.S. attorneys' offices early Wednesday, Attorney General Jeff Sessions said he would end the practice that allowed companies to meet settlement burdens by giving money to groups that were neither victims nor parties to the case.

Sessions said the money should, instead, go to the Treasury Department or victims.

“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.

Conservatives have long fought the policy introduced under the Obama administration. Earlier this year, Republican lawmakers introduced legislation that would prohibit the Department of Justice from requiring defendants to donate money to outside groups, after concerns that the settlements bypass congressional appropriations processes.

“This bill is oversight and action. Congress must not tolerate Justice Department political appointees using settlements to funnel money to their liberal friends,” Chairman of the House Judiciary Committee Bob Goodlatte, R-Va., who introduced the bill, said in a statement. “This is also an institutional issue. Once direct victims have been compensated, deciding what to do with additional funds recovered from defendants becomes a policy question properly decided by elected representatives in Congress, not agency bureaucrats or prosecutors.”

Paul Larkin, a senior legal research fellow at The Federalist Society, described the practice as “improper and unlawful.” He also said the practices were barred by the Appropriations Clause, Antideficiency Act, and the Miscellaneous Receipts Act.

“No private lawyer could give away a client’s settlement money, and no government lawyer may do so either. It is time for this unlawful practice to end,” Larkin wrote in 2016.

“No private lawyer could give away a client’s settlement money, and no government lawyer may do so either. It is time for this unlawful practice to end.”

— Paul Larkin, The Federalist Society

Officials told Fox News the third-party settlement changes were an issue of "good governance."

“Unfortunately, in recent years the Department of Justice has sometimes requires or encouraged defendants to make these payments to third parties as a condition of settlement,” Sessions added. “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.”

Bank of America, for example, was required to pay nonprofit organizations as part of a record $17 billion settlement to resolve an investigation into its role in the sale of mortgage-backed securities before the 2008 financial crisis. The agreement was struck under then-Attorney General Eric Holder’s Justice Department.

The receiving groups included organizations that provide housing counseling, foreclosure prevention and community redevelopment assistance.

Gibson Guitar Corp. also had to contribute to the National Fish and Wildlife Foundation to resolve a criminal investigation into allegations it illegally imported exotic wood.

It's hard to say what kind of cases could be impacted by the change and how. The new policy allows only for restitution to victims or payment that "directly remedies the harm that is sought to be addressed."

U.S. Chamber of Commerce Institute for Legal Reform President Lisa A. Rickard commended Sessions' decision for directing DOJ officials to "seek justice" in a manner "consistent with public interest," adding: "Not how much money they can generate for outside interest groups unconnected with the underlying enforcement action."

Chairman of House Judiciary Committee Chuck Grassley, R-Iowa, also applauded the move.

"Since 2010, I've been working to shine a light on these misdeeds and to get answers from the Department," Grassley said. "Today's announcement is welcomed news for those of us who respect the rule of law and demand a more accountable government."

Fox News' Jake Gibson and Brooke Singman and The Associated Press contributed to this report.