The novel by Peder Sjögren (published 1944) on which the film is based on is set in Valencia, Spain, but this film is set in Niterói, Rio de Janeiro, Brazil because director Lars-Magnus Lindgren wasn't satisfied with the Mediterranean filming locations.
Director Lars-Magnus Lindgren wrote several adaptations of the novel by Peder Sjögren. His first draft was handed to the production company Sandrews in 1964. With the production stalled, at one point there was interest from American financiers who planned to make it an international production with Anthony Quinn in one of the leading roles. Those plans eventually through when Sandrews refused to let Lindgren retain the rights to the screenplay. This eventually led to an agreement between Lindgren and Sandrews.
After the filming had completed in September 1967, the editing process and post-production was delayed for several months until January 1968 because director Lars-Magnus Lindgren had become ill.