A poor village in Mexico is periodically raided for food and supplies by a gang of bandits led by Calvera (Eli Wallach). After the latest raid, during which the bandits kill a villager, the village leaders decide they have had enough, and on the advice of the village elder (Vladimir Sokoloff), they decide to fight back. Taking what few objects of value the village has, three villagers ride to a town just inside the United States border hoping to barter for weapons. They are impressed by Chris Adams (Yul Brynner), a veteran Cajun gunslinger, and approach him for advice. Chris suggests they instead hire gunfighters to defend the village, as "men are cheaper than guns." At first agreeing only to help them recruit men, Chris eventually decides to lead the group and, despite the meager pay offered, he finds five willing gunmen.
Fifty gunmen force all of the men in a small Mexican village to ride off with them into the desert. Among the captured farmers is Chico, who years before was one of seven hired gunslingers responsible for ridding the village of a tyrannical bandit, Calvera. Chico's wife, Petra, seeks out the other members of the band of whom only two, Chris and Vin, survive. She begs them to save the village once more. To replace the deceased members of the group, Chris buys the release of Frank (a taciturn gunman) and Luis (a famous bandit), held in the local jail and recruits Colbee, a ladies' man and deadly gunman, and Manuel, a young cockfighter.
In late 19th-century Mexico, Federales capture Quintero (Fernando Rey), a revolutionary who attempts to rally those opposing the Porfiriato of President Porfirio Díaz. Before going to prison, Quintero gives his lieutenant, Maximiliano O'Leary (Reni Santoni), $600 () with which to continue the cause. Bandit chief Carlos Lobero (Frank Silvera) demands that the money be used for guns and ammunition, but Max instead crosses the border in search of Chris Adams (George Kennedy): a legendary, American gunman whom his cousin had told him about. Max finally finds the laconic Chris, witnessing him free a man from a rigged trial, first by using his wits, then with the famed hair-trigger skill as a gunfighter.
In southern Arizona Territory, hired gun-turned-United_States_Marshals_Service#19th_century Chris Adams rescues his old friend, former bounty hunter Jim Mackay, from an ambush. Jim asks Chris to help him defend the Mexican border town of Magdalena de Kino from De Toro and his bandits, but Chris is reluctant.