Amazon.com said on Wednesday that it has reached a deal to buy online shoe retailer Zappos.com Inc for $927.9 million, mostly in stock, as the world's largest online retailer, known for its electronics and books, moves aggressively into shoes and apparel.

Zappos, which had about $1 billion of gross merchandise sales last year, is known for its attentive customer service and free shipping. It said the deal will allow it to continue running its business as it always has.

Amazon, which started as a bookseller and ran sites for big retailers like Target Corp, has moved toward carrying everything on its own site in recent years, while also operating a thriving business that allows other companies to sell to its customers through its site.

That has enabled it to challenge eBay Inc, the leading online auctioneer.

A big part of the reason why Amazon is interested in us is because they recognize the value of our culture, our people, and our brand, said Zappos Chief Executive Tony Hsieh in a letter on its blog. Their desire is for us to continue to grow and develop our culture (and perhaps even a little bit of our culture may rub off on them).

An irreverent company, Zappos's website calls its executives monkeys and Hsieh joked in his letter that the deal's headline should read Zappos and Amazon sitting in a tree ..., a reference to a nursery rhyme.

Stephen Ju, an analyst with RBC Capital, said the deal makes sense culturally as both online retailers are very customer-service oriented.

The acquisition is slated to close this autumn, and Amazon said the Zappos management team will remain intact.

Amazon said it will acquire all of the outstanding shares of Zappos and assume its outstanding options and warrants in exchange for approximately 10 million shares of Amazon common stock. It will also provide Zappos employees with $40 million of cash and restricted stock units.

Based on Amazon's closing price of $88.79, the deal values the deal at about $927.9 million.

Zappos was founded in 1999, according to its website, and it now has more than 1,300 employees. It stocks more than 3 million shoes, handbags, clothing items and accessories from more than 1,136 brands.

Morgan Stanley, and Fenwick & West advised Zappos on the deal. Lazard Ltd advised Amazon.

(Additional reporting by Alexandria Sage; Editing by Gary Hill and Steve Orlofsky)