Capt. A. A. Marsteller, 95, a retired Navy psychiatrist, died of cardiac arrest Monday at the Woodbine Nursing Center in Alexandria.

He was on active duty with the Navy from 1917 to 1950.

Before that, he had been with a railway project, 1,800 miles up the Amazon River in South America, and served as a medical officer with the Virginia National Guard on the Mexican border.

Prior to World War II, Capt. Marsteller had two tours of duty as chief of naval psychiatry in Washington.

During the war, he commanded naval hospitals devoted to war neuroses at Auckland, New Zealand, and Espiritu Santo, an island of the New Hebrides. Later, the commanded the Naval Hospital at San Leandro, Calif., also devoted to war neuroses.

He then returned to Washington as senior medical officer of the Navy's inspection and clemency board. His decorations included the Legion of Merit.

Capt. Marsteller was born in Washington. He received his medical degree from the Medical College of Virginia.

He was a Fellow of the American Medical Association and the American Psychiatric Association and a Diplomate of the American Board of Neurology and Psychiatry.

He was a founding member of the Army-Navy Country Club and belonged to the Army and Navy Club, the Retired Officers Association and the Military Order of the Carabao.

He is survived by two sons, William A., of Centreville, Ohio, and Frederick A. Sr., of Alexandria, 10 grandchildren and four great-grandchildren.