Microsoft Corp said on Wednesday it would pay $240 million for a minority equity stake in Facebook in a deal that values the social networking Web site at $15 billion.

The world's largest software maker was bidding against Google Inc. for a stake in Facebook and the right to sell advertising for Facebook outside of the United States.

Microsoft said it would be the exclusive third-party advertising platform for Facebook, one of the hottest properties on the Internet with more than 47 million users.