Media playback is unsupported on your device Media caption The BBC's James Longman met the singers behind the A Bridge Over You single

A choir of nurses, doctors and other NHS staff have beaten Justin Bieber and X Factor winner Louisa Johnson to the UK's Christmas number one spot.

The Lewisham and Greenwich NHS Choir's song A Bridge Over You topped the chart ahead of Bieber's Love Yourself.

The choir overtook Bieber after he had urged his 72 million Twitter followers to buy the charity single.

He tweeted: "Just heard the news. Amazing. That is what Christmas is all about. @Choir_NHS congrats! Very cool."

Johnson, who had been the bookmakers' favourite, could only manage 12th position.

Media playback is unsupported on your device Media caption An extract from the NHS Choir's Christmas number one, A Bridge Over You

Her cover of Bob Dylan's Forever Young dropped three places since entering the chart last week - meaning it is likely to be the first X Factor winner's single to fail to reach the top spot.

Instead, the NHS Choir's mash-up of Simon and Garfunkel's Bridge Over Troubled Water and Coldplay's Fix You emerged as the popular favourite in the run-up to Christmas.

Image copyright Getty Images Image caption Louisa Johnson covered Bob Dylan's Forever Young

The choir, which features physiotherapists, porters and administrators as well as doctors and nurses, were runners up on Gareth Malone's BBC Two show Sing While You Work in 2012.

They recorded A Bridge Over You to celebrate the work of the NHS, and all proceeds from the sales will be shared between charities including Carers UK and Mind.

"We are absolutely overwhelmed and couldn't be any happier," they said in a statement released by the Official Charts Company.

"It's a brilliant celebration for the NHS across the country so well done and thank you everyone for downloading and streaming. A massive cheer for the NHS, thank you."

The Official Charts Company said it was the closest Christmas number one race since Rage Against the Machine beat X Factor winner Joe McElderry in 2009.

Image copyright Reuters Image caption Bieber urged his followers to "do the right thing"

The choir were trailing Bieber in the chart race earlier in the week, but pulled ahead of the Canadian pop star after he asked his fans to support their cause.

He told them to "do the right thing" and help A Bridge Over You win, conceding that "for one week it's OK not to be number one".

He added: "This is what it's all about. Merry Christmas."

In the end, the NHS Choir achieved 127,000 sales, while Bieber's Love Yourself had sales and streams equivalent to 97,000 copies.

Official Charts Company chief executive Martin Talbot said: "What a fantastic result for the NHS Choir to claim the 2015 Christmas number one.

"There will be thousands of NHS staff across the country working through Christmas Day, while the rest of the nation is putting its feet up - this success is for them. There couldn't be a more deserving group of winners."

Christmas classics

Despite missing out on Christmas number one, Bieber still has three tracks - Love Yourself, Sorry and What Do You Mean - in the top five.

At number four, Adele's Hello is also in the top five, while grime artist Stormzy has reached number nine with Shut Up.

The Christmas classics in this week's chart are led by Mariah Carey's All I Want For Christmas at number 11, with The Pogues' Fairytale Of New York at 13, Wham's Last Christmas at 18 and Shakin' Stevens' Merry Christmas Everyone at 26.

Elsewhere in the top 40, Wizzard's I Wish It Could Be Christmas Every Day is at 27, Chris Rea's Driving Home For Christmas is at 29 and Band Aid's Do They Know It's Christmas is number 38.