Anna (Emily Browning) has been in a psychiatric institution for ten months, following her suicide attempt after her terminally-ill mother died in a boathouse fire. Now she is being discharged and has no memory of the fire, only dreams about it that involve three strange children. While packing, Anna is startled by a talkative patient. She is finally able to leave with her father, Steven (David Strathairn).
At home, Anna reunites with her sister Alex (Arielle Kebbel). The sisters are very close, and they are united against Steven's girlfriend Rachel (Elizabeth Banks), who was their mother's live-in nurse. Alex criticizes Steven for sleeping with Rachel while the girls' mother was still alive, but he ignores her. Anna describes to Alex how scenes from her dreams have started happening while she is awake. The sisters become convinced that their mother is sending a message: the fire was murder, and Rachel is the killer.
Anna sees her old boyfriend Matt (Jesse Moss) and kisses him. He tells her that he saw everything at the fire and the two secretly plan to meet, but he doesn't show up. Later, she awakens from another dream to find him climbing into her window. He says she needs to know the truth; he had a warning from her mother. His body warps, his back breaking. Anna runs from the room and suddenly it is morning and Matt's dead body is pulled out of the water, his back broken just the way Anna saw it.
The sisters are unable to find a record of Rachel with the State Nursing Association. Finally they learn she is actually Mildred Kemp, a nanny who killed the three children from Anna's dreams because she was obsessed with their widowed father. They try to warn Steven but he gets upset and leaves for work. The girls try to gather evidence but they are confronted by Rachel who drugs Alex. Anna escapes and goes to the police. Skeptical, they call Rachel to sedate Anna and drive her home.
Rachel carries Anna to bed. Anna sees Alex in the doorway with a knife and passes out. Later, Anna wakes and finds a large blood trail leading to the dumpster and Rachel's body inside. Alex is nearby with the knife. The girls comfort each other, and Steven comes home. Anna explains that Rachel attacked them and Alex saved her. Confused, Steven says that Alex died in the fire. Anna sees she's not holding Alex's hand like she thought, but the bloody knife.
Anna finally remembers the fire. After catching her father and Rachel together, Anna filled a watering can from a large gasoline tank in the boathouse and carried it toward the house, intending to burn it down. She left a trail that ignited when a candle fell over; Alex and her mother were killed in the resulting explosion. She remembers meeting Matt as planned and killing him. Flashbacks reveal that whenever it appeared as if the two sisters were together, Anna had always been alone. Anna realizes that Steven was not ignoring Alex earlier; her sister was never there. She sees that she had the knife used to kill Rachel all along.
Steven tells the police that Rachel changed her name because of an abusive boyfriend as Anna is arrested and taken back to the institution. The police ask why Anna would make up the Mildred story but Steven has no answers. Anna is welcomed back by the patient that scared her earlier; the name plate on the door says "Mildred Kemp".