The deal, revealed yesterday after several weeks of negotiation, values Palo Alto, Calif.-based Facebook at $15 billion - less than four years after Mark Zuckerberg started the online social networking site in his Harvard University dorm room.

Microsoft also will sell Internet ads for Facebook as the site expands outside the United States, broadening an existing marketing relationship that began last year.

Besides validating Zuckerberg's decision to rebuff a $1 billion takeover offer from Yahoo Inc. last year, Microsoft's money should be more than enough to pay for Facebook's ambitious expansion plans until the privately held company goes public.

Zuckerberg, 23, has indicated he would like to hold off on an initial public offering for at least two more years. Facebook hopes to become an advertising magnet by substantially increasing its current audience of nearly 50 million active users, who connect with friends on the site through messaging, photo-sharing, and other tools.

Redmond, Wash.-based Microsoft has been trying to become a bigger force in Internet advertising for several years, only to watch Google deepen its dominance of the space. In its fiscal year ending in June, Microsoft's online ad revenue rose 21 percent to $1.84 billion. Over the same period, Google's ad revenue totaled $13.3 billion.

Although News Corp.'sMySpace.com remains the largest social network, Facebook has been growing at a far more rapid clip during the past year. Facebook attracted 30.6 million US visitors during September compared with 68.4 million at MySpace. Microsoft's social networking equivalent - called "Windows Live Spaces" - attracted 9.8 million, according to comScore Inc.