322 BC: The TARDIS is caught in a rockfall in a mine. The Doctor and Barbara escape, but Ian is trapped inside. Barbara sees some slaves mining, and asks for their help digging Ian out. They recognise her, however, and one man, Susa, mentions Alexander's coffin and asks her where her guards are. Thinking quickly, she says they are not with her. Susa attacks the Doctor but the Doctor defeats him easily, knocking him out. Barbara tells the rest of the slaves that if they help her, she will free them. An Israelite slave named Aristea takes some men with him to dig out the TARDIS. The Doctor scolds her for interfering with history, but she knows when they are, and in history, the slaves really were freed by Ptolemy Lagus.
They notice that Susa is gone. He has sneaked out to fetch guards. However, when the guards, led by Arrhidaeus, arrive, they recognise Barbara and kneel to her. Arrhidaeus has Susa killed, and makes the camels ready for travel back to Alexandria.
331 BC: Barbara finds herself in a crowd of people. She recognises Aristea, who is being stoned. When she intervenes, she is stoned by the crowd, but is rescued by Ptolemy Lagus. She tells him she has lost her memory.
322 BC: Barbara and the Doctor accompany Arrhidaeus to Alexandria. Barbara has explained the Doctor as a scholar who is interested in craftsmanship. Barbara explains to the Doctor that they are in 322 or 323 BC, and Alexander the Great has just died. The slaves were mining gold for his coffin. Ptolemy Lagus is now the king. As they near the city, a young boy rides out to meet them, and greets Barbara, calling her “Mother”. At the city, they are greeted by Ptolemy Lagus, who, to Barbara's surprise, sweeps her from her camel's back and embraces her.
331 BC: Ptolemy carries the injured Barbara to safety, but notices that a crowd has gathered near the harbour. Rhakotis' spaceship has just crashed, and the crowd urges a fisherman to kill the alien. They are stopped, however, by Barbara's pleas not to hurt him, as he is asking for help.
322 BC: Barbara explains to Ptolemy who the Doctor is. She then speaks to Ptolemy about the slaves in the mines. He asks a question, to which a feminine voice answers. It is Ptolemy's wife, who Barbara realises is an older version of herself. The older Barbara, on seeing the younger version, faints, while Ptolemy laughs at his little joke of bringing the two women together.
Ptolemy tells Arrhidaeus to free the slaves in the mine. He asks Barbara for suggestions on what to do with them. She suggests the older slaves work as scholars or clerks and the younger, able-bodied slaves should join the royal army. The Doctor again scolds Barbara for interfering in history, saying that Ian will be impressed into the army. He also points out the existence of the Pharos Lighthouse, which was built by Ptolemy Philadelphus – Barbara's “son”, who at this time is only eight years old. The Doctor tells her history is being rewritten, and he heads to the library to see what he can find out.
331 BC: Alexander wants to use Rhakotis to further his ambitions, but Ptolemy suggests that, with Barbara as interpreter, Rhakotis is willing to offer his knowledge in exchange for gold, which he needs to repair his ship. Barbara tells them that Rhakotis needs to construct a diving bell to conduct repairs on his ship below the water's surface.
322 BC: At the palace, Arrhidaeus tries to assassinate Ptolemy on Perdiccas' behalf, but Ptolemy kills him instead. Meanwhile, the two Barbaras talk. The older Barbara doesn't remember who she is, but the younger Barbara wants to know how she ends up going back in time eight years. Ptolemy suddenly enters with Philadelphus, telling the two women that he has been betrayed. Perdiccas is in control of the army. He tells them to lock themselves in while he goes to the library to ask for Rhakotis' help. The younger Barbara leaves to find the Doctor. It is raining. Outside the library, she collides with a man who is holding a book — not a scroll. She tries to take it from him and he resists. Soldiers are making their way through the city, and people are running and screaming. Barbara grabs the book from the man and runs into the library. Suddenly the people and soldiers are gone, and it isn't raining any more.
331 BC: Barbara notices little differences in the library, and realises she has just travelled through time. She hears a loud noise, and running outside she sees a spaceship about to crash. She runs towards it.
322 BC: At the library, the Doctor overhears an argument between Aristophanes and Eratosthenes. He can't help sniggering, and when they confront him, he informs them that their lives are supposed to be three centuries apart. They are aware of this, and tell the Doctor that there are time portals in the library, installed by Rhakotis. Aristophanes shows the Doctor a scroll, which, on seeing the title, he snatches away. He must find the original, which Aristotle has. He sets off in search of it.
331 BC: Ptolemy and Barbara watch as Rhakotis and Alexander submerge in the diving bell.
322 BC: The older Barbara sees Rhakotis' spaceship taking flight, and suddenly her memory returns. She leaves Philadelphus and runs to Rhakotis' rooms. Ptolemy is demanding that Rhakotis use his technology to help defeat the army, but Rhakotis' ship is barely staying aloft as it is. When Barbara enters, Ptolemy demands why she left their son, and then acknowledges himself betrayed, as his son is most likely dead now. He tries to kill Rhakotis, but soldiers enter and one soldier fights with Ptolemy. They kill each other, and Barbara is horrified to see the soldier is Ian.
Rhakotis' ship cannot stay aloft any longer and crashes into the city. The Doctor arrives to find Barbara and Rhakotis, and gives them a book that can help them rewrite these events. If they do, Rhakotis will die and Barbara will no longer have a son and husband. The Doctor leaves it up to them to decide.
331 BC: Rhakotis' ship crashes on a watery planet, and he thinks he is going to die. He barely remembers the temporal explosion, then he dies.
- First Doctor
- Barbara Wright
- Ian Chesterton
- Ptolemy Lagus
- Ptolemy Philadelphus
- Alexander the Great
- There is a book from the Doctor's homeworld called The Ancient and Worshipful Law of... (the Doctor does not read after that, but it would end with "Gallifrey").
- The TARDIS arrived in Egypt because the Doctor wishes to find gold for a wedding ring for Susan.
- Barbara and the Doctor ride camels to Alexandria.
- The Pharos Lighthouse exists anachronistically in this timeline.
- The stories in Decalog are linked by the story Playback, in which psychic Silverman examines various items in the stranger's pockets. For this story, he examines a nugget of gold.
- Paul Leonard's First Doctor novel Venusian Lullaby was intended to lead directly into this story.
- The story originated in a novel proposal by author Jim Mortimore to Virgin Books, which was also set in Alexandria; following its rejection, he divided it into two stories, The Book of Shadows and Parasite. He would later write another story with the First Doctor, Ian, and Barbara in the ancient Grecian period in his proposal (and subsequent self-published novel) Campaign.
- A version of the story was self-published by Jim Mortimore in the anthologies The Book of Shadows and The Sun in the Bone House.
- This story takes place in Alexandria during the reign of Ptolemy Lagus, whom the Doctor, Ian and Barbara met in Babylon in 323 BC. (AUDIO: Farewell, Great Macedon)
- The Doctor, Barbara and Ian also visited Alexandria in the 5th century. (AUDIO: The Library of Alexandria)
- The Doctor first told Ian and Barbara of his plans to collect a sample of gold to make a wedding ring for Susan as they prepared to depart from Venus. (PROSE: Venusian Lullaby)
- As Barbara's memories return, she remembers Coal Hill School and Totter's Lane in 1963 (TV: An Unearthly Child), Skaro (TV: The Daleks), Cathay in 1289 (TV: Marco Polo), Marinus (TV: The Keys of Marinus), Mexico in the 15th century (TV: The Aztecs) the Sense Sphere in the 28th century (TV: The Sensorites), France in July 1794 (TV: The Reign of Terror) and London in the 22nd century. (TV: The Dalek Invasion of Earth)
- The Worshipful and Ancient Law of Gallifrey was acquired from the late 20th century. (TV: Shada)