Jed Cooper (Clint Eastwood), an ex-lawman turned rancher, is moving a small herd of cattle when a group of nine men on horseback, led by Captain Wilson (Ed Begley Sr.), ride up and accuse him of having stolen the cattle and killed their owner. They refuse to believe his account, stringing him up by the neck and leaving him for dead. Lucky for him, they don't do the job right, and as Cooper dangles there, barely alive, Deputy U.S. Marshal Bliss (Ben Johnson) spots him and cuts him down. After surviving the next few days in Bliss' tumbleweed wagon with the other prisoners, he is cleared of all accusations and released by Judge Fenton (Pat Hingle). Although Cooper witnesses the hanging of the man who really murdered the owner of the cattle and took Cooper's money, he still wants revenge on the nine men who tried to hang him. Fenton insists that he leave the bringing of them to justice to his deputy marshals. Cooper and Fenton, realizing that they need each other, strike an uneasy bargain, Cooper agrees to wear a badge and bring in the men he's looking for to be tried. This task proves easier said than done as Cooper experiences a number of difficulties in capturing all nine members and bringing them to justice. In the course of his quest, Cooper also makes the acquaintance of a young woman Rachel (Inger Stevens), with her own search for justice. The two of them are drawn together, no more so than when Wilson and two of the others try to gun Cooper down in cold blood. The final confrontation between Cooper and Wilson escalates in violence to its savage, irony-laced conclusion.