, the foghorn-voiced movie villain who became a master of crotchety comedy with his Oscar-winning ''The Fortune Cookie'' and followed with ''The Odd Couple,'' ''Grumpy Old Men'' and many other hits, died Saturday morning of a heart attack. He was 79.Matthau was pronounced dead at 1:42 a.m., shortly after being brought into St. John's Health Center in Santa Monica, said hospital spokeswoman Lindi Funston.
Often cast as a would-be con man foiled by life's travails, Matthau bellowed complaints against his tormentors and moved his lanky frame in surprising ways.
Said his frequent costar, Jack Lemmon: ''Walter walks like a child's windup toy.
Matthau's performance as Lemmon's brother-in-law in ''The Fortune Cookie'' won him the Academy Award as best supporting actor of 1966. He was twice nominated for best actor: as the cantankerous oldster in ''Kotch,'' 1971 (directed by Lemmon); and as the feuding vaudeville partner of George Burns in ''The Sunshine Boys,'' 1975.
But it was ''The Odd Couple'' that won Matthau's stardom. In 1965, he appeared in New York as the slobby sportswriter Oscar Madison in Neil Simon's play. Art Carney was the fastidious photographer, Felix Unger, who shared an apartment with Madison after both had been divorced.
Matthau repeated the role in the 1968 film, with Lemmon as Felix. They reprised their roles 30 years later in the 1998 film ''Odd Couple II.''
''Every actor looks all his life for a part that will combine his talents with his personality,'' Matthau told Time magazine in 1971. '''The Odd Couple' was mine. That was the plutonium I needed. It all started happening after that.''
The actor could be as whimsically eccentric in interviews as he was on the screen.
In responding to a form for Current Biography, he reported that his father had been an Eastern Orthodox priest in czarist Russia. His father was actually a Kiev peddler.
''That's my defense mechanism against pompous and ludicrous questions,'' Matthau explained. When he filled out his Social Security form in 1937, he listed his middle name as Foghorn. He never corrected it.
Some of the facts about the actor's early life seem accurate. He was born Walter Matuchanskayasky on Oct. 1, 1920, in New York City to impoverished Russian-Jewish immigrants.
The father left home when Walter was 3. Walter and his older brother, Henry, lived with their mother, a garment worker.
Young Walter showed a dramatic bent early, reading Shakespeare at 7 and reciting poems in school assemblies at 8. He was introduced to Yiddish plays at 11.
During World War II, he enlisted in the Army Air Corps and served as radio cryptographer in a heavy bomber unit in Europe, earning six battle stars and a fistful of money from poker winnings. Legends of his gambling followed him throughout his life.
In October 1945, Matthau enrolled in the dramatic workshop at New York's New School. His first Broadway role came at the age of 28 when he was hired as understudy for the role of an 83-year-old English bishop in ''Anne of the Thousand Days.''
His first film, ''The Kentuckian'' starring and directed by Burt Lancaster in 1955, cast him as a villain.
He also appeared in action thrillers such as ''The Taking of Pelham One Two Three'' and ''The Laughing Policeman,'' and did a musical, ''Hello Dolly!'' with Barbra Streisand, with whom he publicly feuded.
Matthau was often teamed with Lemmon, always as adversaries though they were best friends offscreen. Their films included ''The Front Page,'' ''Buddy Buddy,'' ''Grumpier Old Men,'' ''Out to Sea.''
He was most recently on screen with Meg Ryan, Diane Keaton and Lisa Kudrow in this year's ''Hanging Up.''
Matthau was married to Grace Geraldine Johnson from 1948 until 1958. They had two children, David and Jenny. He married Carol Marcus in 1959, and they had one son, Charles, a filmmaker who directed his father in ''The Grass Harp'' in 1996.
The actor survived several serious health setbacks during his career, including a heart attack in 1966. In 1976, he underwent heart bypass surgery. After working in freezing Minnesota weather for ''Grumpy Old Men'' in 1993, he was hospitalized for double pneumonia. In December 1995, he had a colon tumor removed; it tested benign.
He was hospitalized in May 1999 for more than two months after another bout with pneumonia.
Matthau blamed his eating habits for his illnesses: ''If you eat only celery and lettuce, you won't get sick.... I like celery and lettuce, but I like it with pickles, relish, corned beef, potatoes, peas. And I like Eskimo Pies, vanilla ice cream with chocolate covering.''
Call me an actress, not a star, says Sophia Loren (2002-09-14)Actress Helen Hunt files for divorce (2000-12-20)Actor Walter Matthau Dies at 79 (2000-07-02)Marilyn Monroe Movies on View (2000-03-11)Winners of Golden Globe Awards (2000-01-26)