Doctor Wangel is a doctor in a small town on the west coast of Norway. He has two daughters by his first marriage, Bolette and Hilde. After the death of his first wife, he married Ellida (Joely Richardson), who is much younger than he is. She is the daughter of a lighthouse-keeper, and has grown up where the fjord meets the open sea. Ellida and Wangel had a son who died as a baby. This put an end to their marital relations, and Doctor Wangel fears for his wife's mental health. He has written to Bolette's former tutor, Arnholm, and invited him to come and visit them, in the hope that this will be beneficial to Ellida. But Arnholm misunderstands, thinking Bolette is waiting for him, and proposes to her. Reluctantly, Bolette agrees to marry her former teacher, seeing it as her only possibility of getting out into the world.
Ten years earlier Ellida had been engaged to a seaman. After murdering a captain he had to escape, but asked her to wait for him to come back and fetch her. She tried in vain to break the engagement. This stranger has great, compelling power over her, and when he returns after all these years to take her away with him, Dr. Wangel realizes that he must give Ellida the freedom to choose between staying with him or going away with the stranger. She chooses to stay with her husband, and the play ends with the stranger leaving, while Ellida and Dr. Wangel take up their life together again.