Stephen Fry is to step down as the host of BBC Two comedy quiz show QI after 13 years.

The presenter said it was "one of the best jobs on television" but felt "it was time to move on".

He will be replaced by Sandi Toksvig, who described it as her "dream job".

Show creator John Lloyd said Toksvig would be "the first female host of a mainstream comedy panel show on British television - an appointment that is well overdue".

Fry's departure would be the "end of an era", Lloyd added.

He said: "Though we are all very sad he's decided to move on, I am confident that we have found the perfect person to occupy his gigantic shoes."

Toksvig hosts Channel 4's Fifteen To One and stood down as chair of BBC Radio Four's The News Quiz earlier this year after a 10-year run.

'Lively minds'

For 13 years I had one of the best jobs on television Stephen Fry

QI was first broadcast in 2003. Fry was originally hired to be a team captain opposite Alan Davies, but he agreed to host the show as a last-minute replacement for Michael Palin "just for the pilot [episode]".

Fry said: "For 13 years I had one of the best jobs on television. Behind the camera squadrons of quite extraordinarily brilliant researchers, programme makers and uniquely curious (in both senses of the word) people making that job so much easier.

"In front of the camera generations of lively minds and above all of course the wonder of nature that is Alan Davies."

Davies will remain as resident panellist.

The show covers topics under one letter per series, and Fry said "after passing the alphabetical halfway mark I thought it time to move on, but I will never cease to be grateful to John Lloyd for devising QI and for everyone else for making it such fun".

The upcoming M series will be Fry's last.

Image copyright Twitter Image caption Sandi Toksvig tweeted she had big shoes to fill

Image caption Sandi Toksvig has appeared on the show previously as a panellist - seen here with Alan Davies, Bill Bailey, Stephen Fry and Jason Manford

Toksvig said QI was her "favourite television programme both to watch and to be on, so this is absolutely my dream job".

She said: "Stephen has been utterly brilliant with the first half of the alphabet. Now I look forward to picking up the baton, mixing my metaphors and sailing towards the Land of Nod (i.e. Z).

"Who knows what lies ahead? It should all be quite interesting."

Last year, Toksvig spoke out after the BBC announced a policy of having at least one woman on every panel show.

Rather than recruiting more female panellists, she suggested having more female hosts would be a better way of ensuring more women were represented.

"If you get more female hosts, you'll... have more women taking part," she said.