Television networks needed a hit, and Barack Obama gave them one.

An infomercial on behalf of Mr. Obama was a smashing ratings success on Wednesday night, proving to be more popular than even the final game of the World Series  and last season’s finale of “American Idol.” The audience for Mr. Obama’s program far exceeded the expectations of television executives  and many political pundits who questioned whether Mr. Obama was engaging in overkill in buying a half hour on so many networks.

Mr. Obama’s 30-minute commercial, which played on seven networks, broadcast and cable, was seen by 33.55 million viewers, according to figures released by Nielsen Media Research. On the three broadcast networks that carried the special, the audience totaled more than 25 million, easily surpassing the number for the last World Series game on Fox, which averaged 19.8 million viewers. The special was also available on Univision, and three cable networks, MSNBC, BET and TV One.

“I was shocked by the number Obama was able to draw,” said Leslie Moonves, the chairman of CBS. “It’s just a stunning number.”

On CBS, the infomercial was seen by about 8.6 million viewers, a number that topped the show CBS usually runs on Wednesday night at 8, “Old Christine,” which averages about 7.2 million.