MOUNTAIN VIEW, CALIF. — Microsoft Corp. emerged Wednesday with a rare triumph over archrival Google Inc., winning the right to invest in Facebook Inc. in a deal that valued the social networking upstart at a staggering $15 billion.
Microsoft is betting that online social networking is the marketing platform of the future, letting advertisers narrowly target their brands to people who group themselves around such affinities as the Lakers or French cooking.
Best known for its Windows and Office software, Microsoft is trying to become an advertising giant by snapping up Web marketers and partnering with fast-growing sites such as Facebook, which now boasts nearly 50 million active users.
Facebook was founded in a Harvard University dorm room less than four years ago. Now No. 2 in social networking sites behind MySpace, it has become the tech debutante of the year -- the hottest company inside the hottest Internet trend.
The company attracts as much Silicon Valley attention as search-engine king Google itself, largely because Facebook allows thousands of programmers to add features that help its users update one another on their every move and thought.
The investment should make it easier for Facebook to recruit staff, buy smaller companies or sell shares to the public.
"This gives Facebook the war chest to compete against whoever might show up to claim what now clearly seems to be their birthright: to be the dominant social operating system in the United States, Canada, the United Kingdom and most of Europe," said Lee Lorenzen, a venture capitalist in Monterey, Calif., who invests only in companies that create Facebook programs.
Microsoft, based in Redmond, Wash., is generally regarded around Facebook's current base of Palo Alto as being about as hip as Mr. Rogers. But that may have worked in its favor in outmaneuvering Google, the Web giant that has bedeviled it: Facebook has been poaching technology talent from Google, and there is some tension between the two, making Microsoft a less threatening investor.
"Talented people want to be where they can make a difference," Mark Zuckerberg, Facebook's 23-year-old chief executive, said of the recruiting war during an interview last week. "We have a culture focused on building things."
As part of the deal, Microsoft gets to keep selling the banner ads that appear on Facebook pages in the U.S., and it won the right to sell ads internationally.
Google is less than a decade old but is already used to being the biggest player in town. It wanted a bigger stake in Facebook than Microsoft was willing to settle for -- as much as 10% to 15% of the privately held company's shares, according to two people involved in the process.
Google also wanted to influence Facebook's business strategy and to terminate a year-old deal under which Microsoft sold banner ads that appeared on the social networking site.
Microsoft, the world's largest technology company, isn't usually described as humble, but in this case it was willing to let Facebook be Facebook. In the end, Microsoft agreed to spend just $240 million -- about as much cash as it generates in a week from its software -- in exchange for a 1.6% stake.
"Facebook wanted to play for the future, and on their own path, and grow organically," said one participant in the deal process who, like the others, requested anonymity because the talks were confidential.
Such confidence has been a hallmark of Facebook's style for some time. Zuckerberg, who helped start the company in 2004 while a Harvard undergrad, rejected a reported $1-billion offer for the whole company from Yahoo Inc. last year.
Zuckerberg, whose 20% stake is now worth $3 billion, said last week that a stock offering was years away.
Facebook, which employs fewer than 400 people, is the sixth-most-visited site on the Web, according to research firm ComScore Networks. The majority of its users are now overseas.
The young firm was a natural prize for Microsoft because the world's largest software company is scrambling to catch up with Google. This year Microsoft spent $6 billion -- more than three times as much as the 32-year-old company had ever spent on a takeover -- to snap up digital marketing firm Aquantive Inc. so it could better target ads.
"I don't think they can take the Windows franchise much further," Citigroup analyst Brent Thill said. "The online segment is clearly the biggest opportunity at the company, and it's the smallest percentage of revenue to date. For the first time in five years, they've actually articulated a strategy that makes sense."
The real payoff might not be in simple banner-ad revenue, analysts said. Facebook is expected to sell just $125 million in advertising this year, according to research firm EMarketer, far less than the $525 million expected at MySpace. Rupert Murdoch's News Corp. acquired MySpace's parent company in 2005 for $580 million, which has proved an incredible bargain.