After Ingmar Bergman made notes on his ideas for the film in his diary, drawing on his personal experiences in planning to meet and reconcile with his parents Karin and Erik Bergman, Ingmar wrote the screenplay on the island of Torö in the Stockholm archipelago.
Bergman claimed the inspiration for the character of Karin was a woman he had lived with when he was younger.