The TARDIS lurches at a sixty degree angle and despite the Doctor's nonchalance Amy and Rory realise it is crashing. The whole ship flips over, a fire starts and the Doctor says that something bad is happening in the space time continuum. An alarm clock (proximity sensor) rings and they crash.
A little girl called Maria writes to her mother from St Christophe on the northern coast of France. It is 4th December 1783 and her mother is in Paris. Maria wants to go home to be with her mother but has been left at a hotel sanatorium. Every day the nurses wheel the patients down to the beach as part of Dr Bloom's Fresh Sea Air Cure to freeze the badness out of their lungs. Maria occasionally goes down with them but she is frightened of the perpetual mist on the beach that sometimes talks to the patients.
Amy wakes up in bed with Maria at her side. Amy has no memory of even who she is and only knows that her carriage crashed because the girl tells her. Maria tells her, also, that the dead are brought to this place, or rather the dying, but few go home. At that point the Doctor and Rory enter and Amy remembers her name.
Dr Bloom is upset by the arrival of the three strangers who were found lying on the beach by Kosov that morning. While Kosov had to carry Amy in, the two men managed to walk by themselves. Neither of them seem fully compos mentis, though one is reasonably convinced that he is called 'Doctor Smith' and the other thinks he is Amy's husband. Bloom tells them that there is no sign of their carriage on the beach and assumes that the horses cantered off with it after the accident.
Maria goes to the beach to avoid Dr Bloom, who she finds intimidating, and sees the Dead in their wheelchairs talking to the mist and the mist singing back to them. Figures emerge from the fog and the Dead get out of their chairs and dance with them on the beach. Dr Smith appears at Maria's shoulder, watching, and comments that it is interesting but frightening. He takes her back to the hotel where she tells him about some of the other guests, including the Elquitine Sisters who play the violin and the cello all day. Olivia, the fat sister, is quite talkative, but Helena, the thin sister, spends all of her time writing complex equations. A newcomer at the hotel is an angry Englishman, Mr Nevil. He complains about everything and denies that anything is wrong with him. Dr Smith tells Maria that the hotel is no place for a girl and that the events on the beach are disturbing. He says she must write to her mother and ask to be taken home.
Amy awakes again and finds Doctor Smith and Mr Pond discussing the hotel. They have found out that the patients are being treated for tuberculosis but the Doctor says that the cure that Bloom is using is a hundred years ahead of its time. The two men confess to Amy that neither of them can remember why they are in France, though Doctor Smith has a strange feeling that they travel in time.
Bloom's wife, Perdita, finds Mr Pond watching the beach. He tells her that he is waiting for the patients to dance in the mist but Perdita says she has no idea what he means and insists he return to the hotel. When Bloom hears about this conversation he is chilled. He knows there is something terrible about the strangers but Kosov has told him that the Sea is interested in them and that they must be kept close. As such, Bloom invites Dr Smith to dinner. Maria is there and Doctor Smith is surprised to hear Bloom refer to her as the hotel's pet. After Maria has laid the table she leaves. In the ensuing conversation Bloom boasts about his clinic's successes. Dr Smith agrees that the eighteenth century is the worst of all for health. Bloom has arranged the seats so that Dr Smith has his back to the French windows and can't see what is out there, listening. Dr Smith starts to ask about the cure and the patients on the beach, which disconcerts Bloom. Perdita appears immediately. Her beauty and politeness change the tone of the conversation. Dr Smith confesses that he has no memory of his medical practice in England and when he leaves Bloom and Perdita share a thought that Smith has not come from The Sea.
Dr Smith goes over what he knows. In his mind is a very large, very dark room with a black box that says DO NOT OPEN TILL CHRISTMAS. Out of the window he can see the sea. He knows that Dr Bloom is not in control of the clinic and that Maria is more important than she seems. He also knows the difference between jam and chutney. And marmalade.
The following morning Amy asks Maria to join her on a secret mission. Dr Smith wants to know if there are any secret patients or places where people aren't supposed to go. Maria can only think of Prince Boris, a handsome Russian aristocrat. She wheels Amy down to his rooms where the Prince is in bed. He says that he is another consumption sufferer but thinks he will soon be well enough to ride again. To prove this he challenges Maria to a 'chariot race' in wheelchairs. As Maria speeds off, Boris topples from his chair, gasping for breath. Amy rushes to help him but Kosov, the prince's giant servant, scoops him up and returns him to bed. He insists that Amy return to the room with them.
Dr Smith and Mr Pond are observed by Nevil as they talk to the Elquitine sisters. He notes, with distaste, their interest in the thin sister's equations which apparently resemble a logic gate. Nevil becomes outraged that these men are somehow making a show of themselves, disconcerting the sisters, and flies into a temper. He begins to have convulsions and coughs up blood. He refuses to partake in the fresh air treatment and Bloom threatens him that if he does not follow the prescribed regime then Nevil must leave. He invites Nevil to his room at eight o'clock. When Nevil arrives the windows onto the terrace are open and, as he stares in horror, Bloom invites in a creature that crawls across the floor. Nevil is engulfed by it.
Maria runs to find Mr Pond and tell him what has happened to Amy. She finds him outside Dr Bloom's study waiting to see what happens. A cry from the study makes her run inside where she sees something terrible but when Mr Pond comes in all she can see is Mr Nevil on a chair and Dr Bloom by the fire. Perdita leads her away, saying that she has only had a fright and Mr Pond is left sniffing an odd smell in the air. When she is woken by a tapping at her bedroom window she lets in Dr Smith who says he is looking for Amy. She tries to say what she saw in the study but can't find the words. Instead she tells him that Kosov took Amy back to Prince Boris' room. He tells Maria that she is in danger and whispers his secret name that she must use when she is scared. He then sets off to find Amy.
Bloom is annoyed that he has to put up with Maria when her own mother won't have her. She nearly ruined everything when she burst in on Nevil but his wife calms Bloom with a cup of tea. He sees Kosov going down to the beach and wonders what he will tell them there but his wife laughs the fears away.
Amy and Prince Boris discuss Kosov. The servant has a way of making the prince healthy just by being near him. They drink tea while the wind rattles the windows and Amy tries, and fails, to remember what her life was like before. Boris recovered quickly from his fit but soon after Kosov leaves the room he begins to weaken again. He calls for the servant so Amy hammers at the door but it is locked and nobody comes.
Maria has gone back to the beach. She sees Mr Pond behind the rocks on the sand. No sooner has he told her that things are very wrong than Kosov finds them. Mr Pond says, 'Warp transfer coil' (not for the first time) and apologises for repeatedly blurting out such an apparently meaningless phrase. He changes the subject by pointing out that Kosov is actually hovering half an inch above the ground. Pond and Maria run through the mist towards the sea. Maria loses Mr Pond in the mist but hears him telling her to stay out of the water. This is too late, as she is already in the shallows. Something grabs he foot and pulls her into the waves. All of this seems oddly familiar to her but she can't remember why. The mist clears and she sees the Dead in their chairs, watching her drown. Mr Pond appears and pulls her to her feet. A strange light is dancing in the water. Pond pulls her to the beach where Kosov is still waiting. He says that Pond should have let the sea take Maria and then a mist pours from his mouth. Pond and Maria run again, back to the hotel. As they reach the top of the cliff path Kosov catches up with them. Pond tells Maria to find Amy just before Kosov sweeps him up and throws him down the cliff. Maria runs on until Perdita Bloom greets her and tells her they have been worried about her.
Nevil finds himself suddenly feeling much better. Rather than wishing to complain he finds the fatter of the Elquitine sisters and tells her his treatment is working. She replies sadly that it has been a long time since she was given any treatment at all.
Dr Smith bursts into Boris's room. Amy asks him to look after the prince. The Doctor produces a sonic screwdriver to depress the prince's tongue and looks at it in confusion: he does not recognise it. Amy tells him they use it to fight monsters but that means nothing to him. He complains that Amy can't walk, he can't think straight and yet Boris has been miraculously cured of tuberculosis. Boris tells him that this means Kosov is near. Indeed Bloom and Kosov enter immediately and Bloom claps a strange-smelling rag over Amy's nose. When she wakes up she is strapped to her wheelchair on the beach. She is surrounded by fog watching a man emerge from the sea.
Bloom is pleased when Kosov tells him that Mr Pond has been taken care of and that Amy is safely on the beach. Maria and Dr Smith have been tied up in the study and the windows open to let in a storm as well as a towering creature. It flows like lava and looks like green meat. As it leans over Maria to absorb her she calls Dr Smith's secret name: Rory.
Dr Smith is in the room with the box that says DO NOT OPEN TILL CHRISTMAS. It is time to open the box. He is not the Doctor at all.
Rory announces his real name to the Blooms. He taunts them that the real Doctor has now got his memory back and is on the way to save them. Bloom laughs and says that the Doctor has been thrown off a cliff. Rory asks Maria to reach a pen out of his pocket. She twists herself to take it and realises that it is not a pen but has a pretty light at one end. She squeezes it and a hideous noise is emitted, driving the creature back and causing Madam Bloom to collapse. Rory manages to pull Maria's ropes free and then, chair still tied to his back, he runs from the room with her. Bloom dismisses the creature and his wife assumes control, tidying the room and ringing for servants to find the escapees.
On the beach a switch in Amy's head tells her that the figure approaching her is the Doctor. Yet, at the same time, she knows that the Doctor is dead and this is a creature that looks like him.
Snow has fallen and the patients are wheeled to the beach in the morning. Amy's chair is pushed by the creature that looks like the Doctor. Perdita is delighted that soon they will learn everything about the strangers. He knows that the spirits of The Sea give the patients what they want and in return it learns about them. The fog rolls up towards her.
Amy recalls the crash of the TARDIS and the three of them had stumbled onto the beach. The Doctor was aware of a psychic probe and gave the screwdriver to Rory. As Amy watched, puzzled, the Doctor seemed to freeze while Rory spoke in words that could only be coming from the Doctor's mind. Amy ran to the TARDIS to see if there was anything inside to help but the door slammed shut before she got there and the Doctor's voice in her head apologised as she collapsed to the sand.
Now she watches as figures coalesce from the mist and walk up to the patients in their chairs. The patients recognise the figures and begin to smile and laugh before standing up to dance. Amy asks the Doctor if he is real and to convince her he treads on her toe to show that he can't dance. He tells her that his psychic force field is in place and protecting Amy, too. He says he has scattered some false memories of Amy's for the mind parasite in the sea to devour and buy them some time. He also tells her that Rory has regained his memories and that his own came back as a result of being thrown from a cliff. He says he was using Rory's head as a temporary safe place for his own memories but they are safely back (except for a recipe for chutney).
Marie enjoys her night of hiding with Rory until they are found under a dining table by Amy and the Doctor. The Doctor insists that they hide in Prince Boris's room where they tell the prince that they are time travelers from the future. The Doctor surmises that the expense of Bloom's remarkable cure means that only the rich and the powerful can afford it. He says that the cure is being y a hive of sentient aliens called The Familiar. The problem is that these benevolent creatures are being manipulated by somebody. Boris tells him that he was virtually brought up by the servant Kosov who he saw as a surrogate parent. Later, they parted, but when Boris fell ill and was told about Bloom's hotel he was delighted to find Kosov already there waiting for him.
Kosov stands with the Blooms and tells them that the Doctor was not the Familiar. That one was lost in the water. Rory approaches them diffidently. He says that he appreciates what Bloom has been trying to do but wants to let him know that the Doctor always gets his way and that there is no point standing up to him. As he turns to go he begins to cough up blood. The Blooms take him indoors and make a diagnosis. They tell him the treatment can begin at once.
The Doctor is furious that Rory has crept away to talk to the Blooms but, after a furious argument with Amy, he is persuaded by Maria to go and rescue him.
Mr Nevil is perplexed. After his treatment began he started to see Olivia Elquitine as attractive but she has grown cold towards him since she has not been allowed onto the beach. Meanwhile, the Doctor speaks to Bloom and tells him how convenient it seems that Rory should fall suddenly ill and need to take the cure. Bloom, on the other hand, is quite taken by the idea that the Doctor is from another planet: a fact imparted earlier by Kosov.
On the beach, Rory watches the fog roll in towards him. Amy is there to comfort him and they talk about his fear, despite all the brave things they have done and the dangers they have encountered. At the last, Rory whispers to Amy that she isn't real. He realised this when neither of them mentioned that he was tied to his chair. While this is happening Boris calls Bloom to his rooms. He gives the doctor a gun as a present and tells him that soon somebody is going to try to kill Madam Bloom.
Amy wants to know why they can't cure Rory with space medicine from the TARDIS. The Doctor tells her that he can't find his ship; he thinks it may have shifted in time and space but it is nearby and he expects it to turn up soon if the Familiar haven't already got it. He won't let Amy go to the beach to rescue Rory because he knows the Familiar will perform the cure and in so doing they will learn enough about the Doctor to not take him on in a fight.
Bloom ruminates on the change that overcame The Sea when it stopped accepting everybody who needed to be cured and began picking only politicians, soldiers of high rank and other people of power. It was particularly interested in Prince Boris. Despite his indolence he came from a family renowned for its cruelty.
The Doctor and Amy visit the dining room where a few very sick patients are sitting. The Doctor calls them to attention and says to them that the cure they have been hoping for is not coming. He apologises but says that he has come to take their hope away. The patients look scared but the Blooms appear in the room and reassure them that the Doctor isn't a medical man. The Doctor begs Bloom to stop using the thing on the beach. He accuses Bloom of infecting Rory but Bloom denies it. The Doctor notices that all of the patients have gone quiet as though something has got into their brains. A gust of wind blows the French windows in and the candles go out. The room is lit by an eerie green glow from the floor. Fog pours out of the patients' clothes. Nevil points a gun at some of them but lightning from the mist knocks it from his hand. The Doctor tells Amy that the fog is after him and he runs towards the door.
Bloom and Perdita escape, too. She says that she is scared because something is pressing into her brain. She can feel that The Sea is not happy because someone has woken up and taken hold. The Doctor tells Amy the same thing as they run down the corridor. She decides to ignore the Doctor's words and runs to the beach to rescue Rory. Maria is cut off by the Elquitine sisters but they are hunting somebody else. In panic she hides in the cupboard under the stairs where she finds the Doctor. He asks her to find Prince Boris because it is possible that Kosov is controlling things and the prince may be able to influence him.
She finds the prince playing cards and joins him for a game. Kosov enters and chases Maria until Boris intervenes. He asks Kosov how old he is. The answer, 35, is a problem for that is how old he was when Boris was only four. This immobilizes the giant servant and Boris announces that he knows Kosov is only a ghost. Kosov slips to the ground, his face melting, as Boris laughs. Maria flees.
Perdita can feel the demise of Kosov and slides to the floor. Bloom races to the prince's rooms and finds Kosov melted to a lump of wet clay. Boris announces that he killed the apparition since he had no more need of him. He announces that he now wants to meet the creature on the beach so that he can show it who the boss is.
On the beach the Amy Familiar tells Rory he was only given enough disease to make him trust her and now she has learned what she wants from him he can be cured. At that moment Boris arrives through the mist and tells Rory that it was his idea to let Kosov infect him. The Amy creature describes what she has learned of the TARDIS and the Doctor and asks if she can let Rory go. Boris answers in the negative saying that she must drain Rory dry. They dance on the beach until they are exhausted. Around them the other patients are suffering a similar fate.
Maria runs back to the Doctor and he leads her to Bloom's study, which is empty. He needs to think about what to do. He tells her he could solve everything easily but doesn't want to for fear of the consequences. It is then that Bloom returns. Bloom asks for the Doctor's help but the Doctor says he needs to find out who is behind things before he weakens the creature's psychic connection. Boris staggers in through the French windows and says he has something wrong with his mind. Resolved, the Doctor asks Bloom when he first met Perdita. When Bloom struggles to remember the Doctor says that Perdita is a Familiar. She promptly melts away. The Doctor apologises to Bloom but adds that the link to the creature is broken. Boris contradicts him: the way is now clear for the prince to exert his control. He says that he has been shaping the Familiar's actions for a while now, and he is going to use it to help him wage war on the world.
The real Amy's arrival on the beach causes the fake Amy to vanish into the mist. They try to stop the other patients from dancing but a baby Familiar drags Rory into the sea. When Amy runs to help him a fake Rory tries to pull her in but she recognises him at once. Both Amy and Rory get back onto the beach and stop some of the dancers. A storm starts to rage around them and the Doctor appears prisoner of the Elquitine sisters. They drag him to the sea while he tells them that this is a bad idea. He sinks to his knees and pleads with Boris, who has also arrived, not to do this. When the prince says that the Sea has much to learn from the Doctor it has a surprising effect. The Doctor stands up to face the prince and the mists part around him. Bloom arrives with the pistol and shoots the Doctor in the head.
Rory picks the Doctor up and carries him into the Sea. The sea turns green but the Doctor is cured by it. He doesn't thank Rory, saying that all he wanted was to stop the Sea scanning him but now it has. He tells everyone to run. The Sea howls and a gale blows. Figures pour into the sky, screaming. The beach explodes.
Maria wakes up on the beach. The Doctor is beside her, building sandcastles. She helps him while he tells her that he has put blankets over all the others on the beach to stop them catching cold. Sadly, he tells her that he tried to stop the creature getting into his mind but once it did it experienced all of his pain and loss. Now there is only a ghost of the creature left. When the Doctor finds Boris the prince is in bed reading a paper. The Doctor tries to moralize but Boris is unrepentant. He says he has a few books to read before he dies but the Doctor says they need to be short ones. He goes to find Rory and Amy. He tells them that those who were cured by the Sea will stay well but the others will have to trust Doctor Bloom. Some, like Nevil, greet the news of their impending death with cheerful resignation. Next, the Doctor finds Bloom and tries to make some sort of peace. He notices that Bloom has a pile of Maria's letters to her mother. Bloom says that he keeps them because he cannot send them on since Maria's mother abandoned her daughter. He says that the real Maria died before her mother fell ill. The Sea created a Familiar of Maria to cure the mother but it was left behind when she returned to Paris.
The TARDIS appears on the beach the following morning. The Doctor and Rory head to it, followed later by Amy and Maria. To the little girl's delight the Doctor introduces her to her mother who says that they are not going back to Paris but will travel together for a while. As the couple departs, the Doctor tells Amy that the ghost of the creature had just enough energy to create one last Familiar. They enter the TARDIS.