NEW YORK (Fortune) -- It was easy to scoff two years ago when word leaked out that Amazon was launching its own digital music service. The Seattle-based online retailer wasn't just mulling an iTunes-like download store - it was supposedly drawing up plans for a branded iPod-like device.

But Amazon CEO Jeff Bezos had a much better plan for a digital music offering than his naysayers realized. Ten months after its debut, Amazon (AMZN, Fortune 500) has overtaken competitors like Wal-Mart (WMT, Fortune 500) and RealNetworks' (RNWK) Rhapsody to become the second biggest online store after iTunes, according to market research firm NPD. Now two music industry sources tell Fortune that Amazon is talking to MySpace (NWS, Fortune 500) about becoming the social networking giant's download store partner when it rolls out its highly anticipated joint venture with Universal, Warner Music and SonyBMG in September.

MySpace and Amazon declined to comment on any pending deal.

Amazon still trails Apple by a huge margin. NPD doesn't release detailed market-share data, but Russ Crupnick, the firm's senior entertainment industry analyst, says iTunes still controls more then three-quarters of the Internet music store market. By contrast, Amazon's market share is in the single digits. "There is a tremendous gap between number one and number two," he says.

Even so, Amazon may have a better chance of chipping away Apple's (AAPL, Fortune 500) dominance than any of its other rivals. MySpace plans to let its 120 million users stream entire songs before downloading them for a yet-to-be-specified price. That could be a powerful sales tool for Amazon. Why go to iTunes to purchase the Justin Timberlake song you just heard on MySpace when you can buy it instantly with one click, courtesy of Amazon?

How did Amazon wind up in such a promising position after less than a year in the digital music business? Well, for one thing, it scrapped whatever plans it may have had for a branded-MP3 player. How many people do you know who would have ditched their beloved iPod for what industry wags referred to as the aPod. Sure, we all shop at Amazon. But it doesn't have Apple's cool factor. (Amazon, it should be noted, did go ahead with the Kindle, its oddly named wireless book reading gadget.)

Instead, the web retailer rolled out a download store that became the first to sell songs from four major music companies without digital rights management software, referred to in the music industry by its forbidding acronym: DRM.

Until recently, record companies insisted that digital music stories use DRM. Why? Because the software limits the number of times you can copy a song. But consumers hate it because it's such a pain in the neck.

If you were one of the few people who owned a Microsoft (MSFT, Fortune 500) Zune, you couldn't play songs purchased on iTunes. That's because Zunes were stuffed with Microsoft software, and it wouldn't play songs wrapped in Apple's DRM. iPod owners couldn't play tracks purchased from Yahoo because the portal's music store used, you guessed it, Microsoft DRM.

By the time Amazon launched its download service, it had dawned on the major labels that DRM wasn't protecting the legitimate online music business - it was stifling its growth. The retailer persuaded them to license it songs with no copy protection so they could be played on any device. "It had an enormous impact," say Sam Heyworth, group product manager for Amazon's MP3 store. "Going DRM-free really helped."

Here's another thing that helped. Amazon wouldn't have attracted many customers if it sold songs for 99 cents just like iTunes. So it cut its prices. Today, Amazon offers one-sixth of the 5.9 million tunes in its library - including the 100 most popular tracks - for 89 cents each. It sells some classic albums - like Miles Davis' "Kind of Blue" - for as little as $1.98.

It's tough for a pure-play digital music company like Napster to slash prices like that. But Amazon is betting that some of the people who buy a cheap jazz album will stick around and also purchase a $149 digital camera. "Amazon's game here is like Target or Best Buy," says Ted Cohen, managing partner of TAG Strategic, a digital entertainment consulting firm.

Sounds familiar, doesn't it? Amazon uses music to sell cameras. Apple uses it to sell iPods. Maybe the folks in Cupertino, Calif., should be a little scared. Okay, maybe not scared. Amazon still has a long way to go. But perhaps Apple should be concerned. It's finally dealing with a competitor that looks at digital music the same way it does.