NEW YORK — Viacom Inc. said Friday that its fiscal third-quarter net income rose 20 percent, as it reaped more in fees for its cable TV channels and advertising revenue got a boost from improved ratings at key networks.

The New York company, which owns Nickelodeon, MTV, Comedy Central and Paramount Pictures, posted an adjusted profit that fell a penny short of Wall Street expectations, but its revenue came in higher than expected.

Executives said they expected a continued resurgence in ratings — especially at the company's Nickelodeon children's network — and announced the doubling of its current stock buyback program to $20 billion.

The company added that it plans to buy back $2 billion in shares under the expanded program over the next several months. Viacom shares, which have gained 50 percent this year, hit an all-time high of $80.93 Friday and closed up 6.5 percent at $79.17.

In a conference call with investors, Viacom President and CEO Philippe Dauman said the company continues to see ratings improvement at its TV networks, especially Nickelodeon, which has struggled recently.

"Nickelodeon is clearly on the way back with new live action and animated hits that fuelled robust ratings," Dauman said.

Dauman also pointed to Viacom's recently struck distribution deal with Amazon.com and the box office success of the Paramount Pictures films "Star Trek Into Darkness," "World War Z."

Sterne Agee analyst Vasily Karasyov called the results "Very encouraging" and backed his "Buy" rating for the stock. He noted that the company posted its highest U.S. advertising growth rate since the fourth quarter of fiscal 2011, which will make short-term investors happy, while the increased stock buyback program will please value-oriented investors.

But Moody's Investors Service was less enthusiastic about the increased stock buyback and cut Viacom's senior unsecured ratings to "Baa2" from "Baa1." It noted that the move will increase the company's debt.

For the quarter ended June 3, Viacom earned $643 million, or $1.31 per share. That's up from $534 million, or $1.01 per share, in the same quarter of 2012.

Excluding discontinued operations and one-time items, Viacom earned an adjusted $1.29 per share for the latest quarter. Analysts polled by FactSet expected $1.30 per share.

Revenue increased 14 percent to $3.69 billion from $3.24 billion. That topped analysts' expectations for $3.57 billion.

Viacom said revenue at its media networks business increased 13 percent to $2.57 billion, boosted by a 26 percent jump in global affiliate revenue that stemmed from both digital distribution agreements and rate increases.

In early June, the company struck a licensing agreement with Amazon.com Inc., giving it exclusive online rights to key Viacom programming, including episodes of Nickelodeon's "Dora the Explorer," after Viacom couldn't come to terms on a larger, omnibus deal with Netflix Inc.

Excluding digital distribution agreements, which are affected by the timing of available programing, domestic affiliate revenue rose in the "high-single digits," Viacom said.

Domestic advertising revenue increased 6 percent, helped by higher ratings, while worldwide advertising revenue rose 5 percent.

Dauman noted that Nickelodeon posted an 11 percent jump in ratings for its core demographic, while also getting a boost from the addition of some shows aimed at preschoolers that previously aired on its Nick Jr. network.

For the current quarter, Dauman said the company expects to see continued sequential improvement in advertising revenue growth.

Revenue at the company's filmed entertainment business, increased 15 percent to $1.16 billion, as global theatrical revenue jumped 64 percent to $464 million, helped by the releases of the movies "Star Trek Into Darkness," "World War Z" and "Pain and Gain," along with continued strong ticket sales of other movies released in the second quarter.

But operating income at the business dropped 63 percent to $17 million, pulled down by higher film distribution costs.