William Harrington Leahy, 81, a retired rear admiral who had been inspector general and assistant chief for administration at the Navy's Bureau of Ships, died of a heart ailment May 12 at his home in Chevy Chase.

Adm. Leahy retired in 1961 after a 38-year naval career, most of which involved administration, research, design and construction. He was born in San Francisco and grew up in Washington. He attended Sidwell Friends School and graduated from the U.S. Naval Academy at Annapolis.

He served aboard battleships in the late 1920s, then earned a master's degree in naval architecture at the Massachusetts Institute of Technology. During World War II he worked on the design of destroyer escorts and landing craft.

After the war, Adm. Leahy attended an advanced management course at the Harvard Business School. Later assignments included the Norfolk Naval Shipyard and the Office of Naval Research. He was commanding officer of the David Taylor Model Basin at the Naval Ship Research and Development Center at Carderock, the Pearl Harbor Naval Shipyard and the Norfolk Naval Shipyard before he became inspector general and assistant chief for administration of the Bureau of Ships.

Adm. Leahy was a member of the Society of Naval Architects and Marine Engineers, the Newcomen Society and the Chevy Chase Club.

Survivors include his wife, Elizabeth Beale Leahy, a son, Robert Beale Leahy and a daughter, Louise Leahy Walker, all of Chevy Chase; nine grandchildren and six great-grandchildren.