Doctor: David Tennant (Tenth Doctor)
Companion: Catherine Tate (Donna Noble)
Alex Kingston – Professor River Song
Colin Salmon – Dr Moon
Eve Newton – The Girl
Mark Dexter – Dad
Sarah Niles – Node 1
Joshua Dallas – Node 2
Steve Pemberton – Strackman Lux
Talulah Riley – Miss Evangelista
Jessika Williams – Anita
O. T. Fagbenle – Other Dave
Harry Peacock – Proper Dave
Directed by Euros Lyn
Written by Steven Moffat
Script editor Helen Raynor
Produced by Phil Collinson
Executive producer(s) Russell T Davies
Incidental music composer Murray Gold
Production code 4.9
Series Series 4
Length 1st of 2-part story, 45 minutes
Originally broadcast 31 May 2008
The episode opens with a young girl being visited at her home by Dr. Moon. She tells him about the library she can see in her imagination. She becomes upset when she discovers someone is in her library, and watches as the Doctor and Donna burst into her room.
The story cuts to things from the Doctor's perspective. He and Donna arrive in the 51st century at a planet-sized book repository simply called The Library. The Doctor is responding to a summons from his psychic paper, but upon arrival they find the library curiously empty. The Doctor searches a nearby computer for information and is told that there are no humans in the library but millions upon millions of non-human life signs.
They come upon an information node that warns them to count their shadows, and then see the overhead lights in front of them turning off one by one. They run into an office where they encounter a floating security camera that reacts in pain when the Doctor probes it with his sonic screwdriver. They consult another information node and are told that the library sealed itself, but that it has been breached and others are coming.
Just then, a team of explorers led by archaeologist River Song and financed by Strackman Lux, whose grandfather originally built the Library, arrives. The team has come to determine why the library sealed itself 100 years previously. River acts like she knows the Doctor and has a diary with a cover decorated like the TARDIS with her. She reveals to him that it was she that sent the message to his psychic paper, and discovers that this Doctor is the youngest version of him she has met. Realising that he has yet to meet her, River refuses to divulge more information.
The Library's operation system appears to be connected to the mind of a young girl living in a 21st-century British household on Earth. When the Doctor attempts to access the library computers, the girl causes books to fly from the shelves. The events happening in the library appear to her as television shows. Dr. Moon visits the girl again, telling her that the library in her imagination is actually real and that her real world is a lie. He implores her to save the people who have arrived at the library.
Back in the library, the Doctor explains that they are surrounded by Vashta Nerada, creatures that appear as shadows to hunt. He notes that every planet has them but that they are usually in much smaller numbers and not as aggressive. He describes them as "piranhas of the air" - able to devour the flesh from any organism in a matter of seconds. To demonstrate, the Doctor tosses a chicken drumstick into a shadow, where it instantly becomes a bare bone. Miss Evangelista, Lux's somewhat ditzy secretary, is distracted by a door that opens and investigates it. She is attacked by Vashta Nerada, who strip her flesh clean to the bone at once. The Doctor and Donna learn that the team are wearing communication devices which can store their thought patterns even after death, and are disturbed to hear Miss Evangelista still talking but acting confused. As her pattern degrades she keeps repeating herself, until River finally switches off her suit.
The team is interrupted when they notice that their pilot, Proper Dave, suddenly has two shadows. The Doctor suggests using his sonic screwdriver to make the spacesuits more dense, and is surprised to see River using a sonic screwdriver that seems more advanced than his. They seal Dave in his suit but the Vashta Nerada still get in, stripping him to his bare skeleton. The creatures animate Dave's suit and use it to begin chasing after the others. The Doctor attempts to teleport Donna back to the TARDIS for her safety, but something goes wrong and Donna fails to materialise properly. As the team races away from Dave's suit, the Doctor is horrified to find an information node with Donna's face on it. The node tells them that Donna has left the library and been saved. The show ends on a cliffhanger as the Doctor is trapped by the approaching suit on one side and the advancing shadows on the other.