'Timewyrm: Genesys', written by John Peel, features the Seventh Doctor and Ace.
Back Cover Blurb
Mesopotamia - the cradle of civization. In the fertile crescent of land on the banks of the rivers Tigris and Euphrates, mankind is turning from hunter-gather into farmer, and from farmer into city-dweller.
Gilgamesh, the first hero-king, rules the city of Uruk. An equally legendary figure arrives in a police telphone box: the TARDIS has brought the Doctor and his companion Ace to witness the first steps of mankind's long progress to the stars.
And from somewhere amid those distant points of light on evil sentience has tumbled. To her followers in the city of Kish she is known as Ishtar the goddess; to the Doctor's forebears on ancient Gallifrey she was a mythical terror - the Timewyrm.