Retired Navy Vice Adm. Ray Cannon Needham, 71, whose last assignment was that of naval inspector general here, died Monday at the Bethesda Naval Medical Center. He had a brain tumor.

His retirement in 1969 ended 42 years of Naval service that began when he entered the U.S. Naval Academy at Annapolis, where he graduated in 1931. He then became a pilot and was landing signal officer on the carrier USS Saratoga just before World War II.

During the war, Adm. Needham served with the Advanced Carrier Training Group, served aboard three escort carriers, and also with the Fast Carrier Task Force, all in the Pacific.

After the war, he was first a student and then an instructor at the National War College in Washington. He had two later tours of duty at the Pentagon, one as assistant to the chief of naval personnel. He also had served as chief of staff and deputy to the commanders of both the Atlantic and Pacific fleets.

Adm. Needham was born in Salt Lake City. He was a great-great-grandson of Brigham Young. He attended the University of Utah before entering the Naval Academy.

His decorations included the Legion of Merit with Gold Star and Combat V and the Distinguished Service Medal.

His first wife, Margaret Poulton Needham, died in 1976.

He is survived by his second wife, the former Estelle Reid, of the home in Washington; two daughters, Nancy Hannigan, of Fairfax, and Margaret Young, of New Preston, Conn.; a son Navy Cmdr. William R., of Virginia Beach; nine grandchildren, and one great-grandchild.