NEW YORK — The media company that owns MTV, Nickelodeon and Paramount Pictures said Wednesday that it will now advertise online through Microsoft Corp. as part of a larger deal.

NEW YORK — The media company that owns MTV, Nickelodeon and Paramount Pictures said Wednesday that it will now advertise online through Microsoft Corp. as part of a larger deal.

The five-year deal, whose financial terms weren't disclosed, is a victory for Microsoft's online ad-serving platform called Atlas, which it acquired in May — and a loss for DoubleClick, Viacom Inc.'s former online ad server, which is being acquired by Microsoft rival Google Inc.

The deal also includes agreements for Microsoft to license video programming for its MSN online network and Xbox 360 gaming console.

Viacom has sued Google for $1 billion, saying its video-sharing site YouTube committed widespread copyright violation by hosting a huge number of clips from Viacom-owned shows, such as Comedy Central's "The Daily Show with Jon Stewart."

Google says it has complied with copyright law by removing any offending videos once it was notified of them.

Microsoft, a relatively late entrant to the online advertising arena, has moved aggressively to sign up clients for Atlas, which was part of a holding company called aQuantive Inc.

In a sign of how badly Microsoft wanted to get into the business, it paid $6 billion in cash for aQuantive, amounting to a premium of 85 percent.

In recent months, Atlas and Microsoft have signed dozens of other online ad clients, including CNBC.com, the Web site of the financial news cable channel owned by General Electric Co.'s NBC Universal unit, and Digg Inc., a reader-powered news site.

As part of Microsoft's deal with Viacom, Microsoft agreed to buy advertising on Viacom's various video and online networks and to cooperate on promotions for award shows on Viacom's MTV Networks and BET Networks.

Amounts of advertising to be purchased weren't disclosed.