Ryan Lochte

Thanks  in part to Ryan Lochte's gold medal win, the first night of Olympic competition in London became the most-watched summer Olympics opening night on record, NBC announced Sunday.

An average of 28.7 million viewers tuned in for the opening night, nine million more viewers than Athens'opening night in 2004 (19.8 million) and nearly 5 million more than Beijing in 2008 (24.0 million).

London Olympics opening ceremony scores ratings high

The numbers bring NBC's two-day average to 35.6 million viewers, the best start to a summer Olympics on record.

The Danny Boyle-directed opening ceremonies of the London Olympics on Friday was a ratings juggernaut for NBC, receiving the highest overnight rating for a non-U.S.-based Olympic opening ceremony ever. In all, an average of 40.7 million people watched NBC's programming, according to Nielsen. This landed London at 7 percent higher than Beijing's, 28 percent higher than Athens', 24 percent higher than Sydney's and 15 percent higher than Vancouver's Game openers.

Don't miss any of your favorite Olympic events! Add "2012 Summer Olympics" to your Watchlist now.