 Friedrich Dürrenmatt (qv) wrote the screenplay (together with  Hans Jacoby (qv) and Ladislao Vajda (qv)) while at the same time  developing the novel form of the story under the title "Das  Versprechen" (The Pledge). He finished the novel after the film was  completed and gave it a different, much darker ending.