William Milner Carpenter, 89, a retired Navy officer who served as an adviser to an ambassador and worked at a defense research institute, died of cancer July 1 at his home in Stafford (VA).

Capt. Carpenter was born in Mooresville, Ind., and attended the former Indiana Central College until he was accepted into the U.S. Naval Academy. Upon his graduation in 1940, he was assigned to the USS Oklahoma at Pearl Harbor in Hawaii.

He and his wife of three months were living off-base in Honolulu on Dec. 7, 1941, when they were awakened by the Japanese attack on the U.S. fleet at Pearl Harbor. He rushed back to the harbor but was unable to reach it before the Oklahoma was sunk. He was subsequently assigned to the USS San Juan and served the rest of World War II in the Pacific theater. The San Juan entered Tokyo harbor after the Japanese surrender, and Capt. Carpenter served in Japan during the occupation.

He received a master's degree in meteorology from the Naval Postgraduate School in 1948. After three brief tours in the Navy's weather service, including one in the Panama Canal Zone, he took command of the destroyer Wadleigh, based in Newport, R.I., and circumnavigated the globe.

Capt. Carpenter then became associate professor of naval science at the University of Rochester. In 1958, he was assigned to an anti-submarine task force aboard the USS Wasp. He served next at the Pentagon in the political-military affairs office and the office of the assistant secretary of defense for international security affairs. One of his assignments during this period was to attend the Geneva Conference on Laos as a military adviser to Ambassador W. Averell Harriman.

In 1964, Capt. Carpenter took command of the Japan-based USS Castor, supplying ships in the 7th Fleet off Southeast Asia. After that tour, it was back to the Pentagon, at the request of then-Secretary of Defense Robert S. McNamara. He retired from the Navy in 1966 after 26 years of active service.

Among his military awards was the Department of Defense Joint Service Commendation Medal for meritorious service.

For the next 30 years, Capt. Carpenter worked for SRI International as assistant director of the Strategic Studies Center and later as a consultant. He was also president of the American-Pacific Sealanes Security Institute. His publications included "America and Island China: A Documentary History" (1989) and the "Asian Security Handbook: An Assessment of Political-Security Issues in the Asia-Pacific Region" (1996).

He taught seminars on Southeast Asian politics and international relations at the Quantico officer training school as well as other colleges and universities.

Capt. Carpenter was a founding member of Lake Ridge Baptist Church, past chairman of the board of Germanna Community College, founder and president of the Germanna College foundation and president of the Aquia Harbour Property Owners Association in Stafford (VA). He was vice chairman of the Stafford County (VA) Democratic Committee and president of the Naval Academy Class of 1940 and the USS Wadleigh and USS San Juan shipmates associations.

Survivors include his wife of 65 years, Mary Alice Comer Carpenter of Stafford (VA); four children, Richard Milner Carpenter of Fort Myers, Fla., Katherine Ann Sinclair of Sierra Vista, Ariz., Suzanne Lynn McKeen of Salisbury, Md., and John Robert Carpenter of Framingham, Mass.; 10 grandchildren; and three great-grandchildren.