Co-written by Friedrich Dürrenmatt, the film is an adaptation of his 1950 crime novella The Judge and His Hangman (German: Der Richter und sein Henker).
After a disastrous funeral for the late Lieutenant, Tschanz strikes up a stormy romance with Schmied's girlfriend Anna (Jacqueline Bisset).
He finds a cryptic letter G regularly occurs in Schmied's datebook, leading him to Gastmann (Robert Shaw), who has become a wealthy industrialist with an expansive remote estate.
Gastmann's bodyguards force Tschanz off the property and he drives the Commissioner home, who quietly puts away a pistol and a leather bite guard from his arm that the dog had supposedly mauled.
Von Schwedi makes a formal complaint the next day to Lutz (Gabriele Ferzetti), the chief of police, and alleges that Schmied's undercover attendance at Gastmann's parties was a spy attempt by a foreign power.
Tschanz is frustrated by the dead end and perplexed by the behaviour of the Commissioner, who lives in an unkempt apartment and whose illness appears to be worsening.
As Bärlach promised, the next day Tschanz shoots Gastmann and his bodyguards and places the gun used to kill Schmied in one of the guards' hands.
Tschanz is startled to find Bärlach already aware of Gastmann's death and celebrating with rich food and ample wine in apparent exceptional health.