Steven Moffat has quit his role as lead writer and executive producer of Doctor Who, the BBC says.
He will be replaced by Broadchurch creator Chris Chibnall.
A Doctor Who Christmas special will air later this year, while series 10, Moffat's last, is scheduled to be broadcast in 2017, with a new companion on board to replace Jenna Coleman.
Chibnall will begin his tenure as executive producer of Doctor Who in 2018.
"Feels odd to be talking about leaving when I'm just starting work on the scripts for season 10, but the fact is my timey-wimey is running out," Moffat said.