A mysterious gunman (Eastwood) has just arrived in San Miguel, a grim, dusty border town where two rival bands of smugglers are terrorising the impoverished citizens. A master of the "quick draw", the stranger soon receives offers of employment from each gang. But his loyalty cannot be bought; he accepts both jobs... and sets in motion a plan to destroy both groups of criminals, pitting one against the other in a series of brilliantly orchestrated set-ups, showdowns and deadly confrontations.