I first realized there was more to O. Henry than surprise endings when, a few years ago, I picked up a Penguin edition of the writer’s selected stories edited by Guy Davenport. In his introduction, Davenport — an essayist of the most sophisticated literary intelligence — noted that O. Henry’s reputation has long stood extremely high in Europe. Yevgeny Zamyatin, author of the chilling 1924 dystopia “We,” found in his work “the art of brevity and speed proper to America,” while the Italian novelist Cesare Pavese praised the writer for the strange beauty with which he imbued city life, transforming turn-of-the-century New York into “Baghdad-on-the-Hudson.”

To most American readers, though, O. Henry is known mainly for two anthology standards, “The Ransom of Red Chief,” in which two naive rogues kidnap an insufferable little boy, and “The Gift of the Magi,” the tale of the impoverished young couple who find just the right Christmas presents for each other. Both these mini-classics are perfectly executed, but as this new Library of America volume, “O. Henry: 100 Stories,” edited by Ben Yagoda, demonstrates again and again, there are many others just as good. Let me share one of my favorites.

“A Retrieved Reformation” opens with the ace safecracker Jimmy Valentine working in a prison shoe shop. After serving 10 months, he is paroled and makes his way to a room over a small-town cafe. There he slides open a secret compartment containing an old suitcase, inside of which is “the finest set of burglar’s tools in the East. . . . Over nine hundred dollars they had cost him to have made.”

Before long, bank safes are being expertly burgled all around the Midwest. Recognizing that the robberies bear “Dandy Jim Valentine’s autograph,” the government agent Ben Price vows to hunt him down. At that moment in Elmore, Ark., Jimmy is casually strolling from the train station to the town’s hotel when “a young lady crossed the street, passed him at the corner and entered a door over which was the sign ‘The Elmore Bank.’ Jimmy Valentine looked into her eyes, forgot what he was, and became another man.”

In the course of the next year, he renames himself Ralph Spencer, opens a successful shoe store and wins the hand of pretty Annabel Adams, the banker’s daughter. But, finally, Ben Price shows up in Elmore.

That very day Jimmy had arranged to sell his tools to an old friend, so he is carrying his battered suitcase during a visit to the Elmore Bank. There Annabel’s father proudly shows off its new state-of-the-art safe, equipped with a special time lock. Suddenly, there is a scream. Annabel’s 9-year-old niece has accidentally shut her 5-year-old sister inside the vault.

Hysteria ensues. Old Mr. Adams cries out in a shaky voice, “There isn’t a man nearer than Little Rock who can open that door.” A minute passes and another, the little girl’s air slowly running out. At this point Ralph Spencer, turning to the woman he loves, “looked at her with a queer, soft smile on his lips.” “ ‘Annabel,’ he says, ‘give me that rose you are wearing, will you?’ ” After Ralph slips the flower into his vest pocket, it is Jimmy Valentine who lifts his suitcase onto a table, opens it out flat, and picks up his favorite drill. Whistling softly to himself, he sets to work. “In ten minutes — breaking his own burglarious record — he threw back the bolts and opened the door.”

As Jimmy then starts to leave the bank, he finds Ben Price waiting near its entrance. “Hello, Ben!” he says with his strange smile. “ ‘Well, let’s go. I don’t know that it makes much difference, now.’ ”

To which Price answers. “ ‘Guess you’re mistaken, Mr. Spencer. Don’t believe I recognize you.’ ” And walks away.

Okay, so “A Retrieved Reformation” is sentimental and improbable, but you’ll never forget it. In multiple ways, O. Henry was phenomenal. Born William Sydney Porter in 1862, he adopted his pen name while in prison for embezzlement. During his three-year incarceration, he published more than a dozen stories. After his release, he went on to produce roughly 275 stories in less than a decade before dying at age 47 in 1910. Besides clever plotting that Agatha Christie would envy, his work can be touching, humorous, tragic, frightening or all of them by turns. For example, “The Man Higher Up” is a comic tour de force about con men being conned, “A Municipal Report” movingly depicts a decayed Southern gentlewoman and her loyal Black retainer, and “The Last of the Troubadours” evokes, like a mournful ballad, the beauty and pathos of life in the Old West.

Even though O. Henry revels in puns and wordplay, period slang and colorful rhetorical exaggeration, he keeps his narrative voice intimate and confiding. Its tone can be wry and sometimes even mildly Wodehousean — a cigar store is kept by a man named Freshmayer, “who looked upon the earth as a sterile promontory” — but occasionally ascends to the floridly Poesque: In “The Furnished Room” — which mixes a naturalist description of Manhattan rooming house life with a ghost story and conte cruel — a housekeeper resembles “an unwholesome, surfeited worm that had eaten its nut to a hollow shell and now sought to fill the vacancy with edible lodgers.”

Given that Ben Yagoda’s excellent selection — emphasizing stories set in New York — reprints only two-fifths of O. Henry’s total work, it’s not surprising that some famous stories have been left out. These include the coincident-packed, tear-jerker, “The Church With an Overshot-Wheel,” “A Blackjack Bargainer,” in which a drunkard literally sells the rights to an old family feud, with grim consequences, and “One Dollar’s Worth,” a very neatly done tale about a counterfeit silver coin that saves the happiness of two young couples, one American, the other Mexican.

Still, the absence of this trio from the Library of America volume isn’t grievous but is simply an encouragement to acquire one or two additional O. Henry collections. Happily, these are readily available, both new and secondhand.

Michael Dirda reviews books for Style every Thursday.

O. Henry: 101 Stories

Edited by Ben Yagoda

Library of America. 840 pp. $35