Stanley Kramer, the producer-director who earned the nickname "Hollywood's conscience" through his willingness to tackle controversial topics like racism, nuclear annihilation, greed and fascism, died Monday of pneumonia at the Motion Picture and Television Hospital in Woodland Hills. He was 87.

Friends said Kramer, who suffered from diabetes, had been at the hospital for several months.

"Kramer was a guy who fought some hard battles," said former Times arts editor Charles Champlin. "He took on social issues when it was not popular to do so in Hollywood. He won some and he lost some."

Among the first of the successful postwar independent producers, the serious, quietly articulate Kramer made his name with edgy, black and white films, featuring top-flight actors before they were "names."

Those films include "Champion," an anti-boxing tale about a "thoroughgoing heel," that made stars of Kirk Douglas and Ruth Roman and "The Men," a story of paraplegic war vets that marked Marlon Brando's motion picture debut. Brando also starred in Kramer's 1954 motorcycle gang film, "The Wild One."

Kramer's 35 films, 18 of which he directed, were nominated for 85 Oscars and won 15 statuettes. In 1961, he received the Academy of Motion Picture Arts and Science's Irving G. Thalberg Memorial Award, the highest production accolade the film industry bestows.

Strong performances were another Kramer trademark. "Cyrano de Bergerac" and "High Noon" won Best Actor Oscars for Jose Ferrer and Gary Cooper. Kramer went on to work with Vivien Leigh, Sidney Poitier, Frank Sinatra, Cary Grant, Olivia de Havilland, Robert Mitchum, Ava Gardner, Gregory Peck and Katharine Hepburn.

Spencer Tracy was a particular favorite, starring in four Kramer films.

"Everybody tells me how good I am," the actor said, "but only Stanley gives me work."

Though Kramer was no radical, his films were a far cry from the diversionary material embraced by a studio system determined to play it safe.

"Home of the Brave" in 1949 was one the first major motion picture to deal with black prejudice in the military during World War II. Cast and crew entered and exited at the studio's rear gate, ate on the set and took a vow of silence.

"Inherit the Wind," the story of the Scopes "monkey" trial, was labeled "anti-God."

"I tried to make movies that lasted about issues that would not go away," Kramer said.

During its first four years, Kramer's tiny company financed and produced five movies, four of which drew some critical acclaim. Most were made for less than $600,000--half the price of comparable studio features.

The producer's seat-of-the-pants approach came to a halt in 1951, however, when he signed a five-year, 20-film deal at Columbia Pictures. The arrangement was "one of the most dangerous and foolhardy moves of my entire career," he later observed.

"I did this even though I knew I would be working under the cold, sharp eye of the studio's vulgar, domineering, semiliterate, ruthless, boorish, and some might say malevolent chief Harry Cohn," he said in "It's a Mad, Mad, Mad, Mad World," his 1997 autobiography, written with Thomas M. Coffey.

What drove him to "dive into Harry's caldron of tension, confusion, and trouble?" A deep-seated desire to direct, he explained. With more secure financing, he'd have the clout to hire himself. Though Cohn wanted to groom him for the post of studio head, he said, that was never his intent.

Kramer embarked on a glossier, more lavish production path--with decidedly mixed results. Film versions of Broadway's "Death of a Salesman" (1951) and "The Member of the Wedding" (1952) were the first of 10 consecutive films that flopped. In 1954, "The Caine Mutiny" covered those losses and earned six Oscar nominations--including Best Picture. Still, the studio bought out Kramer's contract before the film came out.

That year, Kramer made good on his vow to direct, plunging into "Not As a Stranger," another of the best-selling novels and hit plays he brought to the screen. Though reviewers dismissed the movie as well-acted fluff, the public ate it up.