BBC Radio 1 Live Lounge's charity single has replaced Captain Tom Moore at number one.
Musicians including Dua Lipa, Chris Martin, Ellie Goulding, Anne-Marie and Rita Ora lent their voices to the cover of Foo Fighters' 2003 track, Times Like These.
According to the Official Charts Company, it rose from number five with 66,000 chart sales this week, 78% of which were downloads.
The track was locked in a close battle with The Weeknd's Blinding Lights, which finished at number two, 3,000 chart sales behind.
Times Like These debuted on BBC Radio 1 and the star-studded music video aired during BBC One's The Big Night In.
Net profits from the single in the UK will be split between Comic Relief and BBC Children In Need.
The track replaced Capt Tom and Michael Ball's cover of You'll Never Walk Alone, which is raising money for the NHS.
The last time a charity single replaced another charity single at number one was in November 2014, when Children In Need's single Wake Me Up by Gareth Malone's All Star Choir was dethroned by Band Aid 30's Do They Know It's Christmas?
It is also the first Foo Fighters song to reach number one in the UK.
Lipa told BBC Radio 1: "I was really emotional when I saw the final video with all the artists and hearing everybody come together. I'm so happy that we could come together to try to support a better cause."
Foo Fighters frontman Dave Grohl said: "Humbled, with so much love for all my fellow artists and listeners. Please remember to support and donate to Comic Relief and Children In Need."
The track was produced by Grammy award-winning producer Fraser T Smith, who has worked with Stormzy, Adele and Dave.
Smith told the Official Charts Company: "To have produced this number one with the Live Lounge All-Stars means the world to me.
"Every artist stepped up to make this a truly soulful version of the Foo Fighters classic, and I want to thank the incredible Radio 1 team, DJs who have supported it, and everyone who's downloaded and streamed this song to raise so much money for all the charities, in the fight against Covid-19."
On the albums chart, Lipa's Future Nostalgia claims its third non-consecutive week at number one.