In 2014, the U.S. Department of Veterans Affairs was in crisis. The agency, which provides health care to approximately 9 million veterans at over 1,700 locations, had set a top-down goal to increase the percentage of veterans who were seen within 14 days of requesting an appointment. This mandate, as admirable as it was, clashed with the diminished capacity of the chronically underfunded organization, where in some parts of the country, underpaid physicians were burning out under the weight of rising caseloads.

In the end, a combination of unattainable objectives, an environment that lacked transparency, and a culture where failure was not perceived to be a viable option, led some VA administrators and clinic staff to manipulate data to make it appear as though the wait time goal was being achieved. Some maintained secret wait lists outside the system, officially adding patients 14 days before their scheduled appointments. Others routinely cancelled and rescheduled appointments to make wait times appear shorter than they actually were.

The consequences were severe.  Forty veterans died while waiting for appointments at the Phoenix VA alone. Although subsequent investigations were unable to conclusively connect these deaths to prolonged wait times specifically, deeper scrutiny revealed manipulations at multiple VA medical centers across the country, which affected the appointments of roughly 121,000 veterans system wide. The fallout was dramatic: the Secretary of Veterans Affairs resigned and the FBI initiated a criminal investigation.

Could the organization turn itself around?

Obama nominated Robert McDonald, an Army veteran and experienced executive who had honed his leadership skills during a 33-year career at Proctor and Gamble, to attempt the difficult turnaround. On July 30, 2014, exactly 13 months after retiring as P&G’s Chairman and CEO, McDonald was sworn in as the Secretary of Veterans Affairs.

McDonald took charge of an organization that was three times the size of the Cincinnati-based consumer juggernaut he ran previously. With 365,780 employees, VA has a higher headcount than any Fortune 10 company apart from Wal-Mart, and at $152.7 billion, its budget in 2015 was slightly higher than the total gross sales of General Motors. Most importantly, there are 22 million veterans (roughly one out of every fifteen Americans) of which roughly half rely on services the VA provides. The stakes, in other words, were high.

A Harvard Business School case study that Robert Huckman, Sam Travers, and I wrote earlier this year documents what came next. “Organizations are perfectly designed to get the results they get,” notes McDonald. “If you don’t like the results you are getting, then you need to change the design of the organization.” In this case, McDonald set out to transform the design of VA to help the organization better achieve its mission for veterans.

McDonald and his team’s approach was heavily influenced by John Kotter’s eight steps for effective organizational change. Although the transformation remains ongoing, they have made considerable progress after two and a half years: Pending claims at VA have fallen by more than 90%; VA healthcare now performs better than the private sector on 96% of outpatient measures, according to RAND; and by the end of the year, all VA hospitals will offer same-day access to care, relative to none in 2014.  In a survey conducted last month, 75% of veterans reported that VA effectively delivers care and services, up from 65% just a year ago.

During a recent visit to the Managing Service Operations course I teach to MBA students at Harvard Business School, McDonald reflected on the lessons he had learned at VA and their significance for service transformation both inside and outside the public sector.

Assemble the right team, pairing leaders from inside and outside the organization. McDonald emphasized how critical (and time consuming) it was to build the right team for the VA’s transformation. “If you talk to any CEO, they’ll tell you that the number one problem in transformation is getting the right leadership team in place,” he explained. “I’ve changed 14 of the top 17 leaders of VA in two and a half years. We would not be where we are today if it weren’t for that. It doesn’t mean you’re firing all 14, but it might mean they’re in the wrong jobs.” McDonald’s approach was to pair private sector executives who had fresh perspectives with experienced civil servants who were promoted from within and had a deep understanding of the VA’s dynamics and how to get things done in the federal government.

For example, Scott Blackburn, an Army veteran and former McKinsey & Company partner was paired with Chief of Staff Robert Snyder, who joined VA in 2009 after a 26-year career in the Army, to lead the transformation and reorganization initiative. Pairing leaders from outside and within the VA proved critical for identifying transformative best practices and tailoring their implementation to accommodate Washington dynamics, all the while honoring the particular challenges facing the VA. Introducing new ideas is critical for transformation, but it must be done with an awareness of the environment’s constraints and empathy for the challenges facing the organization.

Pursue a principles-based organization. McDonald jokes that when he joined the VA, the General Counsel ran the department. “A rules-based organization is a safe place to work,” he explained, “because as long as you follow the rules, you’re never going to be criticized. You go to the General Counsel for each opinion, so you never have to take any personal risk.” McDonald characterized the culture of the rules-based VA he and his team inherited as a culture of learned helplessness. Employees often lacked the resources they needed to excel at their jobs, and they were afraid to act outside their pre-specified job descriptions for fear of reprisal.

The leadership team had to work through vestiges of VA’s rule-based past. For instance, in May 2015, an employee answering the phone at the Puget Sound VA in Seattle received a call from a veteran who had broken his foot, driven himself to the hospital’s entrance, and needed help getting into the building. Stymied by rules like don’t abandon your post, and advise patients outside the hospital to call 911 for assistance, the employee refused to go to the veteran and advised him to hang up and call 911. Ultimately, a team of Seattle firefighters was dispatched to the hospital’s parking lot to help the veteran from his car to the emergency room — a distance of 10 feet. In a rules-based organization, employees lack the flexibility of discretion.

In contrast, in a principles-based organization, everyone throughout the hierarchy is expected to take risks, making judgments in service of the organization’s mission and values. As a veteran, the VA’s mission resonates deeply with McDonald, as it does with the public servants who have opted to work in VA, a third of whom are veterans themselves. McDonald explained that building a principles-based organization is about creating a culture in which everyone knows that if they act in accordance with VA’s principles, he and the rest of the leadership team will “have their backs.” Building this culture involved traveling extensively to meet directly with VA employees and stakeholders, implementing a pair of extensive training programs, and on a weekly basis, highlighting and celebrating the stories of employees who let the principles of the VA guide their behavior when circumstances required them to go off script.

For example, in the VA hospital in White River Junction, Vermont, employees knew a regular patient so well that a single missed appointment gave them immediate concern about his well-being. On their own initiative, the employees contacted local police, who made a house call and discovered the veteran had fallen, was unable to move, and was in a critical state. By building strong relationships with patients and taking the initiative to act in accordance with VA’s values, the White River Junction employees made a tremendous difference in the life of that veteran. VA leaders celebrate and widely share examples like this one and challenge employees at all levels throughout the organization to find opportunities to act similarly in service of veterans. When employee behavior is influenced more by a clear sense of the organization’s shared values and principles than by the “safety” of hiding behind rules, it results in better outcomes for everyone involved.

Measure performance carefully and manage with an eye on what’s most important to customers. The crisis that emerged in the Phoenix VA was triggered by the pursuit of a 14-day wait time goal for all appointments. However, upon digging into the data on wait times and patient satisfaction, the VA’s leadership team discovered a curious fact: wait times weren’t what mattered most to patients. “We were measuring the wrong thing,” noted McDonald, “and we weren’t even measuring the right thing.” What most patients wanted was a seamless, hassle-free experience that delivered the care they needed and that made them feel valued as customers. Yes, when people need urgent care, they want urgent care, but in most cases, being seen in 14 days is not a patient’s first priority.

So although the VA now delivers more than one million same-day appointments per month, leaders have also worked to streamline customer journeys and empower employees to deliver more personalized and attentive service. Sixty-eight percent of veterans now report feeling valued in their interactions with VA and 74% report getting the services they need, which is up from 47% and 65% a year ago, respectively. VA’s experience with wait times is an important reminder that sometimes what we think matters most isn’t actually what moves the needle. There’s no hope of effective transformation when leaders’ sights are set on the wrong objectives.

Align requirements with resources — and encourage employees to speak up about any gaps. McDonald notes that he’s “never gotten a letter from a member of Congress asking [him] to take a benefit away from a veteran. Instead, they’re always intentionally adding more benefits.” Historically, however, VA has not followed up with legislators to assign costs to rising service requirements, and over time, the gap between resources and requirements widened. From 1940 to 2000, VA’s budget rose at a compound annual growth rate of only 3.19% per year. In recognition of the widening gap, funding to VA increased 87% under President Obama. But in the context of rising demand, mounting costs, and increasing complexity of care, sustainable performance at VA can only endure if the services it provides remain amply funded.

For example, a service level agreement that promises wait times of less than 15 days to first appointment will require more resources and should be granted more funding than a service level agreement of 30 days to first appointment. When there are new requirements, there needs to be a conversation about how delivering on those requirements will be funded — something that doesn’t happen often enough.

Importantly, the resources required to achieve particular outcomes often change over time. Employees on the front line, who are best equipped to observe the gaps between resources and requirements, need to feel safe surfacing those gaps. McDonald explains, “the best customer service organizations in the world are those where the people on the front line feel an almost religious responsibility to talk to the CEO or whoever is in charge when requirements and capability don’t match. In my first national press conference, in September 2014, I gave out my cell phone number and my email address, and so I get emails and calls from veterans every day. I had to find a way to understand what was really going on at the front line, and to get employees to do the same thing.”

Build a capacity for learning and continuous improvement. Making service better in accordance with VA’s mission continues to attract new patients, forcing the organization to find new ways to get more out of its operation.

For example, when vets.gov, which simplified the process of enrolling in VA benefits, launched in June, the number of veterans signing-up online for healthcare on a daily basis increased nearly six-fold. Although VA has responded to rising demand by providing approximately one million same-day appointments per month, and the number of patients waiting extended periods for urgent care has fallen close to zero, the number of non-urgent appointments with extended waits is now even higher than it was during the height of the Phoenix crisis.

The team has worked to address these challenges by building a culture within the organization of learning and continuous improvement.

Historically, since each location was evaluated on the basis of its own relative performance, incentives existed to keep best practices a secret from other VA facilities. A new program inside VA called “Diffusion of Excellence” provides incentives for managers to share and adopt best practices. For example, administrators in the Madison, Wisconsin VA realized that if clinical pharmacy specialists triaged and managed chronic disease patients, it would open up appointment slots for primary care physicians to address more urgent patient needs. The idea was selected as a diffusion of excellence initiative, and has been implemented in the VA hospital in El Paso, Texas.

Moreover, leaders provide training in potent improvement tools like Lean Six Sigma and Human-Centered Design, and empower the front line to innovate. McDonald explains that every employee should “own what they do, and that they should always have a personal project ongoing to improve what they do.”  Accordingly, the leadership development program that McDonald and his team introduced required that all employees execute a 100-day improvement project using the skills they had learned. Through decentralized innovation efforts like this one, the team at VA is working to identify new opportunities to improve the efficiency of its offerings in order to reduce wait times when they matter most, despite rising demand for service.

All told, the story of VA shows that organizational transformation cannot be static. World-class service organizations must remain vigilant about the changing dynamics in their sectors and the shifting needs of their customers. Leadership must create a culture and capacity for continuous improvement. The journey of VA highlights the pitfalls and potential of service leadership in the public sector and beyond, and the promise for leaders to make a positive difference in the lives of their customers and employees. “Leadership is a tremendous responsibility,” concludes McDonald. “You’re affecting people’s lives. Don’t underestimate the honor of it, but also the importance of it.”

Editor’s note: An earlier version of this article referred to the Madison, Virginia VA. We’ve corrected it to refer to the Madison, Wisconsin VA.