SEATTLE (Reuters) - Microsoft Corp (MSFT.O) beat out Google Inc (GOOG.O) on Wednesday in a battle to invest in socializing Web site Facebook, agreeing to pay $240 million for a 1.6 percent stake in the Web phenomenon. Microsoft also clinched exclusive rights to sell ads on Facebook outside of the United States as part of the investment that valued Facebook at $15 billion -- on par with the market capitalizations of retailer Gap Inc. (GPS.N) and hotel chain Marriott International Inc. (MAR.N) Analysts said Microsoft paid a steep price on a bet that the three-year-old company would be able to transform itself into a hub for all sorts of Web activity. "The only way this works is if Facebook becomes sort of the users' operating system on the Internet -- everyone logs into Facebook every day to get in contact with their friends and use a multitude of future applications that will be developed for it," said Morningstar analyst Toan Tran. Facebook, a social network that lets friends share information, allows outside developers to create games and other applications for its site. The popularity and depth of knowledge Facebook has about its users makes it valuable to companies like Microsoft and Google which want to sell advertising targeted to individual preferences. Founded in 2004 by Harvard student Mark Zuckerberg, Facebook said it registers 250,000 new users a day, 60 percent of whom come from outside the United States. Kevin Johnson, president of Microsoft's platform and services division, said the $15 billion price tag for Facebook is based on Microsoft's belief that the site could eventually reach 300 million users, who can be targeted for advertising. It has nearly 50 million today. "You combine the number of users with the monetization opportunities and you can figure out a fairly modest average revenue per user per year and you can very quickly get to this level of valuation," Johnson said in a conference call with analysts and reporters. Microsoft has stepped up efforts to be a player in the $40 billion market for online advertising, which the company expects to double in size within three years. It paid $6 billion to acquire digital advertising firm aQuantive in August. Under the Facebook deal, Microsoft would be the exclusive third-party advertising platform for Facebook extending a previous deal for Microsoft to sell banner advertising next to Facebook member profiles in the U.S. until 2011. GOOGLE VS. MICROSOFT Google and Microsoft, now rivals for Internet-based audiences and applications, have butted heads before for Internet properties. Google beat Microsoft with a $1.65 billion acquisition of online video sharing site YouTube last year. Forrester Research analyst Charlene Li said that Microsoft was a better strategic fit for Facebook, since it knew how to work with software developers and build computing environments -- such as its Windows operating system. "Microsoft is a company that knows how to build platforms, knows how to develop relationships with developers. Microsoft developed the network that is the biggest, most vibrant one out there," she said. "Google didn't bring as much to the deal." Facebook opened its doors to users beyond an original base of college students a year ago. It also opened the doors to outside developers and there are tens of thousands of developers writing Facebook applications, the company said. Microsoft was one of many suitors looking to participate in its latest round of financing, said Facebook Vice President Owen Van Natta. The funds will go toward doubling the company's staff over the next year and other growth initiatives. Google Co-founder Sergey Brin told a meeting with Wall Street analysts at the company's Silicon Valley headquarters that his company could partner with important Web sites. "We don't feel, at a higher level, that we need to own every successful company on the Internet," said Brin, who later told reporters that Microsoft may have overbid. Google has a multi-year deal with MySpace (NWSa.N), the largest social network, to provide search and advertising alongside MySpace's 110 million user profiles. Eric Schmidt, Google's CEO, told reporters that its pact with MySpace is performing better than originally expected. Shares of Microsoft rose slightly to $31.55 from a Nasdaq close of $31.25, while Google ticked down to $674.50 from a close of $675.82.