DaimlerChrysler Chief Executive Dieter Zetsche may be losing sleep over the woes of Daimler's U.S. unit, Chrysler Corp., but he's sure to be breathing easier about once-troubled Mercedes-Benz. On Oct. 25, when Chrysler reported a $1.5 billion loss for the third quarter, Mercedes posted a 127% jump in operating profit, to $1.2 billion. Sales are up 9.3% this year, and analysts expect the turnaround to stick. "The downward spiral," Zetsche says, "has changed direction."

Mercedes' improved fortunes couldn't have come soon enough. The prestigious automaker is finally emerging from the most painful stretch in its 127-year history: a three-year slump in which its once-hallowed reputation for quality and engineering took a beating even as rival BMW surpassed it in global sales. Mercedes' fall in recent years was so precipitous it helped spur the early departure of former CEO Jürgen Schrempp.

The troubles became apparent in 2003 when the world's No. 1 luxury brand landed near the bottom of J.D. Power's annual quality survey. Then, in 2004 and 2005, electronics snafus led to widespread recalls, further denting Mercedes' reputation and finances. And as Mercedes dragged its heels modernizing its manufacturing techniques, competitors made huge strides in improving the way they build cars. As a result, even today, "Mercedes is getting squeezed on all sides by very high-quality cars produced at half the price," says Jay Baron, head of manufacturing at the Center for Automotive Research in Ann Arbor, Mich.

Enter Zetsche as top dog. After running Chrysler from 2000 to 2005, he took over DaimlerChrysler 14 months ago. Zetsche quickly set about slashing some 9,300 jobs by offering workers buyouts. More important, to shake up Mercedes' hidebound culture he kicked off a radical restructuring, organizing the company around functional elements of the car--motors, chassis, and electronics systems--instead of by model lines.

Other automakers have already gone down this path, but for Mercedes the shift marks a big departure. Suddenly, model overlords, once free to design cars from the wheels up, are required to choose from a common basket of modules and components. Mercedes is aiming to reduce 226 door handle variants to 71, 99 cooling systems to 25, and 171 antenna designs to 53. The list goes on and on. And with each new model, thousands of different parts will be shared instead of being engineered from the ground up.

But Mercedes still has a long way to go. Its costs per vehicle are as much as $3,800 higher than for comparable BMWs, says Ferdinand Dudenhöffer, director of the German Center for Automotive Research at the University of Gelsenkirchen. Much of that difference could be made up by standardizing design and manufacturing and sharing more parts, but Mercedes is a good five years behind the likes of BMW and Toyota Motor Corp. in this arena. Zetsche also aims to boost the flexibility of Mercedes' factories, which today build just one model per line. By 2010 that should rise to two per line, making it easier to adjust output to meet demand. Still, rivals now produce up to six models on each line.

Millions of test-drive miles
Fortunately for Zetsche, Mercedes already has tackled some of its thorniest problems. To address the electronics debacles, engineers begin testing systems up to a year earlier than in the past, and long before the start of production. Today five research and development labs at Mercedes' Stuttgart headquarters root out many of the problems that have savaged its reputation.

Lab workers put each new model's electronics system through a battery of 10,000 tests that run 24 hours a day and take three weeks to complete. One favorite tactic: Simulate what happens when a driver hits buttons all over the dashboard willy-nilly at the same time. "We try to come up with every strange situation possible," says Dieter Serries, Mercedes' head of development testing. Mercedes used the technique to ferret out more than 1,000 errors in the new S-Class, including one where the blinkers didn't function when there was no air conditioning system in the car. Says Zetsche: "You can find 99% of the glitches before a car ever hits the road."

Even so, engineers are doing more test driving than ever, thanks to a decision to build three times as many prototypes of new designs. That allows engineers to drive a new model 3 million miles before it goes into production.

Manufacturing processes are getting an overhaul, too. At Mercedes' 10,000-worker Sindelfingen plant near Stuttgart, which churns out 1,200 E-Class sedans a day, managers have analyzed each work station to reduce complexity and boost quality. For instance, when laser sensors in the body shop detect minute flaws caused by robots, a computer sends an instant message to the cell phone of the engineer, or Meister, in charge. And workers now take 30 minutes from each shift to do maintenance, avoiding breakdowns by reducing wear and tear on machinery. Ergonomic seats on the E-Class line help workers swing in and out of the cars without strain, reducing errors. Photos illustrating a perfectly executed job hang over each work station, replacing confusing written descriptions. And the assembly line is punctuated with "zero-defect gates," where cars can't pass until they are certified flawless.

Since electronics problems peaked in 2002, the number of flaws has dropped 72%, to about one per car. And warranty costs are down by 25% this year. "It's about doing things right 1 million times over," says Mercedes Chief Operating Officer Rainer Schmückle.

Zetsche aims to keep the pressure on, using some of the tactics he deployed at Chrysler to speed change. When a manager gets a report of a problem, it is logged into a database, and the clock starts ticking. If the manager can't figure out how to fix faulty parts or systems within three weeks, the case automatically lands on Zetsche's desk. That seems to be incentive enough. In the four months since he implemented the practice, only one case has ended up there. "Quality was always a given at Mercedes," Zetsche says. "We trusted too long in a given system instead of trying something new."