Just nine seconds ago my driver and I were admiring one of the onion-domed churches common in Bavaria. But now I'm nailed to my leather seat as the speedometer passes 135 mph, the tach hits 8,200 rpm, and the church is a dancing dot in our rearview mirror. "That felt good, yes?" asks Peter Löcker as he flicks off an m button on the steering wheel.

This is no Indy race car, but a gray German four-door family sedan. The M5 is the latest sedan to roar out of the anonymous hangars in Garching, north of Munich, home to BMW's fabled M division–a skunkworks that transforms mainstream models into no-limits screamers.

The engineers, designers, and technicians at M lead a double life. They're known mainly for souping up 20,000 street cars per year into testosterone-injected racers. The Formula One-style high-revving engine they've placed inside the M5, for example, makes it the fastest, most frightening sedan BMW has ever made, capable of 190 mph. But the 500 employees at M are also the engine driving the wheels of performance, prestige, and profit across the whole BMW group–the reason the Bavarian carmaker can boast that it creates the "ultimate driving machine."

Löcker, a thin, gray-haired BMW executive who has served the company for more than 30 years, closes his eyes momentarily as he listens to the car's V10 engine. "You wouldn't believe it's a 507-horsepower car, would you? Now it's just a normal, everyday car for driving to the office or collecting your mother- in-law, yes?" But before I can agree, the m button, which unleashes 100 of those horses and stiffens the suspension, has been pressed again. As we're catapulted along the autobahn once more, Löcker grins like a teenager who has just been handed his license.

Thirty years ago, long before MTV's "Pimp My Ride," BMW sniffed a profit as it watched European aftermarket suppliers get fat helping enthusiasts tune up engines and customize their "Bimmers" with 20-inch rims. So it created a separate division, M, to make high-octane versions of its production models for speed freaks, giving them gutsier engines, firmer brakes, and more aerodynamic chassis.

Another part of M, called Individual, delivers a more cosmetic form of personalization. It offers a bewilderingly large menu of paint finishes, leather upholstery, antique wood facias, minifridges, DVD players, and photocopiers, enabling drivers to design their own BMW. (Fashion designer Karl Lagerfeld asked for–and got–tissue dispensers in the rear-door pockets.) M and Individual cars are not assembled separately, but alongside conventional models at plants in Dingolfing and Regensburg. And next year, both the new Z4 coupe and its M equivalent will be built at BMW's plant in Spartanburg, South Carolina. Weaving custom models into standard production lines is a prescription for logistical migraines. But it means that even customized cars are built to the same strict BMW quality controls and delivered with a full factory warranty.

Today, there are M versions of the 3, 5, and 6 series. The new M5, already sold out for the next two years in Europe, has just been launched in the United States, BMW's biggest market. And American enthusiasts will get a chance to see the M6 at January's Detroit motor show. The Individual program, now offered across BMW's full model range in Europe and Asia, is coming to the States, too. Exactly when will depend on negotiations with U.S. dealers. "In Europe and Asia, people are prepared to wait four to six weeks for the personalized car they want," explains Löcker, M's regional sales manager for Europe, "but in the U.S., customers expect to drive it from the showroom straightaway."

For BMW, M has proved a handsome business. At around $105,000, for example, the list price of an M5 is almost 40% higher than the sticker for the most expensive conventional 5-Series model. And then there is M's unquantifiable halo effect on the BMW brand. Like the cult of Mac, there's a cult of M, complete with polo shirts, watches, and key fobs sporting the blue-and-red-striped M. Across Europe and the United States, there are active M-owner clubs that meet regularly for weekend races and barbecues. "The people who buy an M car are experts," says Löcker. "Often, they have more specialist knowledge than the sales staff."

Perhaps most important, though, is the way M's innovations find their way into mainstream models. M customers' willingness to pay extra for advances in things like brakes, gearboxes, and traction control lets BMW push the envelope. Take the new SMG gearbox, which in its latest version allows M5 drivers to shift gears within 60 milliseconds. The gearbox inspired engineers at BMW's group R&D center to develop slightly slower but more affordable incarnations for some of BMW's conventional 5- and 6-Series models. And M engines–hand-built by 100 specialists using sophisticated racing technologies such as ultralight valves and high compression–are often the precursors of other BMW engines. "The BMW group must follow different routes in the high-volume segment, not least because of pressure on costs," explains Burkhard Goschel, the BMW board member responsible for M. "But at M, we can demand more, both in terms of technology and price. And we can offer our technical achievements to other products on a top-down basis."

The M version of the Z4 coupe is among the next products in the pipeline. And rumor has it the new 1-Series compact–successful in Europe but so far absent from American driveways–may be about to get the M treatment. And what about the other end of the range, the luxury 7-Series saloon?

"Our board of directors says we mustn't touch the 7 series," says Löcker, "although we would like to do something. . . ." But exactly what is lost in the thunder of his V10 engine.

Ian Wylie (london@fast company.com) writes for Fast Company from London.