Three months ago, as Timothy P. Flynn took the reins as chairman of KPMG LLP, he vowed to pursue "meaningful change" at the nation's fourth-largest accounting firm.

Little did anyone realize how demanding that promise would be.

KPMG yesterday agreed to pay $456 million and to clean up its business practices as part of a deferred prosecution agreement with federal authorities, thus avoiding a grand jury indictment that could have sent clients and partners heading for the exits.

But the challenges for Flynn and the firm's new management team are far from over.

Next on their to-do list: Boost morale of the firm's 1,600 partners; fight lawsuits filed by investors who took part in abusive tax shelter deals; devise a way to spread the firm's financial pain while still investing in its infrastructure. Finally they must try to stave off Mississippi's attorney general, who according to news reports may file similar criminal charges against KPMG.

"This is an assignment with difficulties I wouldn't wish on anyone," Lynn E. Turner, former chief accountant at the Securities and Exchange Commission, said in an interview. "If Flynn keeps the boat afloat and moving forward without sinking, it'll be a major accomplishment."

It has been an intense 12 weeks for the boyish-looking Flynn, 48. Along with new Vice Chairman Sven Erik Holmes and Deputy Chairman John B. Veihmeyer, he has spent the past several weeks engaged in feverish discussions with the U.S. attorney in Manhattan -- and making sure that partners involved in the tax shelter improprieties have been shown the door. All three of the firm's new leaders met in June with senior Justice Department officials, whom they implored not to charge KPMG with a crime.

Flynn has been chairman of the firm since early June, when predecessor Eugene D. O'Kelly announced he had advanced-stage cancer. O'Kelly had served just half of his six-year term when his health problems surfaced. While Flynn is not well known among Washington regulators, he had won respect as head of the firm's audit practice and overseer of MCI Inc.'s restatement after an $11 billion accounting fraud, the largest in history.

O'Kelly said at the time he stepped aside that he was "fully confident" that Flynn and Veihmeyer would guide the firm through a series of obstacles. Veihmeyer had headed the firm's D.C. office and served as an executive committee member of the Greater Washington Board of Trade.

The sudden change at the top nonetheless shook the partnership -- and its entrenched culture.

In the past, KPMG had been famous for pushing back on regulatory initiatives and shareholder lawsuits. For years, the firm refused to turn over tax shelter documents to the government even as rivals PricewaterhouseCoopers LLP and Ernst & Young LLP paid millions of dollars to settle Internal Revenue Service charges over the questionable deals.

One of KPMG's most important signals about a new tone came June 16, when the firm issued a statement taking "full responsibility for the unlawful conduct by former KPMG partners."

In general terms, the statement laid out aggressive steps that Holmes, former chief judge of the U.S. District Court for the Northern District of Oklahoma, had taken to clean house since he joined the firm in March as vice chairman for legal affairs. In all, about 30 partners involved in the tax shelter scheme have been fired for cause or pressured to resign.

At the same time, the new leaders are contesting lawsuits filed by wealthy clients who bought the tax shelters -- signaling in court papers that they will attack former customers who allegedly misrepresented the facts of the deals to the IRS. The day-to-day management of legal operations rests with Holmes, a former partner at the hard-knuckled District law firm Williams & Connolly LLP and a former counsel for the Baltimore Orioles.

All three men also have been taking pains to reach out to KPMG's lenders as well as dozens of board members and executives at client companies -- a list that includes MCI and General Electric Co. Some clients say the "full disclosure" model has been a welcome approach.

"When this first came out, I got a call from Tim saying, 'This is what we're going to do,' and admitting blame," said Dennis R. Beresford, an MCI board member and an accounting professor at the University of Georgia. "My reaction was, that's a pretty gutsy thing to do. Personally, I commended him for it."

"Today, in some sense, is a new beginning," said Douglas A. Warner, who chairs the audit committee at General Electric, KPMG's largest audit client. Although GE will review its auditor this year as every year, "right now, we take them on their word that a lot of things have changed," he said.

Yet the new leaders' stance has sometimes provoked discontent within the firm, particularly from partners who had been involved in the tax deals and who thought the firm was sacrificing them to save itself from prosecution. Eight former executives and a lawyer who worked with them were indicted yesterday.

"This case is unlike any recent fraud case in that there is no cooking the books or sneaking around. The KPMG partners are innocent men who were carrying out the official KPMG business plan created and ordered by the highest levels of the firm's management, who have now thrown their own partners overboard without the ability to pay for their legal defense, contrary to years of firm policy and certainly not the way the American system of justice should work," said Michael J. Madigan, a partner at Akin Gump Strauss Hauer & Feld LLP in the District who represents John Lanning, KPMG's former vice chairman of tax services.

Experts said that under Justice Department guidelines, companies often must accede to government demands to stave off criminal charges against the business itself. That is especially so for a professional services firm, for which reputation and standing are crucial assets.

Allan D. Koltin, president and chief executive of PDI Global Inc., said his company's search division heard from a larger than usual number of KPMG employees in the past week, many of them senior managers worried that the amount of the settlement would reduce the number of employees promoted to partner. "The typical comment is, 'If ever there was a time to look, now's the time,' " he said.

But at least one KPMG employee, stepping out of the company's office at 20th and M streets NW, was upbeat. "The sentiments are high," said the man, who spoke on condition of anonymity and compared his firm with the accounting firm that collapsed in 2002 in connection with Enron Corp. "We're not Arthur Andersen."

Staff writers Elissa Silverman and Dana Hedgpeth and researcher Richard Drezen contributed to this report.

David N. Kelley, the U.S. attorney for the Southern District of New York, left, IRS Commissioner Mark W. Everson and U.S. Attorney General Alberto R. Gonzales announce a $456 million settlement with KPMG as part of a deferred prosecution related to the sale of tax shelters.KPMG executives, from top, Sven Erik Holmes, John B. Veihmeyer and Timothy P. Flynn

negotiated the deal.