Herbert L. Matthews, 77, a longtime foreign correspondent whose coverage of the Spanish Civil War and later of Fidel Castro made him both renowned and controversial, died Saturday in Adelaide, Australia after a brief illness.

Mr. Matthews settled in Australia following his retirement in 1967 after 45 years with The New York Times, first as a correspondent and later as a member of the editorial board.

In 1935 and 1936, Mr. Matthews reported for The Times on the Italian campaign against Ethiopia. He later covered the Allied campaign in Italy during World War II. Other assignments took him to Paris, and to London as chief of The Times bureau there.

Assigned to Rome in 1940, he was interned the next year when Italy declared war against The United States. After being released in a diplomatic exchange, he was sent to India, where his reporting was described by Time magazine as "a major triumph."

Probably, however, he became most widely known for his dispatches and books on the Spanish Civil War and for his interviews in 1957 in the mountains of eastern Cuba with Fidel Castro, then a rebel leader.

In his writing on the war, a matter still the subject of dispute, Mr. Matthews was praised by opponents of Fascism for his efforts to indicate in dispatches the participation of both Italy and Germany on the side of Franco.

Critics took issue with what they saw as his unquestioning attachment to the Republican cause.

Even more controversial was Mr. Matthews' writing on Cuba and Castro. In 1959 and 1960 when much of the American press and public opinion was deciding that the Cuban leader should be considered a member of the Communist camp, Mr. Matthews steadfastly declined to place him there.

"For a very long time . . . I felt like Horatio at the bridge," he wrote in a 1961 book, "The Cuban Story." "No one else," he said, "seemed to be able or willing to present the Cuban side of the story . . ."

In a talk here in the spring of 1960, the year after Castro's victory, Mr. Matthews said the "the manifestations being labeled Communist by the United States are a combination of extreme nationalism mixed with radicalism."

He also took the position that "We are helping communism in Cuba by exaggerating its importance."

Mr. Matthews had obtained his exclusive interview with Castro in 1957 by posing as a wealthy American sugar planter on a vacation trip. Based on the interview, conducted at a time when Castro was believed dead, Mr. Matthews wrote a three-part series for his paper, attracting considerable attention.

The series also won him the Overseas Press Club's George Polk Memorial Award for "exceptional courage and enterprise."

He also won the New York Newspaper Guild Page One award in 1957 and the Maria Moors Cabot award in 1956, among other honors.

In 1961 Mr. Matthews appeared before the Inter-American Press Association to deny accusations that he and The Times favored the Castro regime.

"We do not justify Castro, we are not supporting him, we are opposing him," Mr. Matthews said, "but this doesn't mean we have to agree with all his enemies on how to fight communism."

Mr. Matthews was born in New York, Jan. 10, 1900 and entered Columbia University in 1918. After serving as a private in the tank corps in the American Expeditionary Force in World War I, he returned to graduate in 1922.

Immediately afterward, he joined The Times, becoming cable editor.The next year he went to Rome on a fellowship, and learned Italian. He went to Paris for The Times in 1931, remaining there until he was assigned to cover the war in Ethiopia.

Mr. Matthews was the author of a dozen books. He is survived by his wife and two children.