In 1878, a hardened American gunfighter Sean Lafferty, known as the Montana Kid, carries a bounty on his head for killing eleven people across the western United States. He arrives in a quiet town at the foothills of the Canadian Rockies, a place that does not understand or share the brutal code of the American Wild West.
After being helped off his horse by Adell Kwon, he heads to the town general store. When he leaves, he discovers his horse is gone and immediately accuses Jack Smith, the blacksmith, of stealing it — though Jack had simply been replacing the horse's damaged shoes. After unsuccessfully trying to intimidate the blacksmith, the Montana Kid challenges him to a duel. Yet since Jack is unarmed, Sean cannot shoot him, because the code he lives by forbids killing unarmed men.
Local resident Jane Taylor offers a different bargain: she will give him her broken pistol to fix and pass along to Jack if he agrees to build her a windmill. Sean accompanies her and stays in a sod house on her farm, switching between building the windmill and repairing the gun. Over the course of a few days, he starts to develop feelings for Jane and also befriends the townspeople.
Meanwhile, a roaming band of American bounty hunters crosses into Canada, heading for the town to collect the price on Sean's head. After Sean has repaired the pistol, the long-awaited duel takes place. He deliberately aims to miss Jack, signaling that he is ready to stop running and perhaps even die for a cause he believes in. When he tells Jack to pull the trigger, the gun jams. He wrestles the pistol back from Jack to inspect it, but fires accidentally, and the ricochet hits Jack in the left buttock. Dr. Angus Schiffron removes the fragment from Jack, and the two men decide they are even, with Sean preparing to ride away.
But the moment he starts to leave, the bounty hunters ride into town. They threaten the locals to hand over Sean, yet the townspeople raise rifles and shotguns in a show of collective resistance. Sean comes back and tells the bounty hunter leader he will go with them only if Ben agrees to leave everyone else alone.
Ben Cutler agrees, but not before resident Larry triggers a planned explosion by detonating dynamite under a stump on his farmhouse, creating a distraction that sparks a final gunfight. Sean and the townsfolk prevail, taking out Ben's crew without killing any of them. The bounty hunters are routed by the North-West Mounted Police, and Sean chooses to stay in town, not only to settle debts but also to remain with Jane.