William Wyler, 79, a film director whose painstaking, understated work won him three Academy Awards and the unstinting praise of critics and his peers in Hollywood, died Monday at his home in Beverly Hills, Calif., following a heart attack.

Mr. Wyler directed some of the most admired films ever made. They included "Mrs. Miniver," a story about an English family bearing up under the German "blitz" early in World War II, "The Best Years of Our Lives," about three returning veterans, and the epic "Ben Hur." For each of these Mr. Wyler won an Oscar.

In the course of his career, which lasted more than 45 years, Mr. Wyler directed two-reel western in the silent era and went on to romances, comedies, crime stories, big-budget westerns, mysteries and one musical, "Funny Girl," for which Barbara Streisand won an Oscar for the best actress of the year in 1968. During World War II, while serving in the Army Air Forces, he made two notable documentaries, "The Memphis Belle," about a bomber and its crew, and "The Fighting Lady," about the aircraft carrier Lexington.

He was entirely prepared to work with unknown actors and actreses, believing that a strong story was more important to the success of a film than well-known players. He picked Audrey Hepburn from obscurity to star in "Roman Holiday," which appeared in 1953, and she won an Oscar. The young Charlton Heston won an Oscar for the title role in "Ben Hur," which appeared in 1959. (In addition to the Oscars won by Mr. Wyler and Heston, the film received nine other Academy Awards.)

Mr. Wyler directed stars as well as he made them. He had such disagreements with Bette Davis, who won an Oscar for her role in "The Little Foxes" (1941), that the two never worked together again. Miss Davis acknowledged, however, that the movie was a triumph. Mr. Wyler also directed Walter Pidgeon, James Stewart, Henry Fonda, Gregory Peck and Audrey Hepburn and many other stars. Laurence Olivier, the star of "Wuthering Heights" (1939), credited Mr. Wyler with teaching him the rudiments of acting in front of a camera rather than on stage.

No matter with whom he worked, Mr. Wyler insisted on excellence. And he got it -- in all, 14 actors and actresses won Academy Awards in Wyler pictures. The price was hard work and there is a legion of stories about what the director required.

In 1976, when Mr. Wyler received the Fourth Annual Life Achievement Award from the American Film Institute, Greer Garson, who won an Oscar for her performance as "Mrs. Miniver" (1942), said the notion that actors often were required to perform scenes as many as 22 times failed to convey how hard it was.

"I think 82 takes was more like it, and then we printed the first," she said. "I used to wonder whether our peerless leader knew what he wanted.He never told us. He likes to wait and see things happen spontaneously."

Olivia de Havilland once recalled that Mr. Wyler required her to descend a staircase 37 times during the making of "The Heiress" (1949). He never told her how he wanted her to do it. But when, out of sheer fatigue, she dropped her fan and it slid across the front of her dress during the 37th effort, the director said, "That's it," and that is how it appeared in the film.

Heston, now the head of the AFI, said yesterday that Mr. Wyler had given him two of the best parts he ever had, "Ben Hur" and the lead in "The Big Country" (1958). "If you can't make a career out of two Wyler films you might as well give up," he said. "Beyond question, he was one of the great film directors. I guess he was without serious rival as a director of actors."

Besides his ability to work with actors, Mr. Wyler helped Gregg Toland, the cameraman, develop the deep focus camera technique. This involves using lights in such a way that the camera can pick up action in the background as well as the foreground, enabling the viewer to see more than one aspect of a story at a time. Mr. Wyler and Toland first used it in "These Three" (1936), which is based on the Lillian Hellman story "The Children's Hour."

"We were able to play a scene with three, four or five people, and stage it in such a way as to see all the people without having to cut to closeups or to this, that and the other person all the time," Mr. Wyler said in an interview in 1976. "The audience could do their own cutting. It gave you more to look at, more to think about."

As to the notion that he was a tyrant, Mr. Wyler said he thought "all those things become exaggerated. They say 40 takes -- if you make eight or 10 takes that's a lot. You get to 20 takes and it's got to get worse. I suppose I was not easy, to the extent I wanted things to be good, and I would not rest until they were. I wouldn't take less than I thought could be had. And I don't mislead the actors, saying, 'Oh, that was marvelous.' Some of them miss that."

Four many critics, "The Best Years of Our Lives" (1946) is the film that ensures Mr. Wyler a permanent place among the great directors. It is the story of three homecoming GIs and the difficulties they have in adjusting to civilian life. They were played by Dana Andrews, Frederic March and Harold Russell, who lost both hands in the war.

In one memorable scene, March is persuading Andrews to break off a relationship with March's daughter, played by Teresa Wright. The camera shows the two men standing in a bar. Andrews goes to a telephone to call Wright and tell her that he must not see her again. March is staring at a piano, where Hoagy Carmichael is showing Harold Russell how to pick out a tune with his claw-like prosthetic devices. His gaze never wavers. In the background, Andrews makes his call. The audience never hears what he says. He leaves without looking at the others. It is a demonostration in how to film emotion.

Powerful as this many other Wyler scenes are, the director's style remained elusive. Critics had difficulty in defining it. Nor was Mr. Wyler a household word in the sense that Cecil B. de Mille and other flamboyant contemporaries were. In fact, that is the way Mr. Wyler wished it to be.

"I don't believe in imposing myself on an audience," he said in the 1976 interview. "I try to tell the story with my medium, with my camera, the best way I know how. I'm not a writing director. I always needed a good story, a good script, good actors, a good cameraman. I never thought of doing something where people say, 'Oh, that's Wyler."

William Wyler was born in the Alsatian town of Mulhouse on July 1, 1902. At the time, Alsace was part of the German Empire. Now it is part of France.He grew up there in a closely knit Jewish family, played war games during World War I, and came to the United States in 1920. He worked briefly in New York as a film publicist -- his ability to speak French and German was a help with foreign clients.

Through the auspices of a cousin, Carl Laemle, who had parlayed a nickelodeon business into Universal Studios, he began directing. He made his way to Hollywood in the mid-1920s and soon was turning out low-budget, two-reel westerns. Then he was assigned to five-reel westerns. He regarded this as the most important part of his apprenticeship. In any case, he was successful enough to be given Universal's first all-outdoor sound film, "Hell's Heroes" (1929).

Beginning in the 1930s, he was closely associated with Samuel Goldwyn, the producer. Among his most important credits were "Counsellor-At-Law" (1933), "The Good Fairy" (1953), "Dodsworth" (1963), "Dead End" (1937), "Jezebel" (1938) and "The Westerner" and "The Letter" (both in 1940). Later films included "Detective Story" (1951), "The Desperate Hours" (1955) and "The Friendly Persuasion" (1956), all of which he produced as well as directed. His last film was "The Liberation of L. B. Jones," which appeared in 1970.

In 1934, Mr. Wyler married Margaret Sullavan, whom he had directed in "The Good Fairy." They were divorced two years later.

Survivors include his wife, the former Margaret Tallichet, a protege of Carole Lombard, whom he married in 1939, and their four children, Judith Sheldon of San Francisco, Catherine Wyler of Washington; Melanie Wyler of New York City and David Wyler of Los Angeles.