Jefferson Harder, a Union Army sergeant, rides into a casino in the Wyoming Territory in 1869 and, within minutes, starts a brawl. He’s thrown through a window just as the garrison’s soldiers arrive to take him back to the fort. At the fort, Gen. Augur explains that the cross-country railroad project near Laramie has stalled because Jim Shanessy runs the town and wants the workers to stay on site, gambling and spending money at his hotel and casino. Only the threat of a blockade persuades Jeff to accept the assignment. He’s wary, especially since his arrival in Laramie is met with resistance from the chief railroad engineer, Lee Graham, Judge Pierce, and Mayor Frank Logan, who had hoped he would bring troops.
Graham, Pierce, and Logan are stunned when Jeff greets Shanessy warmly—his childhood friend. Shanessy offers Jeff free board at the hotel, but when Shanessy’s henchmen, brothers Con Winton and Ace Winton, present a two-thousand-dollar gift, Jeff recognizes it as a bribe. In the lobby, he agrees to meet later that night with Pierce and then checks in with the marshal, Orrie Sommers, urging him to ready the jail cells.
In the casino, Shanessy introduces Jeff to his partner, Lou Carter(/actor/mari-blanchard), but Jeff rejects Lou’s advances and returns the money. Shanessy remains affable even after Ace threatens Jeff and gets beaten in return, and he hopes Jeff’s lingering feelings for Shanessy’s wife, Helen Shanessy, will keep him from taking charge. Later, Jeff meets with Graham, Pierce and Logan, and, armed with their promise of broad authority, he surveys the work site where the men drink, gamble, and sleep. After Jeff knocks out the foreman, the others retreat, and he moves to shut down the makeshift saloon. The next day, Jeff posts notices firing all the men and suspending construction, provoking complaints from workers and town merchants alike.
Graham calls a council meeting; some merchants push for Jeff’s court-martial, but he argues that he can purge gambling and alcohol and keep only the workers who want to stay, winning a two-week trial. Shanessy counters by denying workers credit, and when the crowd riles into an angry mob, he uses it to destabilize Jeff’s plan. Jeff arrests Shanessy, and that night Lou invites him to her room, explaining that no local jury will convict Shanessy and offers her help. A wary Jeff kisses her but leaves, unsure of whom to trust.
At the jail, Shanessy persuades Jeff to visit Helen, and when Jeff leaves her house, he’s too drawn to her to stay. Shanessy’s men beat him and load him into a railroad car. The next morning, Jeff’s absence triggers a mistrial. Shanessy orders the workers to burn the railroad camps, and crooked juries dismiss every remaining arrest. He sends for backup troops, but shuts down the telegraph and, anticipating Jeff’s move to consult Gen. Augur, engineers a landslide that blocks the tracks.
Graham, Pierce and Logan press Jeff to rehire the workers, and Orrie is dispatched to Cheyenne to secure a court-martial. Orrie is killed on the trail, and Lou tells Jeff that Shanessy is behind it, but the only way to convict him is to form a jury drawn from the Wyoming women who have just won the right to vote. Still doubtful, Jeff confronts Shanessy; Ace pulls a gun, Jeff shoots Ace, and Shanessy is re-arrested. Lou serves as foreperson on the all-woman jury, and the verdict is a shock to Shanessy—the jury finds him guilty. Jeff thanks Lou, and when she initially resists, he pulls her into his arms.
On the night before the hanging, Helen slips Shanessy a gun. He uses it to knock out Jeff and races to Lou’s, shooting Lou in the back. Jeff revives, gathers a posse, and Shanessy commandeers a train toward Cheyenne, unaware that the landslide has been cleared and a passenger train is bearing down. Jeff speeds to the locomotive, fights his way to the front, and, with the other train close, knocks Shanessy off and reverses the lead just before disaster. Weeks later, railroad construction resumes, and Jeff reports to a recovering Lou that he must return to the Army for six months, but he will make Laramie his home base.