With news that Volkswagen AG CEO Martin Winterkorn has resigned after the company was found to have cheated on its diesel emissions tests, the next VW CEO could learn a thing or two from the last auto company leader to face worldwide scrutiny.

That would be Mary Barra, the CEO of General Motors GM , the Detroit-based automaker who recently handed over $900 million to the U.S. government as part of a settlement over defective ignition switches that sparked a recall of nearly 30 million cars, and had led to 124 deaths and 275 injuries.

That recall started in February 2014, just two weeks after Barra was appointed to the company’s top post. Even before she began, GM was struggling to recover from its 2009 bankruptcy and around $18 billion in losses over the past 15 years.

The GM recall, however, would drag Barra through four Congressional hearings, and cause the company to set up a $400 million victim-compensation fund. There was also the damning 325-page internal report released by former U.S. Attorney Anton Valukas, which revealed that GM knew about the switch problem since 2001, but because of a culture of silence and blame games, led to no action to rectify the problem. The company would continue recalling its cars over other safety issues, and hundreds of personal injury and wrongful death lawsuits are still pending.


But through it all, Barra has succeeded in winning the hearts and minds of the public, and earning tons of goodwill for her response to the crisis. What did she do?

1. She was honest

Throughout the crisis, Barra never shied from apologizing for the misdeeds, even if she was absolved from all wrongdoing. During her Congressional hearings, Senators heaped praise on Barra for her contrite, transparent answers. “God bless you, and you’re doing a good job,” said Sen. Barbara Boxer (D-Calif.) in one hearing. Barra also convinced Senators that this moment was one she would use for good. “I will not rest until these problems are resolved,” was another promise from Barra.

2. She was committed to change

Barra backed up her words with action. She fired 15 people who were at the heart of the fault, reorganized GM’s litigation practice and created the “Speaking Up for Safety” program that allowed employees to act as internal whistleblowers. She has also used this crisis to address GM’s internal culture of over-respecting higher-ups, saying: “I don’t want to set it aside and explain it away because I think it uncovered some things in the company that it’s critical we challenge ourselves to change and to fix.” While the culture change is taking time, she used this crisis to motivate GM staff members in an unusual way. “I never want to put this behind us. I want to put this painful experience permanently in our collective memories,” she said in one town hall meeting, a statement that struck long-time employees as very un-GM-like.

3. She focused on the bottom line

Ultimately, a CEO is only as good as his or her company’s balance sheet, and Barra has done immensely well in reviving GM’s fortunes. She focused on consolidating operations in the U.S., separated Cadillac from GM as a “separate business unit”, and invested around $1 billion in its aging Warren Technical Center to help improve the company’s R&D efforts. The results? In the last earnings call in July, GM reported that its second-quarter earnings were five times as large as a year ago, beating analysts’ expectations. The road back is still long, but Barra’s work can provide the incoming Volkswagen CEO a blueprint on how to address a historic crisis inside a company.