FORTUNE -- The day after Lehman collapsed in September 2008, David Sokol noticed that the stock of Constellation Energy, a Baltimore utility, was plummeting. He called his boss, Warren Buffett, and said, "I see an opportunity here." Buffett, who had noticed the same thing, replied after a brief discussion: "Let's go after it."
Constellation (CEG, Fortune 500) held vast amounts of energy futures contracts that had gone sour, and the company appeared to be on the verge of bankruptcy. Sokol, as chairman of the Berkshire subsidiary MidAmerican Energy Holdings, knew the utility industry and saw a chance to buy solid assets at a bargain price. The deal, however, had to be done within 48 hours or the company would have to file for bankruptcy.
Sokol phoned the office of Constellation CEO Mayo Shattuck III, who was in an emergency board meeting. When his assistant answered, Sokol told her he'd like to speak to him. The secretary replied that if she interrupted the meeting, she might lose her job. Sokol replied, "If you don't interrupt the meeting, you might lose your job."
Sokol boarded a Falcon 50EX and sped to Baltimore. He met with Shattuck and struck a deal that evening to buy the company for $4.7 billion, staving off bankruptcy.
Within weeks, before the acquisition was completed, Constellation's board received a competing bid from Électricité de France for about a 30% premium. The board liked the offer, and so did Sokol -- who walked away with a $1.2 billion breakup fee for Berkshire.
When investors think of Berkshire Hathaway (BRKA, Fortune 500), they of course think of Warren Buffett and his record as a hands-off, if highly attentive, CEO. He gives free rein to the heads of his large collection of companies, ranging from Geico to Dairy Queen to Benjamin Moore to the Buffalo News to NetJets. Yet even in Buffett's empire, sometimes a CEO blows it, and his business needs to be fixed or a deal needs to get done -- fast. When that happens, Buffett's go-to guy is David Sokol.
Of all Berkshire's lieutenants, Sokol, 53, is mentioned most often as Buffett's heir, although Sokol shrugs off such speculation. Buffett likes Sokol just where he is, getting deals done, boosting profits, and turning around ailing businesses. In the foreword to Sokol's book, Pleased but Not Satisfied, Buffett writes, "He brings the business equivalent of Ted Williams' .406 batting average to the field of business management."
Buffett first met Sokol in 1999 when Berkshire was buying MidAmerican, the Iowa utility. With longtime Buffett friend Walter Scott, Sokol had bought a small, $28-million-a-year geothermal business in 1991 and built it into that utility powerhouse. MidAmerican, headquartered in Des Moines, now represents an $11.4 billion slice of Berkshire's revenue (about 10%), and Sokol is its chairman. In 2007, Buffett asked Sokol to get Johns Manville, an underperforming roofing and insulation company, on track, and he did; he is now its chairman. In 2008, Charlie Munger, Buffett's vice chairman, asked Sokol to fly to China to conduct due diligence on BYD, a battery and electric car maker. Sokol liked what he saw, and Berkshire invested $230 million for 10% of the company. That stake is now worth around $1.5 billion. In April, when Buffett had concerns about a provision in the Senate financial regulation bill that would have required Berkshire and other companies to post billions of collateral on their existing derivatives, it was Sokol he sent to argue his case. Buffett's side of the argument won.
Last summer Buffett handed Sokol perhaps the biggest assignment of his career: turning around NetJets. The fractional-ownership jet company last year lost $711 million before taxes -- not the kind of performance that warms Buffett's heart. Today the company is profitable, and Fortune got a rare, exclusive view of how Sokol did it.
It's not hard to understand why Buffett likes this driven Midwesterner. Sokol complements his skills. While Buffett comes off as your favorite uncle -- relaxed, with a warm sense of humor -- Sokol is always revving in high gear. An engineer by training, he is a tough, no-nonsense manager. He's up before 5 a.m. each day and jogs five miles and lifts weights five days a week, in part to keep his weight down but also to survive a grueling schedule. He's on the road half the year, not counting the shuttling between his homes in Omaha and in Columbus, where NetJets is based. He and his wife, Peggy, have a grown daughter, Kelly. In his rare time off he likes to fish and ski. "He gets more done in a day," says Buffett, "than probably I get done in a week, and I'm not kidding."
Sokol has been richly rewarded for his hard work. He, Walter Scott, and Greg Abel, now CEO of MidAmerican, together owned (not in equal shares) a 19% chunk of that company, worth around $300 million when Berkshire acquired the utility in 2000. On any given day Sokol might be out rubbing shoulders with his employees or spending time with customers and business partners, looking for new opportunities in China, Brazil, Germany, or elsewhere. How can he spend so much time out of the office and still run three major businesses? Sokol has a formula, one that is laid out in Pleased but Not Satisfied. (He hands out the self-published book to all his executives.)
The concise, 129-page treatise expounds Sokol's six laws: operational excellence, integrity, customer commitment, employee commitment, financial strength, and environmental respect. Yes, they are management bromides, but Sokol drives them so hard and so consistently into every organization he touches -- ruthlessly if need be -- that time and again they get him the kind of results even a Warren Buffett could like.
Another trick to running three businesses at once, Sokol says, is to hire first-class executive assistants and use them aggressively. "Too many people use assistants just to make phone calls, type letters, and file," he says. "At most, mine do that a third of time." He has two full-time assistants and one part-timer who, he says, "know how I think." They give him an update once a week on all the goals he's set for his businesses and for the executives who run them.
His assistants also know he never likes to be late for a meeting -- he believes it shows disrespect. They always build in extra time in case something goes wrong, but they also make sure he has work to do if he happens to show up a half-hour early.
Sokol's childhood offered little evidence that he would one day become a big success. He grew up in Omaha, in what he calls "the wrong side of town." At the University of Nebraska he wanted to be a doctor, but the first time he saw a cadaver he fainted and hit his head on the edge of a marble table. His father gently suggested that he follow in the footsteps of his older brother and study civil engineering.
In 1982, four years after graduating, he was hired by Citicorp in New York City, where he advised clients on investing in big waste-energy projects. He was soon lured away to run a waste-energy business called Ogden Martin, which he built into a New York Stock Exchange company before joining Walter Scott at what was to become MidAmerican.
Sokol's record is not unblemished -- even if you bat .406 you strike out sometimes. In what he now says was probably the biggest failure of his career, Sokol in the early 2000s decided to invest in a new method to remove zinc from one of MidAmerican's geothermal wells in California. The technology worked in the lab, but when applied in the field it flopped, leaving MidAmerican with a $200 million loss. In retrospect, Sokol should have done more pilot-testing. "The worst mistake I made," he says, "was that when I approved the project, in the pit of my stomach I knew it was a mistake. I've tried to teach this to young executives ever since. Your gut instincts are extremely important to listen to, particularly when they are telling you not to do something." When he reported the bad news to Buffett, the boss simply said, "Don't make a habit of it."
Sokol got stung again last April, when an Omaha judge issued a $32 million ruling against MidAmerican, finding that the company had "willfully and intentionally" miscalculated future profits to force out minority stockholders in a hydropower project in the Philippines in the 1990s. Sokol strongly disagrees with the ruling, and the company is appealing.
Such setbacks notwithstanding, Sokol is the Mr. Fix-It Buffett sends in when some part of the Berkshire machine breaks down. What's it like when David Sokol parachutes in? Consider the NetJets story.
Like an airline but even more complicated
In mid-August 2009, NetJets was losing money and customers. Founder and CEO Rich Santulli drafted a letter of resignation, and Buffett accepted it. The situation was painful for both men. Buffett liked Santulli as a friend, and in the 2003 Berkshire annual report he had described him as "an extraordinary CEO."
An ex-Goldman Sachs (GS, Fortune 500) banker, Santulli had created the fractional jet ownership industry in 1986; by 2009, NetJets had 842 aircraft, 3,500 pilots, and revenue of $3.1 billion. Santulli, who signed a non-disparagement agreement, chose not to comment for this article.
Santulli came up with the notion of fractional ownership when he noticed that most owners used their jets only a couple hundred hours a year. Why not split the heavy cost of ownership, he thought, and at the same time avoid the hassles of hiring pilots and maintaining the plane? Today a NetJets customer typically buys a one-eighth share of a jet for, say, five years. He also pays around $5,000 an hour for operations. Because NetJets has a huge fleet, it can guarantee an owner a plane -- not necessarily his own but an identical model -- with only four hours' notice.
Buffett and his family, and many Berkshire executives, have long been happy NetJets customers. Buffett is so fond of the company he likes to peddle the service to Berkshire shareholders at his annual meetings, where he sometimes puts jets on display. In his 2001 report, Buffett, whose company also owns Fruit of the Loom, wrote, "If you buy a fraction of a plane, we might even throw in a three-pack of briefs or boxers." Yet since Buffett bought NetJets from the entrepreneur in 1998 for $725 million, it has not come close to earning back Berkshire's investment.
The fractional-jet business is like running an airline, only exponentially more complicated. Imagine having to fly a customer to a destination on four hours' notice. Not only does the jet need to be available, but the pilots, flight attendants, maintenance crew, and catering services all have to be at the right place at the right time. NetJets spends $100 million a year alone on pilot training. Headquarters in Columbus has its own staff of meteorologists to track weather that might delay flights.
And NetJets' well-heeled customers are used to getting what they want. One G-5 owner drank his coffee only out of a white Styrofoam cup, and crews would have to scramble to find the cups and put them next to his seat. A NetJets pilot recalls flying a passenger from Denver to L.A. for a haircut, and then returning him to Denver. The passenger was a poodle. The flights cost $32,000.
Looking into the precipice
By August of last year the financial meltdown had taken its toll on NetJets. Some top executives no longer wanted to be seen climbing onto a $50 million Gulfstream. (Those Detroit CEOs flying on private jets to the congressional bailout hearings didn't help.) Others couldn't afford it. The NetJets contract guarantees buying back an owner's share at a fair market price. Squeezed Wall Street titans couldn't sell their houses, their art, or their horses, but they did have a guarantee that Berkshire would buy back their jets. Owners started selling shares back at a level that was unprecedented. One NetJets executive there at the time says, "We were looking into the precipice. The charts looked like the Superman roller coaster at Six Flags." NetJets was left holding on its books a large number of unsold aircraft worth, in some cases, 40% less than had been paid for them.
As the situation worsened, Sokol replaced Santulli as CEO. When he had flown to NetJets' Columbus headquarters in early August to check things out, Sokol discovered two major problems with the company. First, it had bought too many new planes, causing its debt to skyrocket. Second, NetJets management, according to Sokol, was too informally organized to be effective. Sokol began handing out copies of his management book. Before long he realized that fixing NetJets was going to be far harder than he had imagined.
New CEO faces old regime
Over the last quarter of a century, Santulli, a charismatic leader, had built a strong culture at NetJets. Many employees felt like family, willing to go the extra mile to make sure this complex business worked day in and day out. If you needed help, you got it. Employees filled in for one another.
Sokol's challenge was to radically change NetJets without ruining the esprit de corps that defined the company. But top management liked things just the way they were. At meetings Sokol would propose selling planes or cutting costs, and executives would push back. Before long Sokol grew frustrated. Says Bill Olsen, who at the time was running NetJets Aviation, an operating division: "It was no secret that David was not open to suggestions, critical debate, or constructive criticism. Once you challenged him in a meeting, he'd give you a look to kill and you'd fall very fast out of his favor." (Olsen left management and went back to being a NetJets pilot.) Sokol responds: "That's just not true. My management style is collaborative."
Despite the blowback, Sokol pushed ahead, canceling orders for new planes, selling off old ones, and reducing debt from $1.9 billion to $1.3 billion. He also cut some $100 million in costs, enough to make operations profitable. He started with low-hanging fruit: About $30 million of cost savings came from canceling the free use of airplanes. The old regime often let a movie star, singer, or friend of the company have free rides or upgrades for promotional purposes. Says Sokol: "We might have been getting only $2 or $3 million in value for $30 million in costs" on such promotions. Sokol also cut out an expensive Las Vegas poker tournament that the company put on each year for its clients.
Next came layoffs. Santulli had already reduced headcount by about 4%. Sokol laid off another 5% and furloughed some 500 pilots, bringing the total headcount to 6,400. He says that because NetJets was flying fewer planes, the company didn't need as many employees. Many top managers disagreed fiercely with the depth of the cuts, arguing that service would suffer. Before long about half the senior management team had been let go. The rest were reassigned or left on their own.
Sokol argues that the company was long overdue for a shakeup. "One thing that can be very nice in a dysfunctional management is that it's very hard to measure people," he says. "So you have managers who are patting themselves on the back, saying they're doing great, while the reality is that there's no way to measure what they're doing." One NetJets executive whose sales region was losing money still received multimillion-dollar bonuses.
Having purged senior management, Sokol elevated three NetJets executives from the next rung down to his new team and hired three from the outside. Says he: "NetJets was top-heavy and lacked a good organizational structure. We needed to give employees responsibilities and goals that were clear and deliverable. We needed to make clear who was doing what."
Under the old regime, service and costs had been measured to some extent, but not broadly throughout the organization. Explains Bill Noe, a longtime employee whom Sokol elevated to president of NetJets North America: "In the old regime, you got everyone in top management in a room and said, 'Here's our goal, here's what we're doing.' But did the employee on the second floor of accounts receivable know what was going on? Probably not."
Sokol has trained his team to measure every single thing the company does, from on-schedule service to bill collection to the quality of catering. "When we make a mistake," he says, "we analyze why we made the mistake, and if there's a way to fix it, we fix it by putting a system in place that solves the problem." Recently a NetJets customer who was landing at a small private airfield in Fort Lauderdale said he needed a rental car at Fort Lauderdale International. His mistake, but the NetJets service rep didn't pick it up. Sokol's team has since adjusted the software system so the service rep can't make that car reservation without the computer system pointing out that the car and airport don't match. Says he: "In less than 0.5% of our flights do we make a mistake in making a reservation. If it's a half of 1%, it's still too many."
Sokol has also brought customer service, sales, and marketing into one group, creating cross-functional teams that are much more familiar with an owner's needs. The service people, who are often in the field meeting and greeting owners, might find out that Mr. X likes caviar and Coke Zero and add that information to a master file the company keeps on each customer. Says Adam Johnson, NetJets' senior vice president: "Just knowing the owner, knowing anniversaries and birthdays, helps to build strong relationships."
The old, entrepreneurial NetJets culture, says Sokol, focused on immediate growth rather than long-term planning. He instituted a rigorous five- and 10-year planning process that looks at everything from future demand for new planes to jet fuel prices, inflation, and new markets like China. Says Jordan Hansell, NetJets' general counsel: "You lay out a whole series of explicit assumptions about the economy, business planning, regulations. That forces you to ask yourself what are the important factors that might make you change some decisions. It helps reduce surprises."
The critics lash out
One thing that did surprise Sokol was the venom with which some ex-NetJets managers have been waging a war of words against him, partly on Buffett biographer Alice Schroeder's website. Jim Jacobs, the co-founder of NetJets, is one of the harshest critics. Jacobs, who left his post as vice chairman in January, argues that Sokol's cost cutting is sacrificing service and that owners are complaining and many are leaving. He also claims that canceling orders for new planes is a big mistake. Says he: "We were protecting the franchise value and the ability of the golden goose to keep laying eggs. We didn't panic and lay off pilots who cost a fortune to bring back on. We didn't cancel new planes to let our fleet get older and thus more expensive to run. We didn't shut down our influencer network. No one at NetJets now has a clue how to run it."
Criticizing the staff cuts, Jacobs points out that most of the $711 million loss in 2009 was a noncash charge and says the company was headed toward being about $70 million cash-flow positive in 2010 even if the company didn't sell another new fractional share. The cuts, he argues, have made NetJets "a tiny shadow of what it was."
"Ludicrous," Sokol snaps back. "In all the acquisitions and business turnarounds I've done, I've never seen senior people leave a company who then go out and try to spread rumors and call customers and try to be harmful to the business. It's a horrible thing to see, because the only people they are hurting are themselves and the employees of the company."
The judgment that matters here, of course, is Buffett's, and he is pleased and satisfied. "Dave is now making very good money, and not from selling planes," Buffett says. "It looks like NetJets will earn $200 million pretax this year. It's as remarkable a managerial achievement as I have ever seen. When aviation picks up, it could be a company that could earn $500 million a year."
Sokol feels that this turnaround is largely done. He hopes to elevate one of the six in his new management team to CEO, perhaps by the end of the year. The question now is, When the phone rings again from Omaha, where will he fly off to next?