In 66 silent movies between 1914 and 1936, Charlie Chaplin, as the Little Tramp, found himself in desperate situations: surviving on a shoestring (literally, in The Gold Rush); losing his pants while performing on the high wire (The Circus); and stumbling upon an abandoned baby in an alley (The Kid). Ever resourceful, his beloved character always overcame disaster in time for the next movie. Not so in real life, where his skills failed him in 1944 as he faced years in prison on a federal Mann Act charge.

Handsome when not in costume, Chaplin was catnip to women and reckless in his assignations. His first two marriages (to Mildred Harris and Lita Grey) were at the end of a shotgun, but it was a pistol-packing protegée, disappointed at being dumped, who ignited the fuse that exploded on Chaplin.

Brooklyn stenographer Mary Louise Gribble, transformed by Chaplin into Hollywood’s Joan Barry, was bereft when her contract didn’t lead to stardom and their affair didn’t lead to marriage. The Chaplin-Barry relationship gets short shrift in biographies about the Little Tramp, where he’s painted as her hapless victim. But researching the Mann Act trial and the paternity proceedings that followed, it became clear that Chaplin’s street smarts could have prevented his downfall.

Barry met Chaplin when she was 21 and he was 52.

Instead, he endured a humiliating criminal trial that knocked World War II off the front pages and paternity trials that resulted in a court order to pay child support for another man’s daughter. Worse, the debacle came back to bite him later, when government Red-baiters needed an excuse to permanently boot Chaplin, a left-leaning British expat, from the country.

“Even in moments of minor stress, my father could never keep his head,” his son Charles junior wrote in My Father, Charlie Chaplin. With one misstep after another, Chaplin sealed his fate.

Ever resourceful, Charlie Chaplin’s beloved Little Tramp always overcame disaster in time for the next movie. Not so in real life.

Chaplin met Barry in May 1941, when he was 52 and she was 21, on a blind date arranged by his friend Tim Durant, a former stockbroker who was Chaplin’s tennis partner and fixer. Durant later tried to warn Chaplin off Barry, whom he pegged as mentally unstable, but Chaplin was wowed by her impulsivity, flaming red hair, and innate acting talent. He put her under contract to his studio, but before the ink was dry, Barry and the boss were in the sack.

Two abortions later—arranged by Durant—Chaplin tried to aim for a purely professional relationship, but Barry was still smitten. And, like Glenn Close’s Alex Forrest in Fatal Attraction, she would not be ignored.

Heartbroken after he ended things, Barry went home to New York on Chaplin’s dime, only to return to Los Angeles shortly after, upon which she began stalking him with unwanted phone calls, visits, and break-ins at his Beverly Hills home. Finally, at Christmastime in 1942, Barry crept into Chaplin’s mansion at midnight with a loaded pistol, determined to shoot him, herself, or both. Rather than pick up the bedside phone and call the cops, however, Chaplin foolishly charmed Barry back into his arms. The next morning, she left with $56 and a smile.

Chaplin with his wife, Oona O’Neill, in Los Angeles in 1945.

Nobody was smiling five months later when she returned, five months pregnant, demanding marriage or more money. Chaplin, now involved with 17-year-old Oona O’Neill—the daughter of Long Day’s Journey into Night playwright Eugene O’Neill, whom he would soon marry and father eight children with—gave Barry neither, ignoring Durant’s advice to toss her some cash to make her go away.

An angry Barry then tattled to the columnist Hedda Hopper, a favorite of J. Edgar Hoover’s, telling the gossip maven that she was pregnant with Chaplin’s child, and an F.B.I. investigation ensued. Indicted for supposedly sending Barry to New York for a hotel tryst, the flimsy case quickly collapsed. But two paternity trials followed, the second one a disaster scripted by an angry and unthinking Chaplin.

Known to be frugal, Chaplin used his corporate lawyers to represent him in the paternity trials, rather than the famous—and famously expensive—California courtroom legend Jerry Giesler, who’d gotten him acquitted at the Mann Act trial.

Then, after a hung jury in the first paternity proceeding, Chaplin skipped the re-trial, pouting over his poor treatment on the stand from the opposing counsel who had mocked him in court as a “cheap cockney cad.” The ladies whom his lawyer had packed onto the second jury were disappointed by Chaplin’s absence, and it showed in their verdict—he was found responsible for Barry’s pregnancy, despite blood tests proving he couldn’t have been the father.

Hedda Hopper, the Hollywood columnist, came to Barry’s defense in the Chaplin saga.

One final miscalculation. In 1952, while en route to Europe with his family aboard the Queen Elizabeth, his right to re-enter the country was revoked by the U.S. government based on vague allegations involving Chaplin’s Communist leanings, his moral failings, and his lack of patriotic feelings toward America. In a huff, Chaplin relocated to Switzerland, and Oona, whom he would remain married to until his death, in 1977, renounced her American citizenship.

But a hard look at 6,500 pages of Chaplin’s Immigration and Naturalization Service files makes it clear that the government had no leg to stand on. Had he contested Uncle Sam’s actions, he may well have won his right to return. Instead, he stayed away until he was invited back to receive an honorary Oscar at the 1972 Academy Awards, where he received the longest standing ovation in Motion Picture Academy history.

Today, in light of #MeToo and Chaplin’s behavior toward Barry, it’s questionable whether he’d still be cheered. But that, as they say, is another story.

Diane Kiesel is a New York–based writer