Viacom Inc's quarterly revenue and profit rose, beating estimates, due mainly to the success of the Paramount film Transformers: Dark of the Moon.

Viacom, the company behind MTV and Paramount Pictures, also announced on Thursday that it expanded its stock repurchase program to $10 billion from $4 billion and said it expects to complete the buyback in two years.

Total revenue for the fiscal fourth quarter ending September 30 grew 22 percent to $4 billion, ahead of analysts' average forecast of $3.75 billion according to Thomson Reuters I/B/E/S.

Shares of Viacom climbed 6.4 percent at $42.88 late Thursday afternoon.

However, Viacom's advertising revenue growth. which analysts have been watching closely, weakened from quarter to quarter.

A few weeks before Viacom's fiscal fourth quarter ended September 30, the company revised its ad growth outlook for the period to high single digits from double digits. Investors worried that advertisers were slashing budgets in response to the economy.

Advertising revenue at Viacom's cable networks, which includes MTV, Comedy Central and Nickelodeon, rose 7 percent both in the United States and worldwide during the quarter.

That lagged the third quarter, when the company reported a 14 percent increase in worldwide ad revenue, and 12 percent growth in the United States.

However, Viacom Chief Executive Philippe Dauman shed more light during a call with analysts explaining the setback in ad growth had to do in part with a ratings decline at Nickelodeon and more widely at some of its networks that show reruns.

Dauman disclosed that Viacom is working with Nielsen Holdings, the dominant firm that provides TV ratings used to set ad rates, to hash out an inexplicable drop in Nickelodeon ratings during a period in September. That is a key month for back to school and pre-holiday advertising -- important categories for the network behind SpongeBob SquarePants.

Let's just say we wouldn't have had any conversation based on the set top box data, Dauman said about the difference in the numbers Viacom tracked.

He also cited softness in volume in the scatter market or commercial time that is bought at the last minute but that pricing for ads remains strong.

There's more to it than just a ratings calculation issue at Nielsen. It's a head-scratcher, said Robin Diedrich, an analyst with Edward Jones.

Still, she said that advertising revenue otherwise was solid.

Given the overall skittishness in consumer sentiment, Viacom's advertising revenue held up, said Benchmark Co analyst Fred Moran. The softness around Nickelodeon and overall scatter market in a relatively cautious advertising environment is not of grave concern, he said. We think the trends in both networks and entertainment are strong and sustainable.

Meanwhile, media conglomerates Time Warner and News Corp were lifted by advertising dollars directed at its cable networks during the same quarter.

It was Viacom's filmed entertainment unit Paramount Pictures, where revenue increased 46 percent to $1.79 billion, that helped push the numbers up.

Revenue at its cable networks grew 8 percent to $2.3 billion.

Viacom said that for the fiscal year, it had repurchased 55.7 million shares for $2.5 billion. It had $7.2 billion remaining in its buyback program as of November 9.

Excluding special items, the company earned $1.06 per share, beating analysts' average estimate of $1.02.

(Reporting by Jennifer Saba; Editing by Derek Caney, Maureen Bavdek, Matthew Lewis and Richard Chang)