Robert Altman, 81, a film director of unconventional style who stunned audiences and critics with "M*A*S*H" and "Nashville" in the 1970s and went on to subvert nearly every genre, including Westerns, mysteries and musicals, died Nov. 20 at Cedars-Sinai Medical Center in Los Angeles. He had cancer.

Mr. Altman had one of the most inconsistent careers in Hollywood and was repeatedly rebounding from oblivion. Fond of unconventional narratives and improvisational acting styles with ensemble casts, he followed works of remarkable creativity with many that sank under their own weight.

The best of his more than 35 films had a pitch-perfect sense of atmosphere, naturalistic performances that suspended disbelief and keenly seen human behavior.

He fought often with studio heads who, he believed, took an axe to his work, and later, had to produce his own pictures. Even his biggest fans recognized his regular indulgences: elliptical plotlines and the overlapping, seemingly idle dialogue pioneered by Orson Welles and experimental filmmakers.

Mr. Altman rose to fame with a series of startlingly fresh movies in the early 1970s. "M*A*S*H," an absurdist comedy, was a war movie in name only. "McCabe & Mrs. Miller" de-romanticized the Western and at the same time critiqued American capitalism. "The Long Goodbye" sent up the old private-eye picture and alarmed purists of Raymond Chandler's fiction.

His major work of the decade was "Nashville" (1975), a tapestry that navigated among more than 20 major characters and was steeped in the paranoia of the Watergate and Vietnam era. The story, involving a political killing, was set in the U.S. country music capital and darkly satirized the personalities in show business and politics.

The film earned Oscar nominations for best director and picture, as well as some of Mr. Altman's best reviews. A Newsweek critic found the movie "everything a work of social art ought to be but seldom is, immensely moving yet terribly funny, chastening yet ultimately exhilarating."

Mr. Altman's broad filmic interests led to such oddities as "Popeye," a musical about the spinach-obsessed cartoon sailor. The film, starring Robin Williams, brought near-universal critical condemnation.

After a long absence from mainstream success, Mr. Altman won a 1989 Emmy for directing "Tanner '88," a political satire that aired on HBO. The program teamed him with "Doonesbury" cartoonist Garry Trudeau, who wrote the scripts, and followed a fictional presidential candidate, played by Michael Murphy, to fundraisers and other events.

The series set the path for a second, brief golden period in Mr. Altman's films, notably "Vincent & Theo" (1990), with Tim Roth as painter Vincent van Gogh and Paul Rhys as his brother Theo, and "The Player" (1992), with Tim Robbins as a heartless movie executive.

Mr. Altman said "The Player," which has a dazzling opening sequence with a prowling camera, was particularly close to his experience in Hollywood.

"Everything that's in there that's mean is about me," Mr. Altman told Time magazine, adding that the movie "pitch" scene was particularly revealing of how Hollywood understood derivative plotlines.

"I get on the phone and I make those pitches the same way," he said.

The last of his five Academy Award nominations as a director came for "Gosford Park" (2001), a 1930s murder mystery set in an English manor house. The film, which he jokingly pitched as Agatha Christie's "Ten Little Indians" meets Jean Renoir's "The Rules of the Game," also received a best picture nomination.

This year, he won an honorary Oscar, and the citation noted "a career that has repeatedly reinvented the art form and inspired filmmakers and audiences alike." When he received the award, he told of having undergone a heart transplant 10 years earlier.

"I didn't make a big secret out of it," he said after the ceremony, "but I thought nobody would hire me again."

Robert Bernard Altman was born Feb. 20, 1925, in Kansas City, Mo. His father was a life insurance salesman and a heavy drinker, a trait the future director inherited.

At 18, he joined the Army Air Forces and became a bomber pilot in the South Pacific. Afterward, he returned home and began a restless career of insurance sales, dog tattooing and some engineering studies at a state university.

One early short story, co-written with a friend, was made into a 1948 crime drama called "Bodyguard," but other efforts to penetrate Hollywood foundered, and he began making short industrial films in Kansas City.

He also wrote a country-and-western musical whose financial backer staked Mr. Altman's first feature film, "The Delinquents" (1957), about a teenager gone bad.

The film earned money and a job offer from Warner Bros. to co-direct "The James Dean Story," a documentary about the late teen idol. Director Alfred Hitchcock urged Mr. Altman to work in television, which he did for eight years as a writer, producer and director. He said he was habitually fired because of his habit of overlapping dialogue and insulting TV sponsors who disagreed with his judgment.

His technical skill and reputation for coming in under budget kept him working. But when he used overlapping dialogue on a feature film, the astronaut drama "Countdown" (1968), Warner Bros. fired him because of what the studio said was garble from the actors.

In the late 1960s, Mr. Altman was approached by Twentieth Century Fox to see what he could do with "M*A*S*H." The film, based on the novel by Richard Hooker, was seen as a routine service picture that had been passed over by 14 other directors.

Mr. Altman fashioned the film, released in 1970 and set at a mobile Army surgical hospital during the Korean War, to fit the rebellious tastes of the Vietnam War era. He played up the sexual antics and practical jokes at the expense of a straight-laced major.

Pauline Kael, writing in the New Yorker, called it "the best American war comedy since sound came in," and it won the top prize at the Cannes Film Festival. Mr. Altman was nominated for an Oscar as best director. Mr. Altman's teenage son, Michael, had written the lyrics for the movie's theme song, "Suicide Is Painless."

Mr. Altman's subsequent films were largely unwelcome by the general public and earned wildly divided critical treatment. They included the fantasy "Brewster McCloud" (1970); "McCabe & Mrs. Miller," with Warren Beatty as a bordello owner and Julie Christie as a dope-addicted prostitute; and "Thieves Like Us" (1974), with Keith Carradine and Shelley Duvall as young Depression-era outlaws. Producer Dino De Laurentiis was reportedly so put off by "Buffalo Bill and the Indians" (1976), with Paul Newman, that he ruled out Mr. Altman as a possible director for "Ragtime."

In the early 1980s, he began directing plays in Los Angeles, and filmed many of them on a shoestring. After "Tanner '88," he received Oscar nominations for "Short Cuts" (1993), adapted from bleak Raymond Carver short stories, and "The Player" (1992).

Other films of little consequence followed in the 1990s and 2000s, including "Prêt-à-Porter," "Kansas City," "Cookie's Fortune," "Dr. T and the Women" and "The Company," a dance drama with Neve Campbell.

His most recent film, "A Prairie Home Companion" (2006), was a darker look at Garrison Keillor's wry radio show.

His marriages to LaVonne Elmer Altman and Lotus Corelli Altman ended in divorce.

Survivors include his third wife, Kathryn Reed Altman; six children; 12 grandchildren; and five great-grandchildren.