Pop culture always tells the stories of the outlaws of the Wild West. Lying, cheating, drinking, robbing banks, holding up train cars, getting into shootouts at high noon — these are all objectively cool things that make for great tales, but they're often overplayed for the sake of storytelling.
In reality, the Wild West was much tamer than most storytellers make it out to be. You were much more likely to die of some mundane and awful illness, like dysentery, than be gunned down in the streets as part of a duel. This is because the lawmen of the time were experts at what they did. And that's all thanks to one former spy: Allan Pinkerton.
Sometimes, it pays to help out a small-time lawyer with big aspirations.
Allan Pinkerton first got into detective work before the Civil War. He was living in Chicago when he developed a grudge with the Banditti of the Prairie Gang. They suspected his home was used as a stop on the Underground Railroad, so they sacked it. In response, Pinkerton trailed the Banditti of the Prairie Gang, infiltrated their hideout, and observed their activities. He compiled a detailed report, handed it over to the Chicago Police Department, and they successfully took down the gang.
For his actions, he was given the title of Detective and went on to found the Pinkerton National Detective Agency. His first jobs mostly consisted of protecting abolitionist meetings, aiding John Brown during his raid of Harpers Ferry, and investigating a series of train robberies on the Illinois Central Railroad. His contact for the railroad gig was the company's lawyer, a man by the name of Abraham Lincoln.
If you look at the guy's track record, pretty much all detective, security, and bodyguard work in America can all be tracked to Pinkerton. He was kinda like the real life Sherlock Holmes.
(White House photo by Chuck Patch)
Detective Pinkerton was the first man the then-President-elect Lincoln called when he caught wind of an assassination attempt on his life. The killers planned on striking when Lincoln was en route to his inauguration. But when he successfully made it there in one piece (albeit a bit late), Pinkerton's skills got national recognition.
He was given command over the Union Intelligence Service, a predecessor of the U.S. Army Counterintelligence Command. Despite his high authority, he would often go out on spy missions in the deep South himself. Eventually, Pinkerton handed the reins to Lafayette Baker, who'd later also head the Secret Service (a Pinkerton product, as well).
Pinkerton was probably the last man on Earth criminals would want to piss off.
(Library of Congress)
When the war came to an end, Pinkerton went right back to working with the Pinkerton Detective Agency and set his eyes on the Western Frontier. Together with his agency, Pinkerton tracked down the Reno Gang, the Wild Bunch (which included Butch Cassidy and the Sundance Kid), and the James-Younger Gang, the outfit of the legendary outlaw, Jesse James.
One day, the James-Younger Gang robbed the Adams Express Company, a railroad fund out of Baltimore, and the Pinkertons were hired to recover what was stolen. The gang eluded the Pinkertons for a while, until Allan Pinkerton sent two of his best agents to infiltrate their hideout. Both of Pinkerton's men were killed in a shootout with the outlaws, but not before taking a few of the Younger brothers with them.
The Pinkerton Detective Agency is still active today, it's just rebranded as "Securitas AB."
The railroad fund pulled the contract, but by that point, it had become a personal vendetta for Pinkerton. He personally led a raid in January, 1875, with nearly every agent at his disposal. They surrounded the homestead hideout and torched it when the gang started opening fire. They captured the gang members who were there, but Jesse James himself was missing.
The raid left the gang in such a terrible state that they were all but disbanded after they tried to recoup their losses with a failed bank robbery. Jesse James' life as an outlaw was effectively ended with Allan Pinkerton's raid. From then on, he'd live in hiding, sneaking out for the occasional robbery, until his eventual death at the hands of Robert Ford.