"It's No 1, it's top of the pops." With those words, DJ Jimmy Savile opened the BBC's new pop music show on New Year's Day 1964 and launched a series that became a TV institution which looked like running forever.

But times change, viewers grow up and ratings plummet. The BBC tried to stop the decline - but not very hard, it appeared at times - by shifting the show's time slot and even channel, exiling it to BBC2.

With viewing figures slipping from nineteen million in September 1979 to around the one million mark these days, BBC bosses decided to pull the plug on the show, blaming competition from 24-hour music channels and the Internet for its demise.

Top Of The Pops ends tomorrow after an amazing 42-year run. Savile (now Sir Jimmy) will return with Tony Blackburn, Janice Long and Mike Read to present the final show.

The Rolling Stones, in archive footage of The Last Time, will open the final show as they did the first one, transmitted live from a converted church in Manchester.

Dusty Springfield, Dave Clark Five, The Hollies and the Swinging Blue Jeans also appeared in the studio. Cliff Richard & The Shadows and Freddie & The Dreamers were on film, as were The Beatles, who played the week's chart-topper, I Want To Hold Your Hand.

Not everyone has been content to let TOTP die quietly. Pulp's Jarvis Cocker is sad to see it go. "It wasn't just a massive bit of people's childhood, but a big impetus behind forming a group, 'one day we'll be on Top Of The Pops'," he says.

Dave Lee Travis, the former Radio One DJ now presenting a North-East Saturday morning show on Magic 1152, has been critical of the axing of "a great brand, a simple but effective format".

"It was quite simply the only place you could get to hear all the top bands and top sounds of the day in one place in one show," he says.

"But for the kids, who it's basically aimed at, you are these days 'peeing in the wind'. They have computer games, iPods, texting, downloads, and to try to grab their attention for five minutes is just impossible.

"I look back at it with affection. If you look at any TOTP we did, everyone is having fun and it showed. Now the music industry is taking itself too seriously."

TOTP was originally commissioned for just six shows but this was the Swinging Sixties and young people, with money and power for the first time, adopted it as their own show. They hadn't seen anything like it before.

In 1967, the show moved from Manchester to Lime Grove in London. The same year Pan's People made their dancing debut. Their skimpy costumes and sexy routines became part of the TOTP legend. They were replaced by Ruby Flipper, Legs & Co and Zoo before dance troupes were phased out in 1983.

The 1,000th show was broadcast in 1983 and not until four years after that did ITV attempt to take on TOTP with The Roxy, made by Tyne Tees Television in Newcastle. But the newcomer failed to catch the public imagination and soon faded from the scene.

The writing has been on the wall for TOTP for some time, with a series of revamps aimed to boost viewing figures. In 1991, new producer Stan Appel ruled that acts must sing live. Five years later the BBC moved the show in direct competition with Coronation Street on ITV.

Sunderland-born Chris Cowey, who'd worked on C4's The Tube, took charge as executive producer in 1997, beginning the process of branding and selling the show around the world. He saw TOTP through its 2,000th show in 2002 before handing over the reins to former children's TV presenter Andi Peters the following year.

He, too, unveiled a new look TOTP but failed to halt the audience decline, resulting in the show losing its BBC1 place two years ago. Since then it's been languishing in a Sunday evening slot where ratings have dropped from three to little more than one million.

All that will remain after Sunday will be the facts and figures, like the statistic that the show's been fronted by 65 presenters, and that doesn't count the many guest presenters in the mid-90s. There have been ten different theme tunes and 13 different logos and opening sequences.

Cliff Richard holds the record for the most appearances, appearing almost 160 times. Status Quo have performed over five decades of the show's history in the 60s, 70s, 80s, 90s and 2000s.

R Kelly holds the record for the number of security guards to accompany him - a studio-filling 43 people. The record for the most people on stage goes to Fat Les when they squeezed 75 people on stage to perform Jerusalem.

The show has been transmitted to over 120 countries. And the final episode of Top Of The Pops on Sunday will be the 2,204th edition.

* Top Of The Pops - The Final Countdown: BBC2, Sunday, 7pm, followed by Top Of The Pops: The True Story, 10pm, and Pan's People: Digging The Dancing Queens, 11.10pm.