By 1913, the outlaw gangs of the Old West are rapidly disappearing. Under the leadership of aging Pike Bishop, one such gang rides into San Rafael, Texas, to rob the local railway office. Though dressed in U.S. Cavalry uniforms, Bishop and his men--Dutch Engstrom, brothers Lyle and Tector Gorch, and a young Mexican, Angel--are ambushed by bounty hunters led by ex-convict Deke Thornton, a former member of Bishop's gang who must pursue his old friend or return to prison. When a group of temperance marchers are caught in the crossfire, the ambush turns into a massacre that ends when Bishop's men escape into Mexico and the bounty hunters stop to loot the corpses. At a rendezvous in Mexico with Sykes, an old, broken-down gunslinger, the gang discovers that the stolen railway bags contain iron washers instead of money. Accepting their bad luck, they ride to Angel's home village, where they learn that the bandit general Mapache, a sadistic opponent of Pancho Villa, has killed Angel's father and ridden off with the youth's sweetheart, Teresa. Though Angel kills Teresa in public when he finds her with the general, Bishop intervenes on behalf of the boy and makes a deal with Mapache whereby Bishop's gang will rob an army munitions train and sell its load of rifles to the bandits for $10,000. In spite of the presence of Thornton's bounty hunters on the train, Bishop's gang hijacks the vehicle and escapes with the army rifles. Angel, who has given a carton of munitions to the people of his village, is seized and held prisoner by the bandits. Because loyalty to one another is all that remains, the "wild bunch" demands Angel's release; but when the demand is made during a drunken celebration, Mapache slashes the boy's throat. Bishop kills the bandit chief in retaliation, thereby setting off a slaughter in which the entire gang, as well as hundreds of Mexicans, are killed. Thornton and his bounty hunters arrive to collect the bodies of the ransomed outlaws; but when all except Thornton ride out of town, they are shot down by Sykes and the peasants from Angel's village. As the Mexicans tie the sacks of gold to their horses, Sykes and the weary Thornton decide to become a team.