A lot of the car scenes were shot in downtown Stockholm without permit from the police, often with hidden camera crews and crew contact only through walkie-talkies. Eventually, the film crew were stopped by civilian police, who let the matter pass when they recognized Sven Wollter from his previous police film Man on the Roof (1976), jokingly telling him: "Aha, a colleague!"
The film is loosely based on the discovery of the real-life Swedish Minister of Justice's liaisons with prostitutes in the 1970s. It was a major scandal where the truth was believed to be largely covered up, and Leif G.W. Persson, who at the time was the source within the national police authority who blew the whistle to a newspaper, was discharged and found comfort in writing the book that the film is based on.
The post office staff in the beginning were the real-life staff from the real post office being robbed in the film.
The author Leif G.W. Persson, who wrote the book the film was based on, was eager to get a cameo. Initially unwilling to use any amateurs, the director Bo Widerberg was won over when Persson pointed out that Widerberg had become famous for using the then-unknown Pia Degermark in his film Elvira Madigan (1967). However, Persson claims, he was cast as a corpse in the trunk of a car - the trunk lid remaining closed throughout the shot.
The title of the book that the film is based on is "Grisfesten" (The Pig Feast), but director Bo Widerberg changed the title to avoid confusion with Sällskapsresan eller Finns det svenskt kaffe på grisfesten (1980), a very light-hearted comedy which subtitle translates to "Will there be any Swedish coffee at the pig feast". Also, seeing as this was Widerberg's first proper cinematic release since the highly successful Man on the Roof (1976), both police films, the title chosen connected to the former, both starting with "Mannen" (The Man).