I picked up this seminal world of hard-boiled fiction on the grounds that it was an inspiration for both Kurosawa's Yojimbo and Leone's A Fistful of Dollars and had also attracted Bernardo Bertolucci at one point, though his attempt at making a more faithful adaptation of it appears to have came to naught.
One of Dashiell Hammett's Continental Op stories, it is told in the first person by the unnamed private investigator, a representative of the aforementioned agency. He arrives in the mining town of Personville AKA Poisonville, population 40,000, having been hired by one of the town's public citizens, Donald Willson.
The Op and Willson never get the chance to meet, however, with Willson being gunned down the same night as the Op arrives. He soon learns that Willson's was a relative newcomer in Poisonville but had already earned the reputation as an honest man and thus troublemaker, and that his father, Elihu Willson, had built up the town from nothing but then lost control over it during a labour dispute:
“[O]ld Elihu didn't know his Italian history. He won the strike, but he lost his hold on the city and the state. To beat the miners he had to let his hired thugs run wild. When the fight was over he couldn't get rid of them. He had given his city to them and he wasn't strong enough to take it away from them. Personville looked good to them and they took it over.”
The Op's confidant, a labour organiser named Quint, identifies four different figures who run the town from behind the scenes, maintaining an uneasy balance of power amongst themselves and with Willson: bootlegger Pete the Finn; bondsman and fence Lew Yard; chief of police Noonan and gambler 'Whisper' Thaler.
While his subsequent attempts to clean up the city see him make arrangements with and feed information to each of the five men, the scenario cannot really be described as a 'servant of two masters' plot in the manner of Leone's film, with the intrigue and conflict between the various figures considerably more complicated than that between the Baxters and Roho, and the Op tending to present himself as more of a neutral power broker rather than identifying himself with any faction.
The Op also brings in some outside help in the form of another couple of men from the agency rather than being self-reliant, although their role is primarily that of observers and might be compared to that of the coffinmaker and barkeep in Fistful.
There is also less sentimentality than Leone's film, with no counterpart to the 'holy family'. Instead the two women who appear, Willson's widow and especially Dinah Brand, who is out for whatever she can get from the Op and the other men around her, are hard, uncaring figures.
A good read in its own rights and an interesting one in seeing how things changed cross-culturally when it was liberally adapted for the screen. (Though the most faithful in its prohibition America setting, Walter Hill's Last Man Standing also takes liberties with the source material, in giving Bruce Willis's character a more heroic role in defending a prostitute and in again reducing the number of factions and subplots to more manageable numbers.)
Also of note, though more in terms of the giallo, is a subplot late on where the Op is uncertain whether he has committed a murder himself and must thus find the real perpetrator before he is caught by the (corrupt) police.