A policeman (Nyman) who is a patient at a hospital in Stockholm is brutally murdered, stabbed repeatedly with a bayonet. The investigation that follows is led by Martin Beck and Einar Rönn. It turns out that the murder...展开ed man had sadistic tendencies and was known among his colleagues for abusing his police privileges and brutalizing civilians. Although his colleagues had been aware of his behaviour, the police force's esprit de corps had suppressed complaints about him and prevented any reprisals.
The investigation proceeds, and finally Beck and his team find a trail that leads to the murderer, who turns out to be an ex-policeman named Eriksson. Eriksson's wife Marja had diabetes, and one day, in need of insulin, she had fallen into a coma. She was mistaken by the police as a drunk and put in a jail cell, under the orders of Nyman, where she died. Eriksson blamed the police force for the death of his wife. Now, some years later, he has become a social misfit and the authorities are in the process of removing his daughter Malin from his custody.
As Beck and his team close in on Eriksson he climbs up on the roof of the apartment building where he lives in central Stockholm, bringing with him both an automatic rifle and a sharpshooter's rifle. He starts to fire at any policeman and police vehicle he can spot, picking off several policemen. When the police commissioner decides to bring in the anti-terrorist units, including two police helicopters, Eriksson shoots up one of the helicopters such that it crashes on a crowded plaza near the building where he resides. Beck tries an individual initiative, climbing to the roof on a flimsy external ladder, but is shot in the chest, although he survives. Finally, two other members of Beck's team, along with another policeman and a civilian resident in the building, use explosives to gain access to the roof, and Eriksson is shot in the shoulder and arrested.