An old legend tells of a fortune in gold hidden in the "CaÃ±on del Oro," guarded by the Apache spirits. Along with several others, a man named Adams found it when he was a young man, only to have the Indians capture and blind him, leaving him stranded in the desert after killing his companions. Years later, Marshal MacKenna (Gregory Peck) wounds an old Indian shaman named Prairie Dog (Eduardo Ciannelli) who tried to bushwhack him; Prairie Dog subsequently dies, despite MacKenna's attending to him. MacKenna thereby comes into possession of a map that supposedly shows the way to the treasure. Though skeptical, he memorizes the directions before burning the map.Meanwhile, Mexican outlaw John Colorado (Omar Sharif) and his gang had been tracking Prairie Dog to get the map, all the while being chased by the U.S. Cavalry. He takes shelter in the house of the old judge of the town of Hadleyburg, stealing horses, mules and food for his journey. He kills the judge and kidnaps his daughter, Inga Bergmann (Camilla Sparv), whom Colorado mistakes for the judge's wife, as a hostage in case the cavalry catches up with him.Colorado finds MacKenna digging a grave for Prairie Dog and when he learns that MacKenna has destroyed the map, he takes him captive and forces him to lead them to the gold. Colorado also loads Prairie Dog's body onto a horse to bring along with them to Colorado's old hideout, which he has begun to use for shelter again. The gang is made up of outlaws, including Colorado's right-hand man, Sanchez (Keenan Wynn) and several Indians, amongst them a hulking Apache warrior named Hachita (Ted Cassidy). Colorado and his companions have a previous history with MacKenna after being driven out of the state by the Marshal years before, while a fiery Apache woman, Hesh-ke (Julie Newmar) had been MacKenna's one-time love.The next morning, Ben Baker (Eli Wallach), a gambler and old friend of Colorado's from the town of Hadleyburg, arrives with a posse of townsmen who have become "infected" by "gold fever." Those amongst "Ben's friends" are two Englishmen, (Anthony Quayle and J. Robert Porter), who came along after overhearing Baker's conversation with the others about the gold; an editor, (Lee J. Cobb); a storekeeper, (Burgess Meredith); a preacher, (Raymond Massey), who has convinced himself that God has called upon him to build a tabernacle in His honor with his share of the gold; and the blind Old Adams (Edward G. Robinson) himself. Colorado persuades Old Adams to relate the story of how he discovered the canyon, only to be left alone in the desert by the Apache. This only further raises tensions and hopes in the party. MacKenna tries to allow the townsmen the opportunity to leave under the cavalry's escort, led by the cunning Sergeant Tibbs (Telly Savalas). MacKenna insists that the townsmen will get themselves killed searching for the gold, but Colorado steps in and convinces them to stay after "confessing" that their town's leader, the Judge, was murdered by accident, and revealing that MacKenna shot Prairie Dog.The party bypasses the encamped cavalry by having two of Baker's men drop off a drunken squaw and make it appear that they are being pursued by Apaches. As MacKenna's group plans to make a final rest stop at a water hole, the cavalry ambushes them. All, except for MacKenna, Colorado, Inga, Hesh-Ke, and Hachitaâand perhaps a few others whose fates are left ambiguousâare killed by nesting cavalry soldiers that received information about their whereabouts from the squaw; or, later on, by marauding Apaches trying to prevent the exposure of the gold from outsiders (or, more likely, keep the gold for themselves in order to buy arms and ammunition from gunrunners). During this attack, the body of Prairie Dog is lost as well, although it turns up later being led for proper burial by another Apache (scouting for the rival war party), whom Colorado quickly shoots away. As the remaining gold hunters near the canyon, MacKenna and Inga begin to fall in love, and a jealous Hesh-Ke tries to drown Inga at the water hole, only to be stopped by MacKenna.Meanwhile, Sergeant Tibbs periodically sends messengers back to his commanding officer, supposedly to keep him informed. Eventually, the patrol is whittled down to just Tibbs and two men. Inga is sent to Tibbs to divert their attention. Rather than escort Inga to safety, Tibbs kills his troopers. He returns her to MacKenna and the outlaws, wanting a share of the gold. After another shoot-out with the Apaches and crossing dangerous river rapids, they reach "Shaking Rock," a location on the map, to wait for the sun to rise on the specified day. The shadow of the pinnacle eventually points to the hidden entrance to the canyon. MacKenna, who had been skeptical, now begins to believe in the legend.The gold hunters find a canyon with a large vein of pure gold. As all race to the canyon floor, Hesh-ke tries to kill Inga but loses the horse-back struggle and falls to her death. While the rest are celebrating their great fortune, MacKenna escapes with Inga to an Indian dwelling high up the canyon wall, realizing that Colorado does not intend to leave any of the party alive. Tibbs, his attention diverted while stuffing his saddle bags with gold nuggets, is killed by Hachita by means of a thrown hatchet. Colorado tries to shoot Hachita but his guns had been emptied by Hachita the previous night. Hachita claims that the Apache spirits came to him in a dream and enlisted him to kill everyone, so that they could not poach their gold. As Hachita prepares to kill Colorado with the hatchet, Colorado manages to get him first with a knife he had in his vest pocket. He proceeds to pursue MacKenna and Inga up the cliff to the dwellings, where a three-way fight follows. Apaches tipped off by Hachita now attack, and the ensuing shooting and shouting leads to a rockfall. The Apaches flee, and the three survivors descend from the cliff dwellings and scramble for horses, barely escaping the collapse of the canyon walls, which buries the gold. This is followed by the crash of "Shaking Rock."Stunned from what has just happened, Colorado warns MacKenna to not chase him. He leaves in disgust, believing the gold has been buried beyond reach. Before MacKenna and Inga ride off together, the camera tilts down to the left saddle bag on McKennaâs mount. The saddle bag bears the initials âU.S.â, identifying McKennaâs mount as Sgt. Tibbsâ horse â the saddle bags of which are stuffed with gold nuggets.
Output: Question: Who does Sheriff McKenna kill?, Answer: Prairie Dog