Jodie Whittaker is to step down from the lead role in Doctor Who, the BBC has confirmed.
The first woman to play the Time Lord will bow out in Autumn 2022, along with showrunner Chris Chibnall.
Whittaker will star in a new six-part series later this year, and three specials next year, before she exits.
In a statement, Whittaker paid tribute to Chibnall and the Doctor Who team, adding: "I will carry the Doctor and the lessons Ive learnt forever."
Chibnall, who appointed the actress to replace Peter Capaldi four years ago, has been in charge of the BBC One series since 2017.
It has not yet been announced who will take over from Whittaker in the leading role.
"In 2017 I opened my glorious gift box of size 13 shoes," Whittaker said. "I could not have guessed the brilliant adventures, worlds and wonders I was to see in them."
She continued: "My heart is so full of love for this show, for the team who make it, for the fans who watch it and for what it has brought to my life."
"And I cannot thank Chris enough for entrusting me with his incredible stories. We knew that we wanted to ride this wave side by side, and pass on the baton together. So here we are, weeks away from wrapping on the best job I have ever had. I dont think Ill ever be able to express what this role has given me. I will carry the Doctor and the lessons Ive learnt forever.
"I know change can be scary and none of us know whats out there. Thats why we keep looking. Travel Hopefully. The Universe will surprise you. Constantly."
For her final series, Whittaker will once again be joined by Mandip Gill as Yaz, and comedian John Bishop, who will play a new character named Dan.
The 13th Doctors first episode in October 2018 was watched by 11.5m viewers, in the sci-fi dramas biggest audience for almost a decade. It was also the biggest show of that week, ahead of Strictly Come Dancing and the Great British Bake Off.
But the shows ratings have dropped in recent years. Whittakers last episode, broadcast in January, attracted a consolidated audience of 6.3 million.
While many have praised Whittakers casting, some fans and critics have criticised the shows recent narrative direction.
The Telegraph described recent episodes as "flat, worthy and woke" despite Whittakers talent as an actress, while The Sun reported viewers were left furious by the shows "unbearable political correctness".
One of the long-running dramas unique features has been regeneration, where the Doctor completely changes their physical appearance, allowing the show to recast its lead role every few years.
Speculation will now turn to who Whittakers replacement might be, as the show approaches its 60th anniversary in 2023.
As well as introducing Whittaker as the first female Doctor, Chibnall also brought in Tosin Cole as Ryan, Mandip Gill (Yaz) and Bradley Walsh (Graham).
Episodes such as Rosa, Demons of the Punjab and Spyfall thrilled audiences, and netted the show two Bafta Must See Moment nominations, along with multiple National Television Award, Bafta Cymru, TV Choice and Critics Choice nominations.
In 2020, Whittaker was voted second most popular Doctor of all-time in a poll of 50,000 fans for the Radio Times, losing out to David Tennant.
Chibnall said: "Jodie and I made a three series and out pact with each other at the start of this once-in-a-lifetime blast. So now our shift is done, and were handing back the Tardis keys.
"Jodies magnificent, iconic Doctor has exceeded all our high expectations. Shes been the gold standard leading actor, shouldering the responsibility of being the first female Doctor with style, strength, warmth, generosity and humour."
He added "She captured the public imagination and continues to inspire adoration around the world, as well as from everyone on the production.
"I cant imagine working with a more inspiring Doctor - so Im not going to!
The climax of their time together on the show will form a big part of the BBCs centenary celebrations in 2022.