The script was originally offered to Zbynek Brynych, but he left the role of director to Juraj Herz, who had previously worked for him as an assistant director on Kazdá koruna dobrá (1961) and Transport z ráje (1963).
During the approval screening, the Barrandov executives were completely outraged by the scene of the female doctor masturbating. The scene had to be cut out.
The director Juraj Herz cast the actor Lubomír Cerník in the film even though he knew he was a heavy drinker. He ended up wanting to sleep all the time and refused to film. Herz literally begged him to continue. When the post-production was being filmed in the sound studio, Jirí Sovák had to overdub the part. Cerník was unable to do so, as he was in a rehab.
Editing changes and re-shooting of some scenes occurred after the film was purchased for Italian distribution by Carlo Ponti. It remains unclear whether this alternative version has survived.