Joe McElderry has been crowned winner of X Factor 2009 after beating fellow contestant Olly Murs in the final.

The 18-year-old from South Shields – who had been the hot favourite to take the title – wins a record contract worth £1m.

His debut single The Climb, a cover of the Miley Cyrus song, will be available to download from midnight on Sunday and released in shops on Wednesday.

Essex boy Olly Murs finished in second place, while Stacey Solomon finished third after being voted out on Saturday night’s show.

Joe shrieked and hugged his mentor Cheryl Cole upon hearing the news, but was ultimately speechless.

“I can’t actually speak,” he said. “I just want to say thank you to Cheryl, she’s been an amazing mentor, and to everybody at home who’s voted for me, I appreciate it.”

And Cheryl agreed. “I’m feeling over the moon, the right person won,” she said. “Joe I’m so proud of you.”

Olly, meanwhile, accepted his defeat graciously. “I’m massively proud of myself, and Joe’s been phenomenal every week,” he said, “he deserves it.”

Joe’s victory means that Cheryl is the show’s winning mentor for the second year running. She also mentored 2008’s champion Alexandra Burke.

More than 10 million viewers are reported to have voted in Sunday’s show.

The show also featured performances from former winners Leona Lewis and Alexandra Burke, who duetted with last year’s runners-up JLS. And this year’s other finalists appeared in a group routine, performing Take That’s Never Forget.

Music legends George Michael – who had duetted with Joe on Saturday night’s show – and Sir Paul McCartney also performed, with the latter singing The Beatles classic Drive My Car and the Wings hit Live And Let Die and winning a standing ovation from the judges. “You’re through to the next round,” Simon joked.

Earlier in the show, both Olly and Joe performed their favourite song from the series, with Olly opting for The Beatles‘ Twist and Shout, which he originally sang on movies night.

“You’re a born showman,” Louis told the 25-year-old, while Simon described him as “fearless”.

Joe, meanwhile, chose to sing the Journey hit Don’t Stop Believin’ which he originally performed on the show’s rock week – and once again won warm praise from the judges.

“You’ve had an incredible series,” Simon told him, “and tonight – brilliant. You would have a hit record with that song, it was that good.”

Both of them also performed the single The Climb, with Dannii describing Joe’s performance as “effortless” and Simon saying that the competition was “now too close to call”.

And ahead of the result Cheryl recalled her own big break, as a winner of the ITV1 show Popstars The Rivals.

“I’ve lived the dream,” she told Joe, “now I just want to see you live yours.”