Doctor Who's Peter Capaldi and Steven Moffat have revealed they persuaded Jenna Coleman to stay on for another year by "haranguing" her.
After months of speculation, the BBC confirmed in September that the 29-year-old would depart during this ninth series.
"Jenna wanted to leave last year, when I arrived," Capaldi said. "But I didn't want her to leave."
Coleman has played Clara Oswald, the Doctor's companion, since 2012. She is the longest-serving assistant since the series was rebooted in 2005.
The Blackpool-born star will swap time-travelling with the Doctor to jump back to the 19th century to play Queen Victoria in a forthcoming eight-part drama for ITV.
Talking about his on-screen sidekick, Capaldi said: "Three years is quite a long time and she's a very gifted actress and there's lots of other things going on, but I felt we had such a good relationship that I felt another year wouldn't do any harm.
"It's a decision she made herself, Jenna will do what she feels is right so I could only offer up my opinion about the fact that we had only begun really to explore what we could do as a Doctor and companion team and that there was much further distance to go and that we were having fun and it was a shame to bring that to an end.
"I said to her 'whatever you want to do, I totally support you because I think you're fab and you'll be successful next year when you leave as you would be this year'. At the end of the day, she said it might be fun to stick around for a while and so she did."
Although Coleman's exit is expected to come in 10th episode Face The Raven, executive producer Moffat would not be drawn on whether she will be killed off.
"She left several times," he said as he discussed the show. "I wrote her out in Death In Heaven at the end of episode 12 last year. All that was meant to be the last time we saw her.
"And then at the last minute she said she'd like to do Christmas, which I'd already half written so I had to reverse rapidly and write it again with Clara in it and then write her out at the end of that episode.
"I think as a result of me and Peter haranguing her when we were on the world tour about doing another series, after the read-through she decided she wanted to stay, so I changed the ending. Actually, I had another ending already prepared in the event she changed her mind."
When asked why he wanted Coleman to stay, Moffat replied: "I thought she obviously worked brilliantly with Peter and it was tough, I suppose, just to end that story after one year. I felt there was more juice in it."
However, he acknowledged series nine was penned with her departure in mind.
Speculation about the next companion has already started. "They have to be a counterbalance to the Doctor," Capaldi stated when asked about a sidekick's qualities.
"They have to be straight when he's fun, fun when he's straight, they have to ask questions, they have to convincingly be out of their depth from time to time in order to get him to explain to them and the audience what's going on. But I think it's more important to have fun."
The 57-year-old also admitted criticism of his Doctor hurt. "But that's life. It's a very small price to pay for - that's what happens if you put your head above the parapet.
"I knew from the start that some people would like me and some people wouldn't."
He continued: "I deliberately don't go and look at reviews or go on to the internet or go on to Twitter, I don't Google myself, but it obviously gets back to me from various sources."
The Scot stated: "I always think that if you're Doctor Who, somebody's going to love you somewhere. If people don't like me, they'll be another one along in a minute. It's only Doctor Who. And I say that with the greatest of respect and affection, but it's not a life-threatening illness or anything.
"People just don't like your performance as a Time Lord."
Doctor Who is broadcast on Saturday November 7 at 8pm on BBC One.