Bill San Antonio, [Frank Wolff], accuses his old friend and partner Cat Stevens, [Terence Hill], of cheating at cards. Bud, [José Manuel Martín], the gang's most volatile enforcer, tosses a gun to Cat. Bill orders the others out and tells his henchman Bud to set fire to the house. Then they have a stand-up duel and Bill falls. When Cat emerges from the house the gang follows Bill's orders – Cat is allowed to leave. There is a funeral, though a burned body cannot be identified. After the funeral the men find that the loot of the gang is missing, and Bud says that Cat must have stolen it. On several occasions Cat is attacked by gang members and kills them, while Bud disappears.
This is told in flashbacks during the film. The story as shown begins with a train running into a town, filled with dead bodies. This train has been robbed and its passengers massacred, but one survivor identifies Bill San Antonio, though Bill had been supposed to be dead, shot by Cat in a duel. Cat is told this by Hutch, an old acquaintance who is now an insurance agent. Cat remembers that the gun he used in the duel was handed to him by Bud. He sneaks away at night with Hutch's horse and leaves it further on. Cat searches – followed at a distance by Hutch – and eventually finds the hideout of Bill's new gang. When sneaking into the house Cat is caught, but saved by Hutch. Using Hutch's considerable strength, they remove the box with the gold taken from the train, and hide it down in the ground by some cliffs. Then the two fall out, because Cat wants more than the percentage offered by the insurance company. As shots may draw the attention of the gang, they fight it out without weapons. Cat swings in a tree and kicks Hutch several times until Hutch finally knocks Cat out cold. Still dizzy, Hutch looks up to find that Bill and his men have arrived.
The two are tortured by what Bill knows that they can't stand, Cat by water and Hutch by fire, but they won't tell where the gold is. When Bill and most of the gang temporarily leave (to meet his secret partner), Cat suggests to Bud (who has been recently whipped by Bill for being too conspicuous in the nearby village and also blamed for the surviving witness at the train massacre) that he can lead him to the gold. After Cat digs up the box of gold, Bud is about to shoot him but Cat throws a knife lying by the box and kills Bud.
When Bill returns he sends his gang to search for Cat. Bill and two bandits find Cat in a cantina in the nearby Mexican village. After his two companions have been shot by Cat, Bill – held at gunpoint – suggests that they share the money, and forget Hutch. At Bill's lair the three men that are left there try to get the information from Hutch, but the man Bill assigned to guard Hutch, refuses to open the door. While Tago is occupied, Hutch breaks the wooden beam that he is bound to and beats him down. Then Hutch shoots the men when they break in through the door.
At the place of the gold, Cat intends to reproduce his first duel with Bill, but with dynamite instead of fire. While the fuse burns away, they move into position to draw, but are interrupted by Hutch, who is holding a rifle and tells them to drop their guns. He asks about the gold. When Cat says that the box is there but the content may not be the same, he tries to open the box while keeping an eye on the two. The fuse keeps on burning, and Bill draws a hidden derringer and shoots Hutch, but a hidden knife thrown by Cat wounds his hand. The two pick up their revolvers and shoot. Cat wounds Bill's other hand (that he drew with) and also shoots both his knees. While Bill crawls towards the kegs of dynamite and tries to bite off the fuse with his teeth, Cat carries the unconscious Hutch to cover. Then there is a big explosion.
In the concluding scene Hutch comes to, lying on the wagon with the bags of gold. Cat says that he has to have a bullet taken out of his head and that they will discuss the fate of the gold when Hutch is strong enough to hold a gun.