Media playback is unsupported on your device Media caption Peter Capaldi reveals to Jo Whiley that the new series of Doctor Who will be his last

Actor Peter Capaldi is stepping down from the lead role in the BBC sci-fi series Doctor Who.

Capaldi shocked fans by making the announcement during an interview with BBC Radio 2 presenter Jo Whiley.

The 58-year-old Glasgow-born star, who became the 12th actor to play The Doctor in 2013, said he will leave Doctor Who at the end of the year.

"I feel it’s time to move on," he said. "I feel sad, I love Doctor Who, it is a fantastic programme to work on."

'It's been cosmic'

He added: "I can't praise the people I work with more highly, but I have always been someone that did a lot of different things."

He said he was asked to stay on after his contract ran out, but that he wanted to move on to other challenges after the forthcoming tenth series.

The new series airs in the spring and Capaldi said his final episode would be shown at Christmas.

Image copyright Getty Images

He added: "One of the greatest privileges of being Doctor Who is to see the world at its best.

"From our brilliant crew and creative team working for the best broadcaster on the planet, to the viewers and fans whose endless creativity, generosity and inclusiveness points to a brighter future ahead.

"I can't thank everyone enough. It's been cosmic."

Image caption Pearl Mackie stars alongside Capaldi as The Doctor's companion

The next series will also be the last with Steven Moffat as lead writer and executive producer.

Moffat praised the star's performance in a BBC announcement: "Peter's amazing, fiery, turbulent Doctor is still fighting the good fight, and his greatest adventures are yet to come.

"Monsters of the universe, be on your guard - Capaldi's not done with you yet!"

He added: "Like Peter, I'm facing up to leaving the best job I'll ever have, but knowing I do so in the company of the best, and kindest and cleverest of men, makes the saddest of endings a little sweeter."

'Wisdom and charisma'

Doctor Who writer Mark Gatiss tweeted: "Profoundly sad that the wonderful Peter Capaldi is leaving at the end of the year. But he is - and always will be - a great Doctor Who."

Charlotte Moore, director of BBC Content, said: "He has been a tremendous Doctor who has brought his own unique wisdom and charisma to the role."

The popular sci-fi series features a Time Lord known only as "The Doctor", who travels through time and space in the Tardis, which resembles a 1960s police telephone box.

The main character has the ability to regenerate, a quirk that has allowed a number of actors to have played the role over the years.

According to bookmakers, those in the frame to replace Capaldi include Ben Whishaw, Rory Kinnear and Richard Ayoade.

Doctor Who was first broadcast in 1963 and underwent a relaunch in 2005, the 10th series of which will be Peter Capaldi's last.

Capaldi, who replaced Matt Smith as The Doctor in 2013, was previously best known for his role as foul-mouthed spin-doctor Malcolm Tucker in the BBC series The Thick of It.

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