Microsoft and entertainment broadcaster Viacom have agreed to a five-year deal to share content and partner on advertising initiatives.

It's the latest agreement between content and technology companies seeking to make money by mixing premium content with advertising on the web. The two companies valued the deal at $500m.

Microsoft will have a nonexclusive licence to use TV programmes and other content from Viacom, which owns MTV Networks, Comedy Central, BET (Black Entertainment Television) and Paramount Pictures, among others. The content will appear on Microsoft's MSN website, as well as through its internet-connected XBox 360 games system.

Viacom will also use Microsoft's Atlas AdManager digital advertising technology for its US websites. The technology came from Microsoft's $6bn acquisition of aQuantive, which was completed in August. AdManager can serve graphical and video ads on Web sites and has ad reporting and management features.

Microsoft will also have an exclusive right to sell some display advertising inventory on Viacom's sites, and both companies will share the revenue.

Microsoft and Viacom previously worked together on MTV's Urge digital music store, which was closed in August after low interest.

In March, Viacom filed a $1bn suit against Google's YouTube video service for displaying clips the network owns that were posted by users without permission.