A total of 51.9 million people watched at least 15 minutes of the BBC's Olympic broadcasts during the fortnight-long contest, making it probably the country's biggest national TV event.
Sunday's closing ceremony – featuring performances by acts such as Take That and the Spice Girls, plus Scots Annie Lennox and Emeli Sande – drew a peak of 26.3 million viewers on BBC1 and across the BBC's digital channels.
An average of 23.2 million people were tuned in during the three hour-plus show – created by artistic director Kim Gavin, amounting to four-fifths of TV viewers.
It was a whisker away from the 23.4 million who watched the opening ceremony, put together by movie director Danny Boyle, a fortnight earlier. The figure for Boyle's acclaimed extravaganza now includes an extra million digital viewers the BBC initially failed to include.
The event culminated in a breathtaking fireworks display and the Olympic flame being extinguished. It set a new audience record for Olympic closing ceremonies, easily outstripping the previous high of 11 million for Barcelona in 1992.
The figures crown a series of huge audience numbers achieved during the Games, for the ceremonies and the events themselves.
The biggest blockbuster event during the London 2012 fortnight was Usain Bolt's triumph in the 100 metres final a week ago, with 20 million tuning in, while 17.1 million watched Mo Farah take the 10,000m gold.
Tom Daley's bronze-winning performance during the 10m platform final on Saturday night pulled in 15.9 million.
BBC1 controller Danny Cohen said: "It has been an absolute privilege to broadcast the London 2012 Olympics on BBC1.
"It's been a phenomenal Games and Team GB's amazing achievements have helped draw huge audiences to BBC1 and put the channel right at the heart of the action.
"We've had fantastic feedback about the quality of the BBC's coverage and all the teams involved deserve huge thanks and praise."
The closing ceremony also featured Ed Sheeran covering Pink Floyd's Wish You Were Here, with a high-wire artist above the stadium recreating the cover image for the band's 1975 album. Annie Lennox, George Michael, Madness and One Direction were also among the performers.
Meanwhile, London Mayor Boris Johnson said yesterday he was sad and relieved the London Olympics were over as he claimed they had been "the greatest Games ever".
He said he had felt a "momentary mad desire" to refuse to hand back the Olympic flag during last night's closing ceremony.
"If you were to say to me we have just held the greatest games ever in Britain, I would say you are on the right track," he said.