Global accounting giant KPMG has agreed to pay $456m (£255m) to settle a case related to past tax shelter sales.
KPMG is one of the world's biggest accounting firms
The deal means KPMG will avoid potentially crippling criminal charges.
But prosecutors have charged nine people - mainly former KPMG executives - with conspiring to defraud US tax authorities in relation to the case.
In June, the company publicly said it took "full responsibility for the unlawful conduct by former KPMG partners" and deeply regretted it.
The settlement and federal indictments follow a lengthy investigation into tax shelters sold to individuals between 1996 and 2002.
KPMG - one of the "big four" global accounting firms - has admitted it helped "high net worth" clients evade billions of dollars in taxes by developing and marketing the tax shelters and concealing them from the Internal Revenue Service (IRS).
Federal prosecutors had thought very hard about indicting the firm, as a similar charge destroyed Arthur Andersen after it was found guilty of obstructing justice in the Enron investigation.
The US Supreme Court reversed Andersen's conviction earlier this year - but the move was unable to help the firm's 85,000 employees who lost their jobs.
"KPMG's action were a direct assault on our progressive system of income taxation," IRS commissioner Mark Everson said.
"Today's actions demonstrate our resolve to hold accountable those who play fast and loose with the tax code."
While Judge Loretta Preska at Manhattan's federal court said the company's board had agreed to the deal, the group had no immediate comment.
US Attorney General Alberto Gonzales had " agreed to defer prosecution" provided KPMG met a series of "stringent conditions".
As well as the multi-million dollar payment, KPMG has also had to agree a number of other conditions under the settlement.
The group has agreed to close its tax business for high net worth individuals within six months.
It has also agreed to be monitored by former Securities and Exchange Commission chairman Richard Breeden, who will act as an independent monitor to check the company is complying with the settlement.
The deal is similar to a "suspended sentence" offered in the UK - if it breaks the agreement between now and 31 December 2006 it can still face a grand jury indictment.
Meanwhile, eight former KPMG executives - including former deputy chairman Jeffrey Stein - and an outside tax lawyer have also been charged following the three year investigation.
KPMG operates in 148 countries and employs around 93,900 staff across the globe.