FORTUNE – The iPhone has been, by many measures, one of the most successful products in business history. Nearly 200 million iPhones have been sold in four and a half years, 37 million of them in the last three months of 2011. Apple’s market cap has soared from $104 billion in June 2007, when the first iPhone was sold, to $480 billion today.  No doubt, the iPhone is a revenue machine. Last quarter, it generated $24.4 billion in revenue for Apple AAPL , greater than the $20.9 billion Microsoft MSFT made in all of its various businesses. It is, to say the least, obscenely profitable: iPhones make up 75% of the profits of cell-phone makers, despite being only 9% of all units shipped.  Less visible in such soaring statistics, is the impact on the mobile carriers. Even with the heavy subsidies phone companies must pay to Apple and some five years after its introduction, the iPhone may well be the best thing going for the mobile industry.  Even though AT&T T has lost its exclusive status with the iPhone, it’s likely to keep fighting for iPhone customers. According to Hudson Square Research, iPhone users have a net present value — a measure of cash flows over a product’s lifetime — that is twice as high as subscribers using the old, clamshell feature phones.  MORE: Apple just doubled its addressable market in China  The smartphone, as conceived by Apple, seems designed to generate carrier fees. Unlike the standard feature phones, which are primarily used for phone calls and text messages, iPhone users also pay for wireless data connections. AT&T has raised data fees and introduced costlier tiers for heavy users. And many users find they are making fewer phone calls, even though their monthly phone rates are remaining steady.  That’s all true for other smartphones too, of course. But more than any other device, the iPhone is responsible for inspiring all those categories of fees — voice, texting, data — as well as the class system of data usage. By influencing the look and operability of other Google (GOOG) Android and other smartphones, the iPhone had a broader impact on the wireless industry as a whole. “We believe that without the iPhone, the wireless industry would look very different today — smartphones would still be a niche product, average revenue per user would be about $15 lower, and the service would be mostly commoditized,” Hudson Square analyst Todd Rethemeier recently wrote.  For Sprint S , which began selling the iPhone 4S last fall, the iPhone has been something close to a lifeline. In the fourth quarter of 2011, the iPhone helped Sprint see a net gain of 161,000 subscribers, well below AT&T’s net gain of 717,000 and Verizon’s 1.2 million but the first quarter of net gains in a year. Sprint said 40% of customers buying iPhones were new, perhaps drawn by its unlimited data plans.  Sprint’s CEO Dan Hesse has been vocal about the importance of having an iPhone among the company’s smartphone offerings. “Having the ability to sell the iPhone removes the number one reason people had churned in recent years,” Christopher Larsen, a Piper Jaffray analyst wrote after a meeting with Hesse. “It is also important to have for the customers who remained at Sprint knowing that the carrier would one day carry the device.”  MORE: Intel’s (latest) mobile comeback  But there’s a catch. AT&T is down 26% from the day it started selling the iPhone. Sprint is down a depressing 52% since it began selling the iPhone. And Verizon VZ , (buttressing the adage that single-letter tickers are bad luck for stocks these days) is up 8% since it began selling iPhones a year ago.  And herein lies the double-edged sword of the iPhone for carriers. Apple earns its fat profit margin largely because people love the iPhone, but also because of the subsidies it wrings from carriers — by some estimates 40% higher than those of other smartphones. And all carriers, Verizon, Sprint and AT&T, are investing heavily in LTE networks to accommodate the next generation of high-bandwidth smartphones.  So yes, analysts are bullish on Sprint because it’s stemming the flow of subscribers who crave an iPhone. But they are also concerned that subsidies and other expenses of network investments will easily cost Sprint $15 billion over the next four years. And yet Sprint doesn’t have any choice but to spend that money. Because it could die without the iPhone.  It’s not just Sprint who lives by that double-edged sword. A report this week from Morgan Stanley said AT&T’s profit margins fell to 28.7% from 37.6% a year earlier, thanks largely to the subsidies it must pay to Apple for selling millions of iPhone 4S’s. And even Verizon’s margins fell to 42.2% in the most recent quarter from 47.5% in the same period.  MORE: Nielsen: 66% of Americans ages 24-35 own a smartphone  The costs of subsidies and LTE networks are so weighing on AT&T that it’s looking to shed off its non-core assets, like wired lines in rural areas. They are still profitable, but will eat into profit margins as each quarter passes.  You might ask why Verizon’s profit margin is so much higher than AT&T’s (let alone Sprint’s, which posted an operating and net loss last quarter). That’s because the subsidies that Verizon has negotiated with Android device makers gives it between $100 an $200 more per device than the iPhone does.  But even Verizon knows it can’t thrive without the iPhone. Thanks to Google and Samsung and Research-in-Motion RIMM , there are some great alternatives to the iPhone. But buying them doesn’t save you any money. Buy an iPhone on Verizon and your money goes to Apple. Buy an Android phone, it goes to Verizon.  And judging from the reception of the iPhone 4S, this smartphone is the consumer’s choice for now. If you’re a mobile carrier, you have to sell it. If you do, the iPhone will be your ticket to the future. But it’s going to cost you.
Apple's iPhone almost singlehandedly saved AT&T and Sprint. But it come at a steep price, one that the mobile carriers will be paying for years.