Joseph V. Brady, 89, a behavioral scientist whose pioneering research for NASA on psychological stress included preparing simians for space travel in the 1950s and 1960s, died July 29 at a hospice in Baltimore. He had pneumonia.

At his death, Dr. Brady was a professor of behavioral biology at Johns Hopkins University. He had retired from the Army in 1970 at the rank of colonel.

Throughout his career, his influential studies on human and animal behavior contributed to profound changes in drug abuse treatment and vastly expanded the scientific understanding of anxiety.

Dr. Brady’s 1958 Scientific American article “Ulcers in Executive Monkeys” demonstrated how high levels of stress can lead to somatic illnesses. Today, Dr. Brady’s paper is widely cited in psychology texts.

At the Walter Reed Army Institute of Research in Bethesda from 1951 to 1970, Dr. Brady served as chief of experimental psychology and deputy director of neuropsychiatry.

His work training primates for space began during the late 1950s with a six-pound rhesus monkey named Able and an 11-ounce squirrel monkey named Baker. The work took on new urgency after the successful launch of the Soviet satellite Sputnik in October 1957.

Before blasting men into space, NASA officials wanted to be sure that humans could withstand the journey. It was unknown at the time how the body might react to cosmic radiation or extended periods of weightlessness.

Scores of mice and monkeys had been sent on experimental flights in the name of science, but few had returned alive.

Dr. Brady’s task was to give Able and Baker the best chances for survival. He developed a strenuous training regimen for the female primates that included exposure to sudden acceleration, intense vibration, and ear-throbbing noise.

On launch day, May 28, 1959, Able and Baker were secured into the eight-foot nose cone of a Jupiter missile and wired to monitors recording their breathing, heart rate and body temperature.

The rocket reached a top speed of 10,000 mph, soaring 360 miles above Earth before splashing down in the Atlantic Ocean 1,700 miles away from Cape Canaveral, Fla. The entire trip lasted minutes.

Able and Baker, unscathed, became national heroes, garnering media attention across the country. Dr. Brady remained largely unheralded in the public sphere but later received awards for his medical research, including his work for NASA.

After his success with Able and Baker, Dr. Brady was tapped to help train Ham, a 3-year-old chimpanzee.

Dr. Brady helped teach Ham to operate a system of lights and levers, training him to flip at least one lever every 20 seconds to avoid an electric shock on the sole of his foot.

On Jan. 1, 1961, Ham was strapped into a contour couch tailored to his 37-pound frame. For his mission, Ham rode in a Mercury space capsule equipped with the same life-support system that astronaut Alan Shepard Jr. used five months later.

During nearly seven minutes of weightlessness, Ham flawlessly worked the lever and light system, receiving not a single shock. His performance proved to scientists that complex tasks could be handled during space flight.

Ham’s vessel landed in the ocean 422 miles downrange before it was recovered and placed on the deck of a Navy ship.

Dr. Brady was onboard when Ham’s capsule was opened. The chimpanzee, the first of his species to survive spaceflight, celebrated his arrival with a burp.

Joseph Vincent Brady was born March 28, 1922, in New York. He was a 1943 graduate of Fordham University. After Army combat service in Europe during World War II, he received a doctorate from the University of Chicago in 1951.

In 1960, Dr. Brady founded the nonprofit Institutes for Behavior Resources, which operates a substance abuse treatment program in Baltimore.

His first wife, the former Cecilia O’Malley, died in 1967. His later marriages to Barbara Brady and Julia Brady ended in divorce.

Survivors include his fourth wife, the former Nancy Heaton, of Baltimore; five children from his first marriage, Barbara Fincham of Shipman, Va., Michael Brady of San Clemente, Calif., Kathleen Brady of Sullivan’s Island, S.C., Nancy Brady of Tucson and Joanne Brady of San Diego; a stepdaughter from his fourth marriage, Meg Sullivan of Ennis, Tex.; a brother; 13 grandchildren; and two great-grandchildren.

Able died soon after she returned from space, during a surgical procedure to remove an electrode in her body. Baker died of kidney failure in 1984.

Upon Ham’s retirement from NASA service, he was moved in 1963 to the National Zoo, where he lived until 1980.

Dr. Brady often made trips to Washington to visit his old friend, his wife said. Ham died in 1983.