In 1869, the war-impoverished people of Texas are being swindled by carpetbaggers from the North, and a member of the U.S. Army of Occupation sent to keep the peace, Capt. David Porter, who was reared in Texas, has been assigned to police a cotton auction. H. I. Standish, a corrupt tax assessor, has raised the farmers' taxes impossibly high and caused foreclosures. Despite the townspeople's suspicion and coldness toward him and his wife Norah, Porter feels that he should remain stationed there, so that his position is not filled by someone unsympathetic to the Texans' plight. Although his sympathies lie with the angry farmers, Porter carries out his duties, but then refuses to escort Standish and Balfour, the buyer with whom Standish is in cahoots, to deliver the cotton. On the way to the railhead, where the cotton is to be shipped north, Balfour's wagon train is raided by Ben Westman and his gang of outlaw Texans, who are fighting the unjust system. After burning the cotton, which Balfour bought at a rock-bottom price, the gang forces Standish and Balfour to return to town, shoeless and in their underwear. After they complain to Porter's superior officer, Lt. Col. Chandler, Porter is held responsible for his inability to stop Westman's recurring attacks. Later, for reward money offered by Balfour, a townsman, Henley, reveals Westman's hideout, and Porter is sent to arrest the gang with Capt. Bill Hodges, a cocky, trigger-happy, West Point officer who has been recently assigned to Texas with Army reinforcements. When Hodges preempts Porter's orders by attacking before the rest of the soldiers are in place, one man is unnecessarily killed and the rest of the gang escapes. Back at the fort, Hodges strikes up a friendship with Norah, who is homesick for the friends and civilization she left in the East, but then tries to force himself on her. Porter comes home in time to rescue Norah, but the men's professional relationship is now completely severed. Meanwhile, Henley, fearing Westman's retaliation, wants to get out of town and tries to collect the reward money from Balfour. Balfour kills Henley as Standish watches, then gets Westman blamed for the murder. Although Porter tries to make Chandler see that recent events are more complicated than they seem, Chandler orders him to bring in Westman. Using a cotton shipment as bait, Porter lures Westman into a trap and forces his surrender, but guessing that Westman did not commit murder, promises him a fair trial. However, Chandler has received orders from headquarters to hang Westman immediately under martial law. Porter begs for time to prove Westman's innocence. When Westman's men take Standish as hostage in exchange for Westman's release, Chandler moves up the time of the hanging, pending the return of Standish. Believing that Standish knows the truth about Henley's death, Porter sneaks out to talk to him and the gang, but his exit from town dressed as a civilian is seen and reported to Chandler by Balfour's men. Believing that Porter is in league with the gang, Chandler sends Hodges with some other soldiers to arrest them all. In the attack, Standish is killed after telling Porter about a written confession he left in his office, and Porter and Westman's men are captured. However, many of them, including Porter, manage to escape the soldiers, with the help of men in town. Porter sneaks to Standish's office and after he finds the papers clearing Westman of murder, Balfour and his henchmen show up. Porter is wounded in the ensuing fight, but shoots Balfour and his men, and manages to get to the hanging with the confession in time to save Westman. During the following months, the Army is pulled out of Texas and the government returned to the Texans. A year later, Texas is re-admitted into the Union, and Westman and his men are pardoned.