Billy Wilder, 95, the maverick director-writer-producer who turned his trenchant scripts into some of the most memorable of all Hollywood films, died Wednesday at his home in Beverly Hills, Calif. He had pneumonia.

Wilder received six Academy Awards and was nominated for the Oscar 21 times for the nearly 50 U.S. films he made from the mid-1930s to the early 1980s. For much of that era, directors were virtually unknown to the general filmgoing public. But Wilder's most famous works -- among them "Some Like It Hot," "Double Indemnity," "Sunset Boulevard," "The Apartment" and "The Lost Weekend" -- were so stamped with his bold and iconoclastic style that he attained a level of directorial fame exceeded by few others.

Indeed, Wilder helped pave the way for the time when directors became widely recognized as the primary "authors" of their films, regardless of whether they wrote the scripts.

After emigrating from Germany to escape the Nazi threat, Wilder started out in Hollywood as a screenwriter -- always teamed with a co-writer, a method he never abandoned. He was so successful at writing that he persuaded the top executives at Paramount Pictures in the early 1940s to let him direct his own scripts, an achievement then shared only by John Huston and Preston Sturges.

During the next four decades, his films were distinguished by a sardonic wit and a comparatively unromantic view of life and love. At a time when Hollywood liked to play drunkenness for laughs, Wilder created in "The Lost Weekend" (1945) a harrowing portrait of a life ruined by addiction.

Decades before the rise of the "antihero" in popular culture, Wilder's protagonists frequently came across as opportunistic, hard-boiled heels: Fred MacMurray, for example, cast against type as a man driven by lust into a murder plot in "Double Indemnity" (1944), or William Holden as the failed screenwriter who cynically agrees to become the kept man of a faded silent-screen star in "Sunset Boulevard" (1950).

As recently as the 1960s, Wilder films were frequently denounced as smut by such watchdog groups as the Legion of Decency. He was proud of pushing the boundaries of good taste, but he lived to see his efforts eclipsed as the old Production Code collapsed and Hollywood's list of onscreen do's and don'ts vanished. Wilder helped make possible and palatable later generations of mature Hollywood fare, from Robert Altman's "M*A*S*H" to Mike Nichols's "Carnal Knowledge," not to mention countless films marked chiefly by vulgarity.

Many critics and film buffs regard Wilder's "Some Like It Hot" (1959) as perhaps the greatest comedy since the silent films of Charlie Chaplin and Buster Keaton -- and it boasts what may be the most famous closing line in Hollywood history. In the film, Tony Curtis and Jack Lemmon play Prohibition-era musicians who witness a mob slaying and, to escape the bad guys, masquerade as women in an all-girl band that features Marilyn Monroe on the ukulele.

In the last scene, Lemmon, in drag, pulls off his wig to show an amorous male millionaire why they can't be married. "I'm a man!" Lemmon says.

The millionaire's reply: "Well, nobody's perfect."

Taking as his model the sophisticated, charming comedies directed in the 1930s by a fellow emigre, Ernst Lubitsch, Wilder depicted what he felt was the hypocrisy, corruption and prudishness of U.S. society -- but always with sly humor. He often bumped against studio bureaucracy unwilling to risk the condemnation of church groups, which had some authority over a film's content or even release.

Wilder, who had no temper for such compromises, once pitched a story idea to producer Samuel Goldwyn about the dancer Vaslav Nijinsky, who ended his life in a mental institution believing he was a horse. As expected, Goldwyn rejected the grim plot.

"My version will have a happy ending," Wilder rebutted. "We wind up showing him winning the Kentucky Derby."

Wilder said he turned to producing his films in the early 1950s to protect their controversial content. Not always appreciated in their time, many of them would garner respect with age, and the filmmaker received a procession of tributes during the past two decades, including the Academy of Motion Picture Arts and Sciences' Irving G. Thalberg Memorial Award and the Directors Guild's D.W. Griffith Award for Lifetime Achievement, both in 1985, and the National Medal of Arts, presented by President Bill Clinton in 1993.

Wilder, who was uninterested in pat resolutions, preferred to see his art as a rumination on the heights and depths of human potential.

"I tell about problems facing mankind, but I don't pretend to solve them," he once told an interviewer. "It's what happens to the people that matters. Moviegoers like a movie in which they can recognize a little of themselves."

It has been argued that Wilder's earlier careers as a police reporter and dance hall gigolo colored his often-acid depiction of humanity. The first strikingly potent exhibition of his filmmaking prowess came in 1944, when he paired with Raymond Chandler to adapt the James M. Cain novella "Double Indemnity." New York Herald Tribune critic Howard Barnes wrote that Wilder matured into "one of the really first-rate directors" with this film about an insurance agent who conspires with a woman to kill her husband.

"Double Indemnity," which used bluntly erotic dialogue and was among the first pictures to use the shadowy style of film noir, was nominated for Oscars for best picture, director and screenplay.

Another pungent example of Wilder's dark streak was "Ace in the Hole" (1951), with Kirk Douglas playing a reporter who delays the release of a man trapped in a cave. The journalist hopes he can make a name for himself writing about the story of survival.

Andrew Lloyd Webber adapted a musical version of Wilder's "Sunset Boulevard" for Broadway in 1994. Such an homage was a far cry from its initial release, when Wilder's peers were greatly distressed about his depiction of Hollywood. The film even hastened the breakup of a successful 12-year collaboration between Wilder and writer-producer Charles Brackett, who thought his partner's ideas too vinegary.

Wilder then collaborated with I.A.L. Diamond from the late 1950s until his last film, "Buddy Buddy" (1981). One of his best-known works with Diamond was "The Apartment" (1960), which had Lemmon as a guileful clerk lending his apartment to his bosses so they can carry out their trysts. The duo also addressed sexual hypocrisy in "Irma la Douce" and Cold War relations in "One, Two Three," with James Cagney as a Coca-Cola executive in Berlin.

Wilder won three of his six Oscars for "The Apartment," as director, producer and co-writer. He also received Academy Awards for directing and co-writing "The Lost Weekend" and for co-writing "Sunset Boulevard."

His last hit was "The Fortune Cookie" (1965), with Walter Matthau as shyster lawyer "Whiplash" Willie, who can't stoop low enough to get insurance money for his slightly injured brother-in-law. Most of Wilder's films since the mid-1960s were not successful, popularly or critically: from "Kiss Me, Stupid" (1964), with Dean Martin as a sex-starved singer, to "Buddy Buddy," about the friendship of a hit man and a suicidal television censor.

Kevin Lally, author of "Wilder Times: The Life of Billy Wilder," said Wilder's slump was an ironic result of the expanded limits of film acceptability he helped establish. Lally felt that the mature-themed films Wilder admired in the late 1960s and early 1970s were more explicit sexually and verbally than suited a man who was a disciple of such subtle, continental directors as Lubitsch.

"Now that Wilder characters can say the 'F' word at will, the thrill of the battle is gone," Lally wrote in his 1996 biography.

Samuel Wilder, whose childhood nickname "Billie" was Americanized to "Billy," was born in a region of the Austro-Hungarian Empire that is now Poland. He left law school in Vienna to become a reporter there and in Berlin, and by the late 1920s, he started writing for the German cinema.

Wilder, who was Jewish, fled Germany in 1933 after Adolf Hitler's rise to chancellor. He later said the only project he pursued that he regretted not directing was "Schindler's List," as a tribute to his mother and grandmother. They had stayed in Europe and died at the Auschwitz concentration camp. Steven Spielberg directed the film in 1993.

After Wilder moved to the United States, his connection to Hollywood's large German immigrant population helped him get his first credits. By the late 1930s, he and Brackett had written two of the best sophisticated comedies of that era: Mitchell Leisen's "Midnight" and Lubitsch's "Ninotchka" with Greta Garbo.

Wilder's films were distinguished early on by their lack of rote romantic characterizations and plots. His pictures in the early 1940s -- including the drama "Hold Back the Dawn," with Charles Boyer as a desperate ballroom gigolo, and the screwball comedy "Ball of Fire" -- were so well received that Paramount, where he was under contract, allowed him to direct an original script.

That first outing as director, on "The Major and the Minor" (1942), featured Ginger Rogers as a woman pretending to be a 12-year-old trying to board a train at half-fare and Ray Milland as an Army major who tries to help her. They gradually become attracted to each other. The pedophilia overtones displeased studio executives, but the film was a smash, and Wilder used his popularity to leap to more challenging projects.

After "Double Indemnity" cemented his reputation, Wilder read and immediately wanted to adapt Charles R. Jackson's best-selling novel "The Lost Weekend," which chronicles the depths to which an alcoholic sinks. Film historian David A. Cook cites this movie for being on the cusp of the social consciousness drama of the late 1940s, which tackled formerly taboo moral issues and often shunned Hollywood sets in favor of location shooting.

Among the film's more surprising elements are an Academy Award-winning performance by Milland, formerly a light-comedy actor, and nightmarish scenes in the detox ward of New York's Bellevue Hospital. Initial attempts by the liquor lobby and some Paramount executives to scuttle the project were unsuccessful, but the film was given a happier ending than that in the book. The film took the best picture Oscar for 1945.

Wilder had consistent smashes in the 1950s, with the cynical POW drama "Stalag 17"; "The Seven Year Itch," with Tom Ewell as an average married man taunted by the capricious Monroe; and the twisty "Witness for the Prosecution," which author Agatha Christie regarded as the best interpretation of her work.

The filmmaker shifted skillfully between the lives of roue{acute}s and murderers and those of delectable debutantes. "Sabrina," a 1954 film with Audrey Hepburn as a chauffeur's daughter who blossoms into a beauty, put a clever spin on a classic romantic storyline.

Wilder wooed his second wife, former starlet Audrey Young, with a line that could have been from one of his films: "I'd worship the ground you walk on, if you lived in a better neighborhood."

In addition to his wife of 51 years, survivors include a daughter, Victoria, from his earlier marriage to Judith Iribe; and a grandchild.

Billy Wilder on the set of "Some Like It Hot" (1959) with the cross-dressing Jack Lemmon. Wilder won six Oscars as a producer, director or co-writer. "I tell about problems facing mankind, but I don't pretend to solve them. It's what happens to the people that matters," Billy Wilder told an interviewer.