SAN FRANCISCO — Setting the stage for a possible bidding battle, Microsoft Corp. is mulling an investment in Facebook Inc. that would value the rapidly growing online hangout at $10 billion or more, according to a report published Monday.

SAN FRANCISCO — Setting the stage for a possible bidding battle, Microsoft Corp. is mulling an investment in Facebook Inc. that would value the rapidly growing online hangout at $10 billion or more, according to a report published Monday.

Citing unnamed people familiar with the matter, The Wall Street Journal said Microsoft is holding preliminary discussions that could culminate in a $300 million to $500 million investment in Facebook, a Palo Alto social-networking site founded just 31/2; years ago.

In exchange for the money, Redmond, Wash.-based Microsoft would receive up to a 5 percent stake in privately held Facebook, which has previously raised nearly $41 million from venture capitalists and other individual investors.

Facebook declined to comment on the reported discussions as did Microsoft, which branded the report as "rumor and speculation."

An outright sale of Facebook is considered unlikely. Mark Zuckerberg, Facebook's 23-year-old co-founder and chief executive, has repeatedly expressed his desire to remain independent. He rejected a $1 billion acquisition offer from Yahoo Inc. last year.

Facebook also has been exploring whether to raise more money from venture capitalists to help expand its current payroll of roughly 300 employees and finance other parts of its ambitious expansion plans.

With more than $100 million in annual revenue, Facebook is believed to be a prime candidate for an initial public offering of stock next year or in 2009.

If Facebook's talks with Microsoft heat up, it could draw online search leader Google Inc. to the negotiating table, too.

"Google would love to keep it out of the hands of Microsoft or at least drive up the price," said Forrester Research analyst Josh Bernoff.

Two years ago, Microsoft and Google vied against each other to buy a 5 percent stake in Time Warner Inc.'s AOL, with Google ultimately prevailing by agreeing to invest $1 billion into the company as part of a wide-ranging advertising partnership.

Microsoft already is delivering online ads to Facebook in the United States as part of an agreement that expires in 2011. Citing unnamed sources, the Journal also reported Microsoft and Facebook are considering extending the current contract and expanding the advertising to other parts of the world.

Already a popular online hangout among teens and adults, Facebook has broadened its appeal during the past year by allowing people of all ages to set up personal profiles on the site and making it easier for other Internet companies to run their applications on its users' pages.

By building its own computing platform, Facebook has emerged as more a threat to Microsoft, Bernoff said. Investing in Facebook is one way for Microsoft to hedge its bets, he said.

With about 42 million active users, Facebook ranks as the Web's second most trafficked social network behind News Corp.'s MySpace.com.

Now, it appears some of the biggest names on the Internet are vying for a piece of the action.

Having been rebuffed by Facebook, Yahoo is testing a new social service called "Mash" and recently struck a deal to deliver ads in England and Ireland to the social network Bebo. Meanwhile, the blogosphere is buzzing with speculation that Google plans to introduce new social networking products later this year.

"We're always looking for new ways to help our users connect with each other, share information, and express themselves, but we don't have any new details to share at this time," Google said in a statement provided Monday.