Retired Navy Capt. Edgar Thompson, 76, an attache and intelligence officer during his 20-year Navy career and an FBI special agent before that, died of cancer Thursday at Bethesda Naval Hospital.

Capt. Thompson was a native of Charleston, S.C., and a 1925 graduate of The Citadel. He then came to Washington and earned a law degree at George Washington University.

He joined the FBI and worked on counter-espionage projects in Latin America before World War II. In 1940 he was called to active Navy duty, serving as an assistant Naval attache in Lima, Peru, and then was a Navy liaison officer in London.

He was assistant Naval attache in Rome, Italy, from 1951 to 1953, and served as Naval attache in Chile from 1955 to 1958. He was district intelligence officer for the Navy in Chicago in the mid-1950s, and at the Washington Navy Yard for two years before retiring from active duty in 1960.

Since retiring from active duty, he had lived in Washington. Capt. Thompson played the viola in amateur chamber music groups in Italy, Chile, and this country. He also was the author of articles on Navy history that appeared both in this country and Europe.

Survivors include his wife, Agra of Washington; three brothers, Wilmer L. of Charleston, S.C., retired Navy Capt. Marshall F. of San Diego, Calif., and William, of Dallas, Tex., and a sister, Marjory Glenn also of Dallas.