The world of film noir is peopled with melancholy men trying to do the right thing, even when they don't quite know what the right thing is. Always — always — they fall for the wrong girl. Joseph Cotten's Holly Martins — the highly principled, if confused, heart of Carol Reed's exquisite 1949 The Third Man — may be the ultimate noir hero, somber and honorable and painfully blinkered when it comes to the darker shades of human behavior. The Third Man was written by Graham Greene, no slouch when it comes to crises of conscience, and Cotten, with those eyes the color of question marks, is the finest leading man he could have asked for. At the start of the film, Martins is all confidence and swagger poured into a tweed coat, an American pulp novelist who treks to postwar Vienna, intending to help a friend with a business venture. He is the sum of everything he thinks he knows. But the movie's final, famous shot shows us a man starting from scratch. In Greene's world, that hard-earned self-knowledge is a reward, not a punishment — but oh, how it burns going down.

The Third Man is a movie of sobering pleasures. It has often been lauded, rightly, as one of the most beautifully shot film noirs, as you can see for yourself now that it has been digitally restored by Rialto — looking crisp and handsome after its makeover, it opens at the Nuart on July 3 for a weeklong engagement. Reed and cinematographer Robert Krasker experimented, mischievously, with lots of tilted camera angles; lore has it that William Wyler, a close friend of Reed's, sent the director a spirit level after seeing the picture. But The Third Man is even more memorable for the lush, silky texture of its black-and-white images, for Reed's canny sense of framing, and for its recurring shots of nighttime streets that appear to be coated with moonlight. In reality, Reed had the cobblestone streets of Vienna hosed down, at great cost, before shooting, but the effort was worth it: The nocturnal world of The Third Man is the pinpoint center between prosaic and magisterial, a vision of a city still in post-wartime flux but also desperate to reclaim its prewar serenity and beauty.

The glorious look of The Third Man serves another purpose: It gives one of its supporting players, Orson Welles, one of the greatest entrances in movie history. Welles plays raconteur and mystery man Harry Lime, and through much of the film, we believe him to be dead: When Cotten's Martins, newly arrived in Vienna, shows up at Lime's flat, the porter informs him that Lime has been killed in a truck accident and will be buried later that day. Martins doesn't like the circumstances surrounding his friend's death, and he distrusts the army major in charge of the investigation (played by a posture-perfect, elegant Trevor Howard). He also falls hard for the girl Lime left behind, Alida Valli's Anna, a sultry, impenetrable actress who's indebted to her absent beau for getting her a false passport.

Lime, as it turns out, isn't the man Martins thought he was. But when this shape-shifter makes his first appearance, even we begin to have our doubts about how bad he might be — and by that time, we already have evidence of his horrible deeds. Lime's face emerges, sultry and wicked, like a dazzling three-quarters moon, from the shadow of a city doorway. We know he's there before we even see him: Anna's little cat — who, she has revealed, loves Lime above all others — has run right over to his murky form, as if announcing to the world that his old friend isn't dead after all. He's picked up on Lime's scent, and so have we. It's a wonderful, elongated moment, a blissful stretch of time — perhaps only 20 seconds long, but who would bother to count? — that encapsulates all the reasons we go to the movies in the first place.

Welles's presence, so radiant, so enthralling, so unapologetically egotistical, is all the more wondrous when you consider that Harry Lime was nearly played by someone else. The Third Man is haunted by might-have-beens, ghosts of possible choices that would have resulted in a very different film. Though Greene and producer extraordinaire Alexander Korda had been the ones to conceive The Third Man, they were beholden to American producer David O. Selznick, who peppered Korda and the filmmakers with controlling notes from the States. Selznick had originally floated Cary Grant and Noël Coward to play Martins and Lime; he also championed James Stewart and Robert Mitchum. In the end, Cotten won out to play Martins, as he was already in Selznick's stable and would be less costly to use. But Selznick stood firm against Welles — whom Reed desperately wanted — until it became clear that Mitchum, serving jail time for his 1948 marijuana arrest, wouldn't be available in time for filming. Plus, Welles, always trying to scrounge up money, came cheap.

Getting the notoriously unmanageable actor to show up on set wasn't easy for Reed, but the results were worth it. The Third Man is unimaginable without Welles. His role is small but mighty, the fulcrum on which the whole film is balanced. You can see how a guy like Harry Lime could cause so much trouble. As Welles plays him, his smile is as wily and seductive as a crooked, beckoning finger — he's the movie's real femme fatale, all the more dangerous for being so masculine. But his charm is also a kind of poison, certainly for Martins.

Somewhat surprisingly, Greene originally wanted a happier ending for Martins, one in which he actually gets the girl. Reed had other ideas, and luckily, his vision won out. At the end of The Third Man, Martins watches as his future — or even just one possible, glittering future — literally passes him by. Good morning, heartache. But at least he's fully awake at last.

THE THIRD MAN | Directed by Carol Reed | Written by Graham Greene | Rialto Pictures | Nuart

Advertising disclosure: We may receive compensation for some of the links in our stories. Thank you for supporting LA Weekly and our advertisers.