David Diamond, 89, a prolific and temperamental composer who defied academic tastes and public indifference to write music of surpassing eloquence and beauty, died June 13 of congestive heart failure at his home in Rochester, N.Y.

Despite prolonged periods when his melodic, rhythmically dense works were ignored by conductors and performers, Mr. Diamond was a significant musical presence for seven decades. At 19, he received first prize in a music competition judged by George Gershwin, who said, "Hey, kid, where did you learn to orchestrate like that?" He completed his final major work, his Symphony No. 10, when he was 85.

A refined and dapper man who spoke seven languages, Mr. Diamond was openly homosexual, had early leanings toward communism that made him a political target and was loudly contemptuous of the music of many of his contemporaries. He was sensitive, outspoken and sometimes volatile. In the 1940s, after Russian conductor Artur Rodzinski banned him from a rehearsal of his own music, the 5-foot-7 Mr. Diamond punched the robust Russian in the nose.

Mr. Diamond struggled for many years to earn a living, but in later years found redemption and renewed interest in his music. He is now widely regarded as one of America's foremost classical composers of the 20th century.

He wrote 11 symphonies (he finished No. 11 before No. 10), 11 string quartets, an opera, three violin concertos, a piano concerto, a cello concerto, dozens of art songs, film scores and other music. He also taught at the Juilliard School in New York into his eighties.

Mr. Diamond's early work was premiered by such renowned conductors as Leopold Stokowski, Pierre Monteux, Serge Koussevitzky and Dmitri Mitropoulos. In the 1950s, Eugene Ormandy, George Szell and Leonard Bernstein performed his compositions.

But by the 1970s, Mr. Diamond felt neglected by a younger -- and, he felt, lesser -- generation of conductors that included Michael Tilson Thomas, Seiji Ozawa, Dennis Russell Davies and Leonard Slatkin, now music director of the National Symphony Orchestra.

"Conductors today are appallingly lazy," he told the New York Times in 1975. "What a sad fact that these rude young men are inheriting the finest orchestras!"

Mr. Diamond also had no patience for serialism, based on repeated 12-tone patterns, and unstructured "aleatoric" music, which dominated classical composition from the 1940s to about 1980.

"I hated all that avant-garde stuff," he said. "It was all wrong. They don't write out of love."

Instead, he preferred music with an emotional directness that an untrained audience could grasp.

"There is a lonely grandeur," Tim Page wrote this year in The Washington Post, "in Diamond's insistence upon affirming the fundamental elements of music -- melody, harmony and counterpoint -- during a time of wild experimentation."

David Leo Diamond was born in Rochester on July 9, 1915, to a family of Jewish immigrants, and taught himself to play the violin by the time he was 7. He received his first formal musical training in Cleveland, where his struggling family lived with relatives in the late 1920s. While there, he showed his early compositions to the visiting French composer Maurice Ravel, who encouraged him to move to Paris.

Mr. Diamond enrolled at the Eastman School of Music in Rochester before moving in 1934 to New York, where he studied with composer Roger Sessions and supported himself as a janitor and soda jerk. In 1936, he made the first of three sojourns in Paris to work on a ballet with poet e.e. cummings. He studied with Nadia Boulanger, a teacher who helped shape the careers of countless musicians and who introduced him to Igor Stravinsky.

Mr. Diamond, who cultivated a wide circle of friends, knew Pablo Picasso, James Joyce, Georgia O'Keeffe, Greta Garbo and Sergei Rachmaninoff, who said Mr. Diamond was the only modern composer he could listen to.

During the 1940s, even as his work was widely performed, Mr. Diamond had to support himself by playing violin in the Hit Parade radio orchestra and for Broadway shows. He lived briefly in Hollywood, writing for the movies, before taking a teaching assignment in Rome in 1951.

After being served a subpoena by the House Un-American Activities Committee on a return visit to the United States, Mr. Diamond moved back to Italy. When he returned to America in 1965, he found that his music was out of favor.

"My music isn't goo-goo-eyed Romantic slop," he said. "There's a certain acerbity to it, but it does have a big melodic flow."

After a short teaching stint at the Manhattan School of Music, he joined the Juilliard faculty, where he taught from 1973 to 1997.

Two Juilliard students, conductor Gerard Schwarz and cellist Steven Honigberg, have since become leading proponents of his music. Schwarz, music director of the Seattle Symphony Orchestra, has recorded five Diamond symphonies and called Mr. Diamond "the most talented" composer of his generation.

As founder of the Potomac String Quartet, Honigberg recorded all 11 of Mr. Diamond's string quartets with his ensemble between 2000 and 2004.

"They're so profound," said Honigberg, who is also a cellist with the National Symphony. "The music is uplifting, it is spiritual, it has movement, it has melody. It says so much in an American way."

Mr. Diamond continued to compose at the peak of his powers well into his later years, and in 1995 was presented the National Medal of the Arts at the White House. He had recently completed an autobiography.

In a final interview last month with the Seattle Times, Mr. Diamond, who leaves no survivors, summarized his artistic aims.

"If music doesn't communicate, it has no chance of survival," he said. "The need for beautiful music is stronger now than ever."

"My music isn't goo-goo-eyed Romantic slop," David Diamond said. "There's a certain acerbity to it, but it does have a big melodic flow."