Around 1930, Harland Sanders ran a Shell gas station in a rough section of Corbin, Ky. The station prospered despite the rough locale — he kept a gun under his cash register for protection — and intense competition from a man named Matt Stewart, who ran a Standard Oil station down the road.

The men’s mutual animosity grew as Stewart painted over one of Sanders’ signs, and Sanders responded by threatening to “blow [Stewart’s] goddamn head off.”

Sanders repainted his sign but got word that Stewart was painting over it again just as he was meeting in his office with two Shell supervisors. The three men — all armed — raced to the scene, and Stewart drew his weapon and fired.

One of the Shell managers was killed instantly and Sanders “jumped into the breach and under withering fire grabbed his fallen comrade’s gun . . . [and] the future Colonel unloaded with true aim and hurled hot lead into Stewart’s shoulder.”

For many of this generation, Colonel Sanders is little more than a cartoon of an old guy on a KFC bucket. But as this new book reminds us, Sanders was a real, larger-than-life figure who scraped and clawed his way to success, invented the iconic product — Kentucky Fried Chicken — that bares his image and recoiled in noisy public horror as various corporations reduced his creation to a foul-tasting shadow of its former self.

A hard worker since regularly clearing brush before the age of 10, Sanders spent decades sabotaging various successes with his irascibility, such as when he ended a brief legal career by trading punches with a client in court.

When he wound up running the gas station, customers would often ask him where they could find food. Sensing an opportunity, he began cooking ham, biscuits and greens — in addition to fried chicken — for travelers, and it caught on.

As the business grew into a motel/cafe, Sanders began wearing a black suit, growing a goatee that he would dye white and calling himself “Colonel.”

When Sanders was 65, the highway adjacent to his station was rerouted, destroying his business.

Ever the aggressive salesman, he took to the road with a pressure cooker and his special flour consisting of 11 herbs and spices, and started selling restaurant owners the right to sell “Colonel Sanders’ Kentucky Fried Chicken” in exchange for a nickel for every chicken sold.

Sanders, who had arthritis, would drive all day seeking out prospects. “On some nights,” Ozersky writes, “he slept in the back seat of his Cadillac, shaving and combing his hair in the morning in a service station.”

As his product caught on, Sanders began promoting it on TV — where, it turned out, he was a natural (and where he traded the black suit for a white one). Sanders would eventually appear on “What’s My Line?” “The Merv Griffin Show,” and “The Tonight Show,” as well as playing actual or fictionalized versions of himself in B-movies like “Blast-Off Girls” and “Hell’s Bloody Devils.”

By 1960, Sanders had 200 Kentucky Fried Chicken franchises. But while cooking chicken and flamboyantly representing his product were his strengths, the intricacies of business were not, and he reluctantly sold the company in 1964 for $2 million plus $40,000 a year to serve as the brand’s “goodwill ambassador.”

But as the chain became massively successful, Sanders grew increasingly enraged at how the brand’s various owners destroyed its quality and tradition.

When Kentucky Fried Chicken introduced its Extra Crispy chicken in 1974, Sanders said publicly that the product was “a damn fried doughball put on top of some chicken.”

His recipe — the one that had made the company — was renamed “Original Recipe,” although to this day it’s questionable if that recipe is really the same one invented by Sanders, who long insisted that it was not. (Ozersky, a James Beard Award-winning food writer, agrees.)

Sanders’ attacks continued throughout the 1970s, including his once announcing plans to open a competing restaurant and, when the owners objected, suing them for $122 million. (An executive convinced the company to settle for $1 million to keep the peace.)

Later, after tasting the chicken at a franchise in Greenwich Village, Sanders told a reporter that it was “the worst fried chicken I’ve ever seen,” and that the gravy was “nothing more than wallpaper paste.”

While company executives thought that Sanders’ attacks came from “perversity or spite,” Ozersky writes that Sanders, who died of leukemia in 1980, leveled his pugnacious defenses of his legacy due largely to the same fighting spirit that had led to his success.

“It was the thing that had made him what he was, the superhuman grandiosity that had led him to start walking around in a white suit and string tie and calling himself ‘Colonel Sanders,’ ” writes Ozersky.

“It was impossible for him to relinquish his ownership of the product that defined him. What was he if not the Colonel?”

‘Colonel Sanders and the American Dream’ by Josh Ozersky, University of Texas Press