In February 2012, Sergio Ermotti called his first town hall meeting as UBS Group’s chief executive. The stock was finally recovering in those early days, but staff morale wasn’t. As one veteran of the Swiss banking giant tells Fortune, “If you had worked for UBS in those days, the mailman would grumble at you.” 

The woes of UBS, which turned 150 years old that year, had taken on the urgency of a national crisis. UBS became the foreign bank most exposed to America’s subprime mortgage debacle, decimating clients’ portfolios. In 2008 the Swiss government stepped in with a historic bailout package after UBS booked a mountain of losses. The last straw came in September 2011. A UBS trader in London executed a series of fictitious trades to cover his losing positions, moves that ultimately cost the bank $2.3 billion.

“I remember exactly where I was when I heard the news,” says Lukas Hässig, a longtime chronicler of the Swiss banking world based in Zurich. “I just thought, ‘No fucking way. UBS? Again?! Another scandal?’”

Read more: Investors are pulling money out of U.S. equities and betting on Europe. Is it time to follow their lead?

Oswald J. Grübel saw the writing on the wall. He resigned as UBS’s CEO days later, opening the door to Ermotti.

At that first staff meeting, the new boss addressed the tension in the room straightaway. How many of you, he asked, are proud to work for this bank? If you’re not, he instructed, raise your hands. “You would not believe how many people raised their hands,” he recalls, shaking his head in lingering disbelief. 

As his first task, the Swiss-born Ermotti presented a radical restructuring plan to clean up the scandal-ridden bank. The safe and dependable wealth management business would be the new focus. The investment banking business, the biggest drag during the global financial crisis, would get the chop. It was a reinvention plan a CFO would love, but it rumpled the rank and file. Yes, it would boost the bank’s capital reserves (per regulators’ requirements) while cleaning up the dodgy loans on its books. But it wasn’t without risk. To work, the bank would need to rebuild ties with many of the same ultrawealthy clients it had burned during the mortgage crisis.

Newsletter-Red-Line-15

Ermotti, 60, will step down from his post at UBS on Nov. 1, replaced by ING Group’s former boss, Ralph Hamers. Ermotti spoke to Fortune in late August about his decade-long run in a lengthy Skype call from his home office in Lugano, on the Italian-Swiss border. 

A former trader and investment banker who spent much of his career outside his homeland, Ermotti isn’t your typical Swiss banker. In past generations, UBS would recruit heavily from the Swiss military. For years, the bank’s culture remained regimented, secretive. “Only if you made it to the rank of general would you be considered for the highest executive ranks at UBS,” Hässig explains.

Ermotti was 50 in 2011 when he joined UBS from Italy’s UniCredit to run the bank’s EMEA divisions. Extraordinarily, he seized the top post months later. Job one for the former investment banker: Cut that same business at UBS down to size. None of that made him a credible champion for wealth management at first.

But Ermotti immediately saw its appeal. 

Wealth management is a $135 billion business with huge upside. “One striking feature of wealth growth over the past two decades has been its extraordinary resilience,” BCG wrote in its annual wealth management report in June. “Despite multiple crises, wealth growth has proved to be stubbornly robust, springing back from even the most severe tests.” 

The rich are getting fabulously richer at the fastest pace in modern history. Over the past 20 years, personal financial wealth has nearly tripled, rising from $80 trillion in 1999 to $226 trillion by the end of 2019. Catering to the needs of the top tier has caused a steady flow of commissions and fees to rain upon the world’s top private bankers and wealth management gurus. 

Over the past 20 years, personal financial wealth has nearly tripled, rising from $80 trillion to $226 trillion.

Ermotti calls these “the tremendous secular trends, such as wealth creation and demographic change, that are driving today’s wealth management industry. This is as true in emerging markets as it is in Western economies—pandemic or no pandemic.”

So far, wealth management is one of the few parts of Big Finance that have yet to be severely disrupted by fintech upstarts. Ultrahigh-net-worth clients (those with a personal fortune of at least $30 million) are not so dazzled by no-fee investing apps. They’re demanding diversified investment options to make their money grow. They’re often looking beyond stocks and bonds, to business opportunities. Wealth managers get a range of questions: Should I invest in a manufacturer in Vietnam? What about a vineyard in Tuscany? How do I get in on that IPO-track tech startup? 

UBS had been beefing up its wealth management team well before the global financial crisis. It was one of first big European banks to spot the huge opportunity in Asia’s wealth boom. Under Ermotti, it ramped up the business abroad while rebuilding ties with affluent Europeans. At the same time, it shrank the investment bank to boost growth elsewhere. “The capital allocated to the investment bank as a percentage of risk-weighted assets was around 75% when I joined UBS. It’s a third today, and a better reflection of our business model and expected business returns,” Ermotti explains. Investors watch a bank’s risk-weighted ratio like a hawk. The lower the number, the more flexibility a bank has to reinvest profits into things that actually grow the business: technology, recruiting talent, acquisitions, or loaning out money to more affluent clients. But a bank that’s required to put aside billions every quarter to backstop ever riskier assets is a bank with less ammunition to invest and grow. 

In Ermotti’s first year as CEO, the bank was in cleanup mode. In 2011–12, UBS bundled up roughly 170 billion Swiss francs ($185 billion) in risk-weighted assets on its books and sold them off to the highest bidder. A big tranche—$38.7 billion—was repackaged into a single-purpose vehicle and sold off under the management of the Swiss National Bank. 

The restructuring paid off. “It took a few quarters to convince the markets that we were moving in the right direction. And when we got them convinced, we decided to accelerate the strategy,” he says.

By 2013, UBS had become the globe’s biggest wealth manager, eventually calling half the world’s billionaires, clients. Today, UBS has grown its global wealth management assets under management to $2.6 trillion, and competitors, including crosstown rival Credit Suisse, are quickly trying to catch up. 

During Ermotti’s tenure, the wealth management unit has pulled in $362 billion in “net new money,” a much-watched metric among private bankers that serves as a proxy for customer acquisition. Making wealthy people wealthier has been exceedingly good strategy for UBS and its shareholders. The steady fees from wealth management helped grow its capital base by $11 billion in the past decade. Plus it helped produce a string of profitable years, and return more than $20 billion in dividends.

Ermotti says that COVID has fundamentally changed the wealth management business—especially when it comes to technology. “For example, we regularly run conferences for our clients where we cover big themes. Usually, we’d get, let’s say, 100 clients attending an in-person event. But because we’ve been forced to do it online, we’ve been getting three times, four times more people attending our conferences,” he says. 

Newsletter-Red-Line-15

No bank is pandemic-proof, but UBS with its mix of wealth management and low bad-loan exposure has come close, observes Pauline Lambert, executive director of financial institutions ratings at Berlin-based Scope Ratings. “That’s a business mix and a business model that’s well suited to the COVID environment.”

Lambert points to a string of metrics that show UBS has one of the healthiest loan books and most diversified revenue streams in the banking sector, crucial in this era of low interest rates. According to Scope, fees and commissions—a highly stable inflow, even during an economic crisis—represents nearly 60% of UBS’s revenues, well above its European rivals. Meanwhile, its loan and credit provisions are minuscule. It’s had to put aside just 32¢, on average, for every $100 it’s loaned out, suggesting not only that the prospect of UBS clients defaulting on their loan obligations is relatively remote, but also that investors need not fear a replay of the 2008 financial crisis. 

Lambert says investors again today would be wise to assess banks by the strength of their loan books, which could become huge liabilities in the age of COVID.

UBS paradoxically may be in better shape today during a pandemic than it was a decade ago.

In the second quarter, Ermotti and his team delivered where so many rivals could not. UBS reported a $1.2 billion quarterly net profit that amounted to a monster $250 million bottom-line “beat.” More important, Ermotti declared that the bank’s outlook already was looking up—a far cry from his biggest competitors. In the same quarter, JPMorgan Chase, Wells Fargo, and Citigroup had to set aside nearly a combined $28 billion to cover bad loans vs. just $272 million for UBS.

Investors, so far, are eyeing UBS stock cautiously: Though shares are flat year to date, that compares with a negative 28.4% performance of the Refinitiv Datastream world banks index.

Like all banks, UBS faces enormous challenges. Global economic growth will be unsteady for years. Interest rates will barely budge above zero in the world’s biggest economies. And the markets will continue to be volatile. These are not favorable conditions for a value stock, let alone a bank value stock.

But in clawing back from employees, clients, and the markets much of the respect the bank had once lost, UBS paradoxically may be in better shape today during a pandemic than it was a decade ago. That’s in no small part due to Ermotti but also to those employees who spoke up during that first meeting a decade ago and have continued to deliver since. “All those raised hands told me they really care about the future of the bank,” he says. “If you’re not committed to the bank, you know what? You’re probably not going to raise your hand.”

A version of this article appears in the October 2020 issue of Fortune with the headline “A Swiss surprise.”

More must-read finance coverage from Fortune:

This story was originally featured on Fortune.com

Companies Changing the World in 2020