Julius J. Epstein, a screenwriter of sharp, sardonic dialogue who won an Academy Award for the script of ''Casablanca,'' died here on Saturday. He was 91.
Mr. Epstein wrote more than 50 movies in a 50-year career. He and his identical twin, Philip, were responsible for the wit and cynicism of ''Casablanca,'' while Howard Koch, who shared the 1943 Academy Award with them, provided much of the film's ardent patriotism.
The usual wages of screenwriting in Hollywood are money and oblivion, but Mr. Epstein's career stretched from 1934 to 1984, when he received his fourth Oscar nomination for screenwriting, for ''Reuben, Reuben,'' a comedy with Tom Conti adapted from a Peter De Vries novel about a self-destructive poet.
In a 1984 interview, Mr. Epstein provided a glimpse of what it was like to write under the studio system, even if what he was writing turned out to be one of the country's most enduring movies: ''There wasn't one moment of reality in 'Casablanca.' We weren't making art. We were making a living. Movies in those days were prevented from reality. Every leading man had to be a great sexual athlete. Every boy and girl had to 'meet cute,' and the girl had to dislike the hero when they met. If a woman committed adultery, she had to die. Now the woman who commits adultery is your heroine.''
Mr. Epstein earned his first Oscar nomination in 1938 for ''Four Daughters,'' the movie (based on a Fannie Hurst story) that introduced John Garfield. After Julius and Philip began their collaboration in 1939, their screen credits -- mostly adaptations of plays and novels -- included ''The Strawberry Blonde,'' ''The Man Who Came to Dinner,'' ''Arsenic and Old Lace'' and ''Mr. Skeffington,'' a 1944 Bette Davis film that touched on the taboo subject of anti-Semitism.
Jack Warner was so pleased with ''Casablanca'' that he made the twins the producers of ''Mr. Skeffington,'' as well as the writers.
Mr. Epstein once said that the ability to write good dialogue was genetic: ''You're born with it like a good football player is born.''
At Warner Brothers, where the Epstein twins worked as a team for more than a decade, they were constantly being asked to add zip and sparkle to other writers' scripts. James Cagney refused to accept the role of George M. Cohan in ''Yankee Doodle Dandy,'' a role that won him his Oscar as best actor in 1942, until he was assured that the Epsteins would liven up the screenplay.
According to Alvah Bessie, another Warner Brothers screenwriter, the twins won every wisecracking competition during lunch. When Julius's two-story house was burned in a 1963 fire in Bel Air as he watched the destruction on television, he rose to the occasion with, ''Well, we always wanted a one-story house.''
After Philip died of cancer at 42 in 1952, Mr. Epstein wrote nearly two dozen more movies, including ''Pete 'n' Tillie,'' a Walter Matthau-Carol Burnett film for which he received his third Oscar nomination.
In 1998 Mr. Epstein received the Los Angeles Film Critics Association's career achievement award.
Mr. Epstein was divorced from the actress Frances Sage. He is survived by his second wife, Ann, and two children from his first marriage, a son, James, and a daughter, Elizabeth Schwartz. A son, Philip, from his second marriage died last year.
Julius Epstein was born on the Lower East Side of Manhattan to the owners of a livery stable. The Epstein twins learned to fight early. In 1929, Julius was intercollegiate bantamweight boxing champion and captain of the Penn State boxing team, which won the national championship. Philip, always a few pounds heavier, was Penn State's intramural lightweight champion.
Julius came to Hollywood in 1933 as a ghostwriter for the producer Jerry Wald. He always insisted that he was the model for Julian Blumberg, the brilliant nebbish whose screenplay is stolen by Sammy Glick in Budd Schulberg's novel ''What Makes Sammy Run?'' Mr. Wald, who was said to be a major model for Sammy Glick, sold Mr. Epstein's script, ''Living on Velvet,'' to Warner Brothers as a screenplay by Jerry Wald and Julius Epstein. For a year, Mr. Epstein wrote scripts with Mr. Wald. After that, Warner Brothers allowed Mr. Epstein to write scripts without a collaborator, so Mr. Wald brought Philip Epstein to Hollywood as his new ghostwriter.
The Epsteins are credited with overthrowing one of the industry's great shibboleths. Jack Warner caught them coming into the studio at 1:30 one afternoon in time for lunch at the writers' table and told them to read their contract. Writers were to punch in at the studio at 9 o'clock every morning. ''Bank presidents and railroad presidents can get to work at 9,'' the studio head said. ''I don't see why you can't.''
That afternoon, when lunch was over, they handed him an incomplete script and challenged him to get a bank president to finish it. On another occasion, when Mr. Warner said one of their scenes was terrible, they needled him with: ''How can that be possible? The scene was written at 9 a.m.''
When Philip Epstein came down with appendicitis during the writing of ''The Strawberry Blonde,'' the James Cagney-Rita Hayworth film, they had to work at home while he recuperated. They finished the job in half the usual time, and the movie was a big hit. After that the Warners let them work at home, where they usually put in two intensive hours -- all they felt they were good for -- and spent the rest of the day playing tennis or listening to ballgames.
Mr. Epstein liked to tell stories with a pinch of irony, a twist of self-deprecation. For example, the brothers could not think of a plausible reason that Rick Blaine, the character played by Humphrey Bogart in ''Casablanca,'' could not return to America and had to remain in Casablanca. So they came up with brilliant dialogue to disguise that fact:
Louis Renault, the police chief played by Claude Raines, asks: ''I've often speculated on why you don't return to America. Did you abscond with the church funds? Did you run off with the senator's wife? I'd like to think that you killed a man. It's the romantic in me.''
Rick: ''It was a combination of all three.''
Renault: ''And what in heaven's name brought you to Casablanca?''
Rick: ''My health. I came to Casablanca for the waters.''
Renault: ''What waters? We're in the desert.''
Rick: ''I was misinformed.''
The ending to ''Casablanca'' was written a dozen times, none a satisfactory answer to the question of whether and how Ingrid Bergman should wind up with Paul Henreid or Humphrey Bogart.
Then, Mr. Epstein recalled: ''My brother and I were driving down Sunset Boulevard, and we looked at each other and said, 'Round up the usual suspects.' Somebody must have been murdered. Who was murdered? Major Strasser. Who killed him? Rick! That was the way we got our ending.''
Less successful at writing plays than screenplays, the Epsteins reached Broadway twice, with ''And Stars Remain'' (1936), starring Clifton Webb, and with the modest hit ''Chicken Every Sunday'' in 1944. In 1954, their play ''Front Porch in Flatbush'' was turned into a musical called ''Saturday Night'' by the young, unknown Stephen Sondheim. The musical, which was to have opened on Broadway in 1955, was withdrawn after its producer died; it finally received its New York premiere last February.
Writing for Hollywood was a bit easier in some respects during the heyday of the studio system. ''Today, each picture is so terribly important for your career,'' Mr. Epstein said in 1984. ''In the old days, your fate didn't hang on one picture. You were writing one picture. Another was in production. Another was in theaters.''
Howard Koch died in 1995, and with Mr. Epstein's death all the major contributors to ''Casablanca'' are gone. Until the end of his life, Mr. Epstein had a rueful relationship with the movie. In 1951 and again in 1967, he tried to turn it into a Broadway musical. Eventually he decided that musicals, sequels and television series based on the film never work simply because ''people have in their heads Bogart and Bergman.''
''The new actors may be better,'' he said, ''but they're not Bogart and Bergman.''