Three thousand years later, the TARDIS arrives on a giant spaceship. The Doctor, Rose and Mickey step outside and examine the decaying computer banks around them After Rose concludes that the ship must have been abandoned the Doctor assures his companions that there is no danger onboard, but decides he will check the ship nonetheless.
The Time Lord tells his companions that they are in the 51st Century and then opens an observation hatch above their heads. He identifies their current position in space and tells Mickey he is two and a half galaxies away from home. He leaves his two friends to star gaze and turns his attention to the computer banks, which have been subject to many botched repairs. He notes that the ship’s engines are working on full power, generating enough energy to punch a hole in the universe. Rose asks where the crew have gone and he scans the ship for signs of life – he finds no other traces apart from he and his companions.
Smelling the air the three travellers claim there is the scent of cooking nearby, but before they can investigate further they discover a genuine 18th Century fireplace mounted on the wall nearby. The Doctor gazes into the flames and discovers there is another room beyond. Rose claims there cannot be because the mantle is attached to the outer hull of the ship.
The voice of a small girl rings out from the room behind the fireplace, and the Doctor speaks to her, discovering she is a young human named Reinette who is living in Paris in the year 1727. She asks what the Doctor is doing in her fireplace and he tells her is conducting a routine inspection and then bids her farewell. He turns back to Rose and Mickey and tells them that the fireplace contains the hole in the universe the ship is generating.
Although initially sceptical about the situation, Rose and Mickey seem impressed by the prospect of visiting 18th Century France, and discuss the fact that the TARDIS translation circuits allow them to understand and speak French. Meanwhile, the Doctor continues to inspect the fireplace and activates a hidden mechanism that causes the mantle to revolve, sending him into the room beyond.
In Reinette’s room the Doctor inspects the landscape outside the window as the young girl stirs from her sleep. The Doctor says hello again and Reinette comments to his astonishment that their last meeting was three months ago. He inspects the mantle and determines the accelerated time space to be the fault of a loose connection. The young Parisian asks who her visitor is and why he is in her bedroom, but he is more concerned by the broken clock on the mantle, noting that although it is no longer functioning there is still a ticking sound in the room.
Analysing the sound, he determines it is too big to be another clock. He tells Reinette that it must have smashed the real clock so that it would not be detected, then traces the noise to underneath her bed. He warns her to stay still and crouches down to investigate further. Suddenly a metallic arm springs out from the darkness and he reels back.
The arm belongs to a tall masked figure in authentic period dress. It stands up and the Doctor follows. He leans forward and clutches Reinette’s head, only to discover the creature has been scanning her brain. Reinette asks what the ticking stalker wants and it replies simply – claiming it needs her but not yet, for she is ‘incomplete’. The Doctor asks what this means but gets no reply. He threatens the creature with his Sonic Screwdriver but does not go unchallenged. The creature extends its metallic arm, on which is mounted a blade. It advances on the Doctor and he retreats to the fireplace. The masked attacker swipes at him but misses and lodges his arm in the mantle. The Doctor, having shrugged off the situation to Reinette as a nightmare, tells her what creatures such as the one attacking have nightmares of…him.
The Doctor activates the rotating fireplace and arrives back on the ship, where Rose and Mickey are waiting. The masked figure from Reinette’s room is close behind but he manages to disable it by engulfing it with the fumes from a nearby fire extinguisher, which is modelled like a gun. The monster freezes and the Doctor throws the makeshift weapon to Rose.
He lifts the ornate mask and period wig from the creature’s head to reveal a globe of clockwork mechanisms ticking away beneath. He marvels at the intricate craftsmanship then prepares to deactivate it with the Sonic Screwdriver, but before he can act the creature breaks free of its frozen bonds and activates an inbuilt teleport, which beams it away.
Realising the clockwork creature could still be onboard the Doctor warns Rose and Mickey not to wander off. He mounts the fireplace and returns to Reinette’s room. Now alone Rose and Mickey decide to waver the Doctor’s orders. Mickey grabs his own fire extinguisher and they run off to investigate the rest of the ship.
In Reinette’s bedroom it is now daytime. The Doctor calls her name and after a few moments a young woman arrives. He asks her if the room still belongs to Reinette and the young lady claims it does, for she is Reinette. The Doctor is astounded that so much time has passed, and she congratulates him on his persistence – claiming imaginary friends are only supposed to exist during childhood.
She notes that the Doctor hasn’t aged at all in the intervening years, which she considers to be very rude. She reaches forward and touches his face. Although she notes he is made of flesh and bone reason tells her he cannot be real. They are interrupted when a distant voice calls for her. She protests then turns back to the Doctor and kisses him passionately before leaving. The voice summoning her rings out again, naming her Mademoiselle Poisson. The Doctor realises whom he has just kissed and returns to the alien ship, astounded that he has just met Madame de Pompadour.
Upon returning he realises that Rose and Mickey have wandered off and, concerned that they might be in danger, runs to find them. He turns a corner and emerges in a corridor occupied by a large white horse…
Elsewhere on the ship Mickey discovers a security camera, which he and Rose identify as being made up of a human eye wired into the security system. Rose then hears a rhythmic beating emanating from within one of the control panels. She opens it up and, to her horror, discovers a human heart linked to the computer.
Meanwhile, the Doctor continues searching for his friends, the horse following close behind. After a while he discovers an ornate door mounted on the wall of the ship, and realises it is the portal through which the creature boarded the ship. He opens it and emerges in the grounds of the court of Versailles, where he witnesses Reinette and her friend Catherine discussing their ambitions concerning the King of France.
Back on the ship, Rose and Mickey discover a large window displaying another room in the Versailles court. Rose realises they are standing behind a mirror, and watches with Mickey as a man enters the room accompanied by his aides. Seconds later the Doctor appears alongside his companions and tells them that the man in the room is Louis XV, King of France. Rose enquires as to what the Doctor has been doing and he recounts how he has become the imaginary friend of a future French aristocrat, fought a clockwork man and met a horse, which soon appears by his side. He explains the ship is covered in portals to different time periods in Reinette’s life. The ship is stalking her.
The three friends look on as Reinette enters and talks with Louis, who soon exits, leaving his mistress alone to examine herself in the two-way mirror. The Doctor notices the clock in the room is broken, but a ticking can still be heard. Reinette also realises something is wrong when she sees she is not alone – another woman is standing nearby with her back to her. Upon Reinette’s command she turns, revealing herself to be another of the clockwork droids from the ship.
The Doctor runs in and blasts the robot with one of the fire extinguishers, causing its mechanisms to jam. Having greeted Reinette he tries to interrogate the monster, but discovers it will only answer to Reinette. They discover the creature is a Repair Droid from the ship, which was subject to a massive systems failure that the robots were unable to repair because they did not have the necessary components.
After Rose and Mickey recount their findings onboard the ship the Doctor realises the droids could not find the parts they needed to repair the ship and so cannibalised the bodies of the crew instead – the cooking scent they detected earlier was the human body parts being warmed by the computer. The Doctor asks why the droids have not returned the ship to a repair yard and it claims that the ship still requires once more component – Reinette. However, as she is still not ‘complete’ they cannot take her yet. The droids have been opening time portals throughout Reinette’s life and going in to scan her brain. They will keep doing so until she is complete.
Rose asks why Reinette was chosen for this task and the droid claims she is the same as the service robots. It does not explain why, so Reinette orders it to leave, which it promptly does. Now worried for the young woman’s safety, the Doctor decides it is time he spoke with Reinette and tells Rose, Mickey and Arthur (the name he has given his horse) to go in search of the droid.
When they are gone he turns to Reinette and places his hands on her temples, hoping to scan her mind himself and discover what the link is between her and the droids. He realises he is not the first to enter her mind; the droids have entered there many times before.
On the ship, Mickey taunts Rose about the Doctor’s blossoming relationship with Reinette, which she strongly dismisses. Suddenly they are ambushed by two of the droids, which grab them and threaten them with the weapons mounted on their arms. They then produce two needles, which they inject into their prisoner’s necks.
Back in Versailles the Doctor tells Reinette to block any thoughts or memories she doesn’t want him to access. She marvels at his telepathic abilities as he tries to uncover why the droids want her, but then finds herself able to read his thoughts as well. She learns that he is called ‘the Doctor’ and discovers the loneliness that has always surrounded him, particularly in childhood. The Doctor reels back, severing the link between them, and Reinette ponders his name further, wondering why he would keep it hidden. As a grand ball begins elsewhere in the court Reinette leads the Doctor away to join the party, claiming that every lonely little boy must learn to dance.
Rose and Mickey, meanwhile, find themselves strapped to two operating tables, surrounded by the robotic droids. Rose awakens and calls out to the Doctor, and soon Mickey also regains consciousness. As the droids prepare to carve them up and use their bodies to repair the ship, the Doctor arrives to save the day, although he appears somewhat drunk from the party. He turns to one of the droids and fires insults at it, before explaining to his friends that the robots are awaiting a time when Reinette’s brain is ‘complete’ so that they can remove it and wire it into the main computer. They have been opening up various time portals and checking her age – for when she is thirty-seven they believe her brain will be ready – because the ship is thirty-seven years old. He still doesn’t understand why the brain used must be Reinette’s, but the droids insist, “she is compatible”.
He disables the droids using a switch on a nearby computer then sets about releasing his two companions. Snapping back to sobriety he explains that because the ship is not functioning properly the droids weren’t able to pinpoint when Reinette was the right age, so they opened multiple time portals hoping they would stumble across the correct year. Suddenly a bell begins ringing and the Doctor realises one of the robots is still in one of the time portals, and has found Reinette when she is thirty-seven. The other droids reactivate and teleport away to join their counterpart.
Back in Versailles Reinette is alone in one of the stately palace rooms when Rose enters, having found a portal to a time frame before the droids have arrived. She tells the French courtesan that the robots will arrive to take her in five years time, on the night of her thirty-seventh birthday. She explains what the droids are doing and reveals that the ship from which they originate is filled with portals into Reinette’s life, which she reacts to with some distress – she asks why the Doctor may walk through her life as and when he wishes whilst she must travel along the slow path of existence. Rose tells her that when the droids appear she must keep them talking until the Doctor arrives to save her.
Mickey arrives to tell Rose that they have found the time portal the droids have entered. He leads her back to the ship but Reinette follows. She hears the screams of her future self coming from the portal the Doctor has uncovered and is disturbed by what she hears. She resolves to return to her proper time and take the slow path for the next five years – when she knows she will see the Doctor again.
Five years later, in the time portal the droids have invaded, the dignitary of France are running for their lives, chased by the masked droids. In one of the court’s rooms King Louis XV watches as his mistress Madame de Pompadour examines a broken clock on the mantel. She announces that it is time for the Doctor to arrive and save her, as Rose promised he would. Louis tells her they must leave but before they can three robots enter and tell Reinette that she is complete…
On the ship, Rose, the Doctor and Mickey watch the chaos through the entrance to the time portal, a giant mirror suspended on the wall of the main hall. Having anticipated the Doctor’s intervention the droids have sealed the portal shut. As the droids lead Reinette into the hall Rose asks the Doctor why they cannot go to Versailles in the TARDIS. He tells her it would mean leaving the timeline, which they must not do because they are already part of established events. They discuss how they will get through the portal and the Doctor explains that forcing their way through would seal off the rest of the portals forever, leaving them trapped.
In the hall, Reinette refuses to go with the droids so they decide to kill her and take her brain with them instead of her whole body. She remains calm and tells them that they are simply a nightmare from her childhood, and if she can be found by her nightmare then the droid’s nightmare can find them as well…
Sure enough the Doctor is on his way. With the help of Arthur he smashes through the giant mirror and arrives in the great hall. He confronts one of droids and tells it the mission to take Reinette is over, he has sealed them off from the ship forever. He looks up to the mirror and finds there is a blank wall staring back at him. Back on the ship Rose and Mickey are left to simply stare at the space where the portal once stood.
The droids try to teleport back to their ship but to no avail. The Doctor turns on them and by convincing them they have no purpose any more, causes them to deactivate. Back on the ship Mickey realises that as the Doctor is the only one who can fly the TARDIS they are now stranded. Rose wanders over to an observation window and gazes out at the stars, and three thousand years ago the Doctor is doing the same in Versailles.
Reinette joins him and the two talk about visiting the distant stars. She asks him to confirm her suspicions – that he came to save her knowing he would have to trap himself in a world that wasn’t his own. He claims he did know what would happen if he came to rescue her, but he went through with it anyway. He tells her he is now stuck with her on Earth as all the time windows are closed – he must endure the slow path.
Close to tears Reinette takes him to her room in the palace and shows him the fireplace that once sat in her room in Paris – she had it moved when she came to live as the King’s mistress. He examines it and realises that because it was offline when the link was severed it might still work. He manages to active it and as he returns to the ship he asks Reinette to wish him luck. She refuses.
Once he has returned he speaks with her through the flames of the fireplace and tells her that she will still be able to visit the stars. He asks her to get ready for the journey and the two friends part. As Reinette rushes away to look at the stars through her window the Doctor runs back to the TARDIS and greets Rose and Mickey.
A few moments later he returns to the fireplace and goes back to Versailles, where he finds Louis standing alone. The French king recalls how Reinette always said her friend never aged – now he is disposed to agree with her. He walks over to a dresser and takes out a letter Reinette has written for him, and at last the Doctor understands – Madame de Pompadour has died.
The Time Lord returns to the TARDIS again. Rose asks why the droids were determined to use Reinette’s brain for the computer and the Doctor concludes that they may never know the truth. He uses the ship to close the time portals forever and then, as Rose leaves to show Mickey the rest of the ship, he reads Reinette’s letter.
In it she reveals that she has realised the Doctor may never see her again. She retains some hope she will see him once more and asks him to hurry back to her. She bids farewell to her ‘lonely angel’ and thus the two are parted forever. The Doctor folds up the letter and puts it in his jacket pocket, before resuming his place at the TARDIS controls and setting the ship in motion.
When the TARDIS dematerialises from the ship it reveals a picture of Reinette hung on the wall behind it. At last the reason why the droids needed her is clear – the ship was called the SS Madame de Pompadour.