Software giant Microsoft has beaten Google in the clash over who gets a stake in social networking website Facebook.

Microsoft's new deal with Facebook means that it now owns 1.6 per cent of the business after having paid $240 million (£117 million).

Microsoft also has the sole rights to sell ads on Facebook outside of the US. This puts the value of the deal up to $15 billion (£7.3 billion).

Analysts believed the reason that Microsoft has invested in Facebook, founded in 2004, is that it wants to develop it into a hub of all kinds of internet activity.

'OS on the internet'

"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," Morningstar analyst Toan Tran told Reuters.

The popularity of Facebook and the kind of information it stores about its users makes it attractive to firms like Microsoft and Google that wants to target ads towards particular user groups. Facebook says about 250,000 people join the service every day. It currently has almost 50 million users.

Microsoft said it believes that Facebook could reach around 300 million users in the future.

Microsoft pipped Google to the post this time around, but Google won the coveted $1.65 billion (£805 million) deal with YouTube last year. It also has a deal with MySpace.