Rock band Rage Against The Machine have won the battle for this year’s Christmas No 1 against X Factor 2009 winner Joe McElderry.

The band’s single Killing In The Name – which was at the centre of a Facebook campaign to prevent yet another X Factor winner scoring the Christmas chart-topper – sold 500,000 downloads, beating McElderry’s debut single The Climb by 50,000 copies.

The track originally reached number 25 in the charts in 1993.

Speaking on the Radio 1 chart show Rage band member Zack de la Rocha said, “We are very very ecstatic about being number one” and praised the “incredible organic campaign” against “the sterile pop mentality”.

But despite having to be content with the number two spot in the charts, McElderry congratulated the band and praised the campaign.

“It’s been exciting to be part of a much-hyped battle and they definitely deserve congratulations,” the 18-year-old said.

“This time last year I never thought for one minute that I’d win The X Factor, never mind about having a debut single out, so I’m just delighted to be in the charts.

“It’s been such an incredible couple of months and I got the best Christmas gift I could ever have asked for in winning The X Factor.”

And despite having called the campaign “stupid” earlier in the week, even Simon Cowell accepted defeat graciously, offering his congratulations to the couple behind it, Jon and Tracy Morter.

“I am gutted for Joe because a number one single meant a lot to him but I have to congratulate Jon and Tracy, who started the Facebook campaign,” Cowell said.

“I called Jon on Saturday to congratulate the two of them that, win or lose, they turned this into a very exciting race for the Christmas No 1. I am proud of Joe – he worked really hard this week, but he has a great year ahead of him.”

HMV’s Gennaro Castaldo said it was a “truly remarkable outcome” to the race for the Christmas No 1 and described it as “possibly the greatest chart upset ever”.

“Everyone thought the momentum was with Joe going into the weekend,” Castaldo said, “but, clearly, off the radar a whole load of people were downloading the Rage track right up to the last minute as they sensed they might pull off a shock.”

The track also set two further records, becoming the first single to top the UK charts on download sales alone, as well as achieving the biggest download sales ever in a first week on the UK charts.

McElderry’s single was only released as a download following his X Factor victory last Sunday, before being made available in shops the following Wednesday.

Martin Talbot of the Official Charts Company said that the bad weather may have hampered McElderry’s chances of reaching the top spot, as people were unable to get to the shops to buy his single.

He added, “As we have seen in recent years, overhauling any X Factor winner in the race for the Christmas No 1 is no mean achievement.

“The popular support we have seen for the record this week has been truly amazing – and handed them two all-time records.”

The four previous Christmas number ones were all by X Factor winners – Shayne Ward in 2005, Leona Lewis in 2006, Leon Jackson in 2007 and Alexandra Burke in 2008.

Steve Brookstein is the only other X Factor winner so far not to have had a Christmas No 1 with his debut single.

However there was one small victory for Simon Cowell in the charts, after Susan Boyle spent a fourth week at the top of the album charts with her debut I Dreamed A Dream.