the screenplay, by harry julian fink, oscar saul, and peckinpah, was loosely based on historical precedents. however, contrary to claims by the production team at the time, it was not actually based on a true story. the film's novelization was written by richard wormser. during the minnesota dakota war of 1862, union forces in that state were forced to recruit confederate prisoners from texas to make up for their meager numbers in fighting the indians. unlike the movie, where there is much animosity between the union and confederate troops in dundee's command, the rebels, called "galvanized yankees", fought well and without much complaint. both union and confederate forces also battled apache, navajo, and comanche indians throughout the war along the u.s.-mexico border, making the scenario of the movie at least somewhat plausible. before the film's production, peckinpah had been working on a custer project, based on the novel by hoffman birney "the dice of god", but later abandoned it for this film. (his screenplay was filmed by arnold laven, as "the glory guys").