How the CEO of Hyundai Motor America, a corporate lawyer by training, engineered the most unlikely turnaround in the auto business — and kicked Hyundai into gear.

It’s hard to feel sorry for car dealers. But put yourself in Don Reilly’s shoes. In 1998, Reilly, one of Hyundai’s 50 original U.S. dealers, was living a nightmare. U.S. sales for the brand were running at a paltry 90,000 cars a year. Hyundai Motor America had been without a CEO for months. And now Reilly was in a conference room — listening to a lawyer.

The lawyer was Finbarr O’Neill, Hyundai’s general counsel, acting as chief operating officer while the parent company searched for a leader.

“Fin got up and asked what direction we thought the company should be going in,” says Reilly. “We started throwing out suggestions.” By the meeting’s end, there were 100. “Fin said, ‘Let’s pick the top 10, and that’s where I’ll start,’” Reilly remembers. “That was Hyundai’s defining moment. It was the day that somebody took charge.”

Lawyers don’t usually end up running automobile companies. But a few months later, Hyundai gave O’Neill the reins of its American unit. Four years later, this unlikely CEO is presiding over the industry’s most unlikely transformation. Hyundai Motor America posted record sales for each of the past 18 months, and U.S. sales quadrupled during the past four years.

O’Neill put Hyundai on a growth track by making a bold strategic turn. He knew he needed to take the fear out of buying a Hyundai, and that an eye-catching warranty would help — but if Hyundai had to spend millions of dollars fixing troubled vehicles, it would go out of business. The ultimate decision: to unveil what O’Neill and his executive team called “America’s Best Warranty”: six years of bumper-to-bumper coverage and 10 years of coverage on the car’s engine and transmission.

Why was O’Neill prepared to make such a bold bet? He knew that Hyundai had already started paying serious attention to quality. In the late 1990s, its cars were getting better, even as the brand’s reputation sank lower. What seemed like a brash gamble was in fact a prudent move.

For O’Neill, quality is job one — but it’s not his only job. Hyundai’s next big challenge: to go from functional to fashionable. “A car isn’t just nuts and bolts,” says O’Neill. “At some point, it has to be a reflection of your desires.”

Gee, he almost sounds like a car guy.