DETROIT – Late last summer, a lawyer named Lance Cooper sensed that his long battle with General Motors was coming to an end.

For three years, he tussled with lawyers from a high-powered firm hired to defend GM against his clients, the parents of Brooke Melton, 29, a woman killed when her Chevy Cobalt lost power and collided with another vehicle. He sought internal documents and crucial witnesses, but at GM’s direction, lawyers from that firm, King & Spalding, fought him every step of the way, even refusing to disclose how many similar lawsuits the carmaker faced.

Then, in September, GM quietly settled Cooper’s case. The type of faulty ignition in Brooke Melton’s vehicle has become a major scandal for America’s biggest car company and has since been linked to other deaths and led to the recall of 1.6 million cars.

And King & Spalding, the law firm that handled the Melton case for the company, has undergone a role reversal. This month, GM asked the firm, along with Jenner & Block, to conduct what GM Chief Executive Mary T. Barra has called an “unvarnished” investigation into why the company failed for more than a decade to alert regulators and consumers to the defect. To Cooper, King & Spalding’s switch from a fierce defender of GM to a potential inquisitor into the company’s actions may also pose a conflict. For one, some of the firm’s lawyers may have to ask their own colleagues if they advised GM about whether to recall the vehicles at the time the Melton case was settled for an undisclosed amount.

There is a predictable trajectory to the modern institutional scandal: Charges of wrongdoing surface, then mount, and then the company announces it will bring in an outside law firm to conduct an internal investigation. The announcement, made in sober, corporate language, sends a calming message: We’re not hiding. We’re taking this seriously. We’ve got this.

Hiring outside counsel in these cases is part investigation, part public-relations gambit and part legal strategy. In most cases, the goal isn’t to publicly flog a company or its top executives but rather to limit damage to an institution’s reputation or to contain the financial harm to shareholders of a publicly traded company. And it does so under the protection of the attorney-client privilege.

From the point of view of the company, a well-done internal investigation can shape the accepted story of what happened – and produce findings that allow the company to negotiate for lower penalties from prosecutors or regulators down the road.

To achieve those ends, the law firms conducting the investigations must be viewed as forthright and uncompromised. In this respect, some critics have already questioned GM’s choices.

The GM investigation will be led by Anton R. Valukas. Valukas gained credibility as the examiner in the Lehman Brothers bankruptcy, when he revealed several accounting tricks that the investment bank had used to spiff up its balance sheet. He has also served in a number of special investigative roles for government agencies in Chicago. But he is also the chairman of Jenner & Block, which has done high-profile securities work for GM. Both Jenner and King & Spalding have done product liability cases for the company.

Les Zuke, a spokesman for King & Spalding, declined to comment. Greg Martin, a GM spokesman, said that both King & Spalding and Jenner & Block had “reputations for adhering to the highest standards.” Valukas did not respond to a request for comment.

William R. McLucas, a partner at WilmerHale, a big name in corporate internal investigations, said if companies want credibility with prosecutors and investors, it is generally not wise to use their regular law firms for internal inquiries. The Justice Department has already announced it will investigate GM’s handling of the ignition defect.

“If you are a firm that is generating substantial fees from a prospective corporate client, you may be able to come in and do a bang-up inquiry,” said McLucas, who was the Securities and Exchange Commission’s director of enforcement for eight years. “But the perception is always going to be there; maybe you pulled your punches because there is a business relationship.”

Charles Elson of the University of Delaware, who specializes in corporate governance, agreed: “I would not have done it because of the optics. Public perception can be affected by using regular outside counsel.”