The Timewyrm is the name of a recurring villain from the Virgin New Adventures spin-off novels based on the BBC science fiction television series Doctor Who. The character featured in a four-novel story arc: Timewyrm: Genesys, Timewyrm: Exodus, Timewyrm: Apocalypse and Timewyrm: Revelation.
The Timewyrm started life as Queen Qataka on the planet Anu. Fearing her own mortality and stories of the Time Lords of Gallifrey, she cybernetically enhanced her body giving herself the power to steal life energy from her subjects, and stealing their neurons to replace her own. Her people rebelled against this, but she retaliated by linking her mind to a computer, and using her enhanced mental powers, dominated the minds of her opponents. However, after a further rebellion, Qataka was captured, tried and executed. She escaped death by uploading her mind into a cybernetic body — a giant snake with a platinum alloy skin. She then devastated the planet using a cobalt bomb. Some of the Anusians, led by Utnapishtim, escaped in a space ark and pursued Qataka and her followers to Earth. Utnapishtim released a computer virus into Qataka's ship's computer, causing her ship to crash into the planet.
In 2700 BC, the Seventh Doctor and Ace travelled to the ancient city of Mesopotamia after seeing a message from the Fourth Doctor in the TARDIS warning them of an ancient Gallifreyan mythical creature known as the Timewyrm and detecting a temporal anomaly. After an encounter with Gilgamesh, they found Qataka in Kish, posing as Ishtar, the goddess of sex. She had given some of the citizens of Kish cybernetic implants so they had the technical skill to build a giant copper transmitter. Ishtar planned to use the transmitter to mesmerise the whole planet. The Doctor and Ace allied themselves with Utnapishtim to defeat Ishtar, but they discovered she had a thermonuclear device triggered to detonate if she died. When Utnapishtim released a computer virus into Ishtar's computer systems, the Doctor was forced to link the TARDIS's telepathic circuits to Ishtar's systems to prevent the bomb detonating. However, Ishtar's consciousness was then able to invade the TARDIS, so the Doctor ejected the affected systems into the Time Vortex. Ishtar's consciousness then merged with the virus and the TARDIS systems to become a powerful new entity — the Timewyrm.
The Doctor and Ace traced the Timewyrm to London of 1951. To their horror they discovered a Britain occupied by Nazi Germany. The Timewyrm had changed history by preventing the Dunkirk evacuation. They travelled back to 1923 and 1939 to discover the cause of the divergence from established history, and after meeting Adolf Hitler and the War Chief (an old enemy of the Doctor's), they realised that the Timewyrm was living within Hitler's mind. The Doctor expelled the Timewyrm and history returned to its normal course.
The Doctor and Ace then pursued the Timewyrm to the planet Kirith, sometime in the far future. The Timewyrm had used the Doctor himself as a host, weakened from his first regeneration, but then left him and entered the body of Lilith, Grand Matriarch of Kirith. After frustrating her plans once again, the Doctor and the Timewyrm's final battle took place inside the Doctor's own mind. Facing the spectres of his past incarnations and dead companions, it was only when he released the Fifth Doctor's innocence back into his personality that the Doctor could overcome the Timewyrm. The Timewyrm also caused Ace to die as a child but the older Ace was sent back to prevent her death. The Timewyrm's power was banished into dormancy within the structure of the universe, while the memories of its human core — Qataka — were erased and that essence deposited in a mindless baby.
That baby grew up into a woman known as Ishtar Hutchings, and met the Doctor once again at the wedding of Bernice Summerfield and Jason Kane in the later Doctor Who novel, Happy Endings. She became the girlfriend of the Doctor's companion, Chris Cwej, and eventually gave birth to their child, Jasmine Surprise Cwej-Hutchings.