Hans Heymann Jr., an economist who advised three U.S. presidents on the Soviet Union and the Vietnam War — subjects he knew intimately as a key contributor to the top-secret history of the war known as the Pentagon Papers — died Jan. 10 at Sibley Memorial Hospital in Washington. He was 91.

He had complications from heart disease, said his daughter Kendra Sagoff.

Mr. Heymann began his career in 1950 as an analyst at the Rand Corp., a government contractor and think tank, and later served as a senior economics officer at the CIA and as a foreign policy adviser to the Ford, Carter and Reagan White Houses.

Throughout his career, he specialized in the political environments and economies of Eastern Europe, the Soviet Union and the southeastern Asian countries of Thailand, Laos and Vietnam. He traveled widely for his assignments on arms transfers, civil and military aviation, and emerging technology.

In the 1960s, he was tapped to work on a Defense Department research project that involved constructing a history of the Vietnam War — dubbed “the Pentagon Papers.”

The project’s contributors included the late Richard Holbrooke, who decades later was the architect of the peace talks that ended the war in Bosnia, and Daniel Ellsberg, a Rand analyst who later leaked the Pentagon Papers to the press. For publishing stories about the documents, the New York Times earned the 1972 Pulitzer Prize for public service.

In an interview, Leslie Gelb, a former Defense Department official who oversaw the project’s day-to-day research, said he recruited Mr. Heymann for his wide-ranging expertise and scholarly integrity.

“I was always trying to steal smart people who knew some things,” Gelb said. “He had no axes to grind. He was not a grand ideologue. . . . He wasn’t a guy who did somersaults or performed controversial feats. He was a real pro, the kind you wish you had more of today.”

As an expert on politics and economics, Mr. Heymann was responsible for fact-checking and editing many of the documents. The final product was a 2.5 million-word opus that examined the history of the U.S. decision-making process on Vietnam policy from 1945 to 1967.

He retired from the CIA in 1984 and then lectured several more years for the Defense Department on international politics and economics.

Hans Bernard Richard Heymann Jr. was born Feb. 2, 1920, in Berlin. His father, an insurance and mortgage bank executive, had served as a foreign policy adviser to the Weimar Republic, the name given to the post-World War I German government. The young Mr. Heymann was driven to school every day by a chauffeur.

In the early 1930s, Mr. Heymann accompanied his father to New York for a business venture. The Heymanns, who were Jewish, moved to the United States during the rise of the Nazi regime. During World War II, the Nazis seized all of the Heymanns’ property, including several priceless paintings by the expressionist Max Pechstein. The artwork was never recovered.

As a young immigrant, Mr. Heymann joined the U.S. Army and served in Europe, where his fluency in languages made him ideally suited for intelligence gathering and interrogations.

Mr. Heymann was an economics graduate of Rutgers University, where he was elected to the Phi Beta Kappa honor society, and received a master’s degree in Soviet economics from Columbia University.

At Rand, Mr. Heymann performed research on U.S. government aid to developing countries. In one paper, he criticized the government for supporting two $20 million loans to Ethi­o­pia to build up the country’s commercial air service.

“In a country where roads are still appalling, railroads virtually nonexistent, the city drainage system embryonic, and the agriculture medieval, where cattle dung is still being collected for fuel and the population has a 95 per cent illiteracy rate, one does not have to look far to find more economically rewarding uses for $40 million.”

Survivors include his wife of 69 years, Barbara Mezey Heymann of Potomac; four children, Deirdre Heymann of Scottsdale, Ariz., Kendra Sagoff of Bethesda, Angela Latta of West Chester, Pa., and John Heymann of Napa, Calif.; a sister; eight grandchildren; and five great-grandchildren.

From 1971 to 1985, Mr. Heymann and his wife had a home on Vieques, an island off the coast of Puerto Rico. They opened a small ice cream parlor — the only one on the island — and had tubs of the frozen delicacy flown in by plane.

The Heymanns converted Singer sewing machines into tables for their shop and grew their own bananas for banana splits.