James Joseph McHugh III, the judge advocate general of the Navy from 1982 to 1984, died of congestive heart failure May 8 at Sutter Memorial Hospital in Sacramento.

Rear Adm. McHugh led a special court of inquiry after the release of the crew of the spy ship USS Pueblo, which was seized by North Korea and the crew held for 11 months in 1968. The Naval Court of Inquiry recommended that Cmdr. Lloyd M. Bucher be tried by court-martial. In the end, Navy Secretary John H. Chaffee decided against a court-martial. Bucher was allowed to retire from the Navy in 1973; he died Jan. 28.

Adm. McHugh was born in Philadelphia and received a bachelor's degree in English from the University of Pennsylvania, where he was a member of Phi Beta Kappa. He received a law degree from the University of Pennsylvania Law School in 1954, where he was associate editor of its law review. He later received a master's degree in international affairs from George Washington University in 1972.

He was commissioned into the Naval Reserve in 1955 after finishing Officer Candidate School and then graduated from Naval Justice School. He served at a number of posts in California, Hawaii and Washington, where he lived, off and on.

In 1978, he became assistant judge advocate general for civil law and by 1980 was deputy judge advocate general. Two years later, he was appointed judge advocate general, the Navy's top-ranking military lawyer.

Adm. McHugh retired from the military in 1984 and became associate dean for career development at the McGeorge School of Law at the University of the Pacific in Sacramento, where he helped law graduates find jobs.

He retired from that position in 1993.

His military awards included the Distinguished Service Medal for his work in the judge advocate general's office, two Legions of Merit, two Meritorious Service Medals, the Navy Commendation Medal and others.

Survivors include his wife, Rita McHugh, of Carmichael, Calif.; two children, Navy Cmdr. James Joseph McHugh IV of Port Mugu, Calif., and Navy Cmdr. Margaret Carlson of Stafford; and five grandchildren.