By Nandita Bose

(Reuters) - Wal-Mart Stores Inc, vying to better challenge Amazon.com Inc , will pay about $3 billion for internet retailer Jet.com and its innovative pricing software in the largest-ever deal for an e-commerce startup.

The deal disclosed on Monday follows a five-year e-commerce acquisition spree in which Wal-Mart, the world's biggest traditional retailer, has already bought 15 startups, seeking the talent and technology to make it a dominant player online and narrow the massive gap with market leader Amazon.

Wal-Mart's online division has underperformed against Amazon, posting its slowest growth in a year in the first quarter as it struggled to gain traction with consumers, especially millennials.

Jet.com was launched by internet entrepreneur Marc Lore in July 2015 and includes software that can offer a customer lower prices as they add items to their shopping cart. Wal-Mart has said it would integrate that software into its main website while keeping Jet.com as a separate entity.

"One of the things we really like (about Jet) is that the customer is even more in-charge of the price that they pay," Chief Executive Doug McMillon said on a media call.

McMillon said Wal-Mart will take time in getting the technology and design components from Jet and that they will grow both brands separately in the short-term.

"Over time, piece-by-piece, we will end up running a business that is simpler and not completely independent."

McMillon said Lore would run its new U.S. e-commerce business. Lore had cofounded Quidsi, the owner of sites like Diapers.com and Soap.com, which was sold to Amazon.

"Marc's e-commerce experience and success are obviously attractive," McMillon said.

Wal-Mart's current head of global e-commerce Neil Ashe will leave the company at the end of the fiscal year.

The decision to run Jet as an independent website is a good step because it can stay focused on growth, but the price Wal-Mart paid is high, UBS retail analyst Michael Lasser said in a note to clients.

Wal-Mart said it would pay around $3 billion in cash and $300 million in shares for Jet, with some of that paid over time. Given Jet's revenue of about $500 million, the cash purchase price represents six times Jet's revenue, according to analysts.

Moody's retail analyst Charlie O'Shea said the acquisition gives Wal-Mart a leg-up on competitors in the race to be the No. 2 online retailer, citing the size of Jet.com's online offerings and number of customers. Wal-Mart said Jet has added nearly 400,000 new shoppers monthly.

"The impact on Amazon will be fairly benign. However, this acquisition, in tandem with its joint-venture in China with JD.com, demonstrates that Walmart is attacking online retail with significant zeal," he said.

In June, Wal-Mart said it sold its Chinese online grocery store in return for a stake in JD.com Inc, China's 2 e-commerce firm.

BILLIONS SPENT ON ONLINE EFFORTS

Wal-Mart's first-quarter online sales grew 7 percent, a weaker rate than any of the four quarters just before that. In 2015, Wal-Mart's online sales rose 12.3 percent to $13.7 billion, compared with a 16 percent jump to $92.4 billion for Amazon.com.

Wal-Mart has not said what it spent on acquisitions, but prior to the Jet.com deal it disclosed a total of $3.1 billion for e-commerce and digital projects, such as its platform and new warehouses, in the four fiscal years to January 2017.

The deal should give Wal-Mart the scale to bolster its online presence, broaden its assortment of goods and offer the lowest prices at the same time, analysts said.

Wal-Mart noted Jet has offered 12 million items in its first year of operation.

Wal-Mart has said previously it wants to expand its online selection from around 10 million items to the tens of millions over the next few years. Rival Amazon has more than 200 million items for sale online.

(Reporting by Nandita Bose in Chicago, Additional reporting by Sruthi Ramakrishnan and Gayathree Ganesan in Bengaluru; Editing by Saumyadeb Chakrabarty and Jeffrey Hodgson)