Media playback is unsupported on your device Media caption Captain Tom Moore was congratulated by the previous record holder - Tom Jones

Captain Tom Moore, the war veteran who walked laps of his garden to raise money for the NHS, has become the oldest person ever to score a number one single in the UK.

At the age of 99, his duet with Michael Ball has knocked Canadian superstar The Weeknd from the top of the charts.

Their cover of You'll Never Walk Alone sold 82,000 copies, with proceeds going to the NHS Charities Together fund.

"My grandchildren can't believe I'm a chart-topper," said Capt Tom.

He thanked the public for buying the single, adding: "We're in this together, and I am forever grateful for your support.

"And this just proves 'you'll never walk alone'."

Capt Tom's birthday is next Thursday, meaning he will still be number one when he turns 100.

That will make him the first centenarian to top the charts, having already broken the record for the oldest person to reach number one.

Sir Tom Jones was the previous record-holder, having been 68 when his Comic Relief cover of Islands In The Stream came out in 2009.

The Welsh star was quick to congratulate his successor.

"Capt Moore, from one Tom to another, congratulations on beating my chart record," he said. "If I was going to lose to anybody, it's an honour to have lost to you, with all you have done raising money for the NHS."

The World War Two veteran's duet partner, Michael Ball, said the achievement was "the most extraordinary thing, one of the most proudest moments of my career.

"But it's not about me, it's about Capt Tom. Thank you for giving him a number one on his 100th birthday. You are the best, God bless you."

You'll Never Walk Alone isn't the only charity single in this week's Top 40, with an all-star cover of the Foo Fighters' Times Like These entering the chart at number five.

Featuring Dua Lipa, Hailee Steinfeld, Anne-Marie, Jess Glynne, Sean Paul, Chris Martin, Bastille and AJ Tracey, the song was organised as part of the BBC's Night In fundraiser, and made its chart debut less than 24 hours after its release.

Capt Tom had originally aimed to raise just £1,000 by completing 100 laps of his garden, as a thank-you to the "magnificent" NHS staff who helped him with treatment for cancer and a broken hip.

But he smashed his target after the challenge went viral and he appeared on BBC Breakfast News.

More than 800,000 people, including the Duke of Cambridge, made donations to his fundraising page, with the total now approaching £30m.

The single was recorded to celebrate him completing his 100th lap last week, and features a spoken work introduction from Capt Moore, who says: "Hold your head up high/And don't be afraid of the dark".

Media playback is unsupported on your device Media caption Watch as Capt Tom Moore completes his 100th lap

Released last Friday, it took an early lead in the charts, selling 36,000 copies in 48 hours.

But as the week dragged on, The Weeknd started to catch up, thanks to the popularity of his single on streaming sites.

By Thursday evening, only 40 copies separated the two records, with The Weeknd predicted to take pole position when the charts were compiled at midnight.

Then, in a late twist, the pop star, whose real name is Abel Tesfaye, threw his weight behind Capt Tom's single.

"My goodness, how gracious of you," replied the army veteran on Twitter, adding that his grandson had told him "you're rather talented and very popular".

The star's show of support worked, with Capt Tom's single 13,000 sales ahead of The Weeknd's closing tally of 69,000.

"The sight of Capt Tom Moore and Michael Ball at the top of the Official Singles Chart this week should lift everybody's spirits in these extraordinary times," said Martin Talbot, chief executive of the Official Charts Company.

"We are absolutely delighted to see them at the pinnacle and setting new landmarks as they go."

Oldest artists with a UK number one single Artist Song Age Capt Tom Moore You'll Never Walk Alone 99 years, 11 months Sir Tom Jones Barry Islands In The Stream 68 years, 9 months Louis Armstrong What A Wonderful World 66 years, 10 months Tony Christie Is This The Way To Amarillo 61 years, 11 months Frank Skinner Three Lions (2018) 61 years, 5 months

Follow us on Facebook, or on Twitter @BBCNewsEnts. If you have a story suggestion email entertainment.news@bbc.co.uk.