Various factions, including a half-breed bandit, a gang of homosexual cowboys and a priest, feud over stolen gold in a surreal town.
The Stranger, a half-breed bandit, is part of a band of thieves that steal a cargo of gold from a stagecoach. However, the Americans in the band betray him, and shoot all the Mexicans. The Stranger is not completely dead though, and crawls his way out of his shallow grave, continuing his pursuit of the gold, and exacting a bloody vengeance.
- One evening, a pair of Indian medicine men encounter a wounded bandit, a nameless half-breed known only as 'the Stranger' (Tomas Milian), crawling out from a mass grave; they nurse him back to health. During his recovery, he remembers an assault on a Wells Fargo covered wagon guarded by US Army troops. The Stranger, his partner Oaks (Piero Lulli), and their gang killed the troops, whom they caught swimming in a river, and stole a strongbox containing bags of powdered gold from the wagon. However, Oaks and the white members of the gang betrayed the Stranger and the Mexican bandits, and forced them to dig their grave before gunning them down. In the present, the two Indians inform the Stranger that they have smelted his share of the gold into bullets, and that they wish to be his companions so that he can tell them about the happy hunting ground.
Oaks and his gang arrive in a nearby town (referred to by the Indians as "The Unhappy Place"), where they attempt to buy horses and food with their gold. Bill Templer (Milo Quesada), the saloon owner, recognizes Oaks from a wanted poster. Templer and Alderman (Paco Sanz), the town pastor, lead an armed mob in lynching all of the bandits except for Oaks, who barricades himself in a store. The Stranger arrives and shoots the frightened Oaks. Wounded, Oaks is operated on in the saloon, but is killed when the townspeople try to pull the gold bullets from his body. The Stranger spends the night in the saloon, haunted by what has transpired. Templer and Alderman argue over what shares of the bandits' gold they should receive; Flory (Marilu' Tolo), Templer's mistress, becomes aroused as she watches the proceedings. Templar's unstable son, Evan (Raymond Lovelock), destroys some of Flory's clothes in anger after seeing her watch the argument. Sorrow (Roberto Camardeli), an eccentric, homosexual rancher, orders Templer to surrender the gold.
When the Stranger and the two Indians cut down the hanging corpses of the bandits to bury them, they are ordered to leave town. While horse-hunting, the Stranger witnesses Evan being kidnapped and held hostage by Sorrow's "muchachos" (bare-chested henchmen). They return to Sorrow's ranch, where he offers the Stranger work, throws a party and sends a messenger to town to inform Templer of the kidnapping. Templer lies and insists that Alderman has the gold. Sorrow orders Evan killed, but the Stranger saves his life via a drunken shooting game, and Sorrow allows him to live. Whiskey-sodden, the Stranger is unable to help Evan as he is surrounded by amorous muchachos. The next morning, while Sorrow, the Stranger and the other men sleep, Evan takes a gun and commits suicide.
The Stranger returns to town with Evan's body. Enraged by his death, he gets into a savage brawl with Templer and several locals. Knowing that Sorrow will have their saloon searched, Flory and Templer hide the gold in Evan's coffin. Alderman invites the Stranger to live with him, and encourages him to have an affair with Elizabeth (Patrizia Valturri), his half-mad wife who is kept locked up in her bedroom.
As the Stranger and Elizabeth become attracted to each other, Alderman kills Templer with the Stranger's pistol, placing the blame on him. Flory, witnessing the murder, flees and tells the Stranger what has happened, and that the gold is now in the graveyard due to Evan's burial. Alderman leads the townspeople in a search for the Stranger, during which one of the Indians is scalped and Flory is shot dead by Alderman. Sorrow's muchachos capture the Stranger, crucify him and torture him with vampire bats; he confesses that the gold is in the cemetery. Sorrow's gang uproot the graveyard, but find that Alderman has already dug the gold up. The surviving Indian frees the Stranger, who kills Sorrow's men using a horse laden with dynamite, and shoots Sorrow in his boudoir.
The Stranger returns to town, where he finds that Alderman's house has been set on fire by a distraught Elizabeth. Alderman opens a cabinet to retrieve his gold; having turned molten, it smothers his hands and face. The Stranger and the townspeople watch as Elizabeth and Alderman, covered in boiling gold, die in the flames. Alone once again, the Stranger rides out of town, where he passes by two children using strings to distort their faces.