Robert V. Keeley in 1980. (Douglas Chevalier/The Washington Post)

Robert V. Keeley, an American diplomat who held three ambassadorships during a career spent mainly at hardship posts or amid crises, and who during the Southeast Asian conflict helped close the U.S. embassy in Cambodia and carry out the U. S. flag, died Jan. 9 at an assisted-living center in Washington. He was 85.

The cause was an apparent stroke, said his brother, Edmund Keeley.

During his 34 years in the Foreign Service, Mr. Keeley was a deputy assistant secretary of state in Washington, and had been ambassador to the Indian Ocean island-nation of Mauritius (1976-1978), to Zimbabwe (1980-1984) and to Greece (1985-1989).

Having followed his father into a diplomatic career, Mr. Keeley was known to be outspoken within the bounds and limits of his job. He was said to have disagreed strongly with the United States’s policy of supporting a military takeover of the Greek government in the late 1960s, the so-called colonels’s coup.

As a political officer in Athens at the time, he went so far as to openly maintain contacts with pro-democracy groups opposed to the junta that ruled from 1967 to 1974.

At one dinner party, he later told The Washington Post, he exploded in fury at a woman who insisted the ruling colonels were not torturing anyone. Mr. Keeley said he jumped from his chair, grabbed the woman’s hair and told her, “This is what they are doing.”

He added that his career foundered for the next seven years. “There is no question in my mind that my outspokenness was not appreciated,” he said.

In the countries to which he was sent, governments fell, coups were plotted and attempted, strongmen seized power, the Cold War played out, and he dealt personally with international figures of prominence. Among these was the notorious and dangerously erratic strongman who ruled Uganda, Idi Amin.

In recounting one of his sessions with Amin, he told of being threatened that if a Middle East war broke out in 1973, “we would all be viewed as belligerents on the enemy side,” starting with Mr. Keeley.

The conclusion of this incident, as recounted by Mr. Keeley, reflected the stiff-upper-lip professionalism inculcated in the diplomatic service.

At the end of the meeting, “I shook his hand as usual and walked out,” Mr. Keeley said in a 1991 oral history for the Association for Diplomatic Studies and Training.

An indicator of the unstable circumstances in which Mr. Keeley served is that fact that he was closely involved with the evacuation of three U.S. embassies. Of the departure from Uganda, he said, “As it worked out, we made it just by hours.”

On Nov. 10, 1973, he left Uganda’s Entebbe airport “in my tuxedo,” he said in the interview.

The idea was to make it possible to be ready on arrival in Nairobi to attend the ball celebrating the anniversary of the Marine Corps, which protects U.S. embassies.

“As we walked into the ball,” he said, “we got a big cheer, because I guess, we had gotten out of Uganda alive.”

Another hairsbreadth escape came while Mr. Keeley was second in command in the U.S embassy in Phnom Penh, Cambodia. The government supported by the United States was falling to the Khmer Rouge.

“Our evacuation was near perfect, particularly when contrasted with Saigon’s, which was immensely difficult and a mess,” he said in the oral history.

The evacuation occurred on April 12, 1975. A photograph in the American media showed Mr. Keeley and the ambassador, John Gunther Dean, after reaching Thailand. In a plastic bag, Dean held the official flag from his office. Beside him was Mr. Keeley, who carried a briefcase that held the flag from the ambassadorial residence.

So, he said, although the departure provided him with his Warhol-esque 15 minutes of fame, “it wasn’t me carrying the flag.”

Robert Vossler Keeley was born Sept. 4, 1929, in Beirut, where his father, James, was American consul. As the family moved from post to post, Mr, Keeley attended schools in Canada, Greece and Belgium, and he became fluent in French and Greek.

He was a 1951 summa cum laude graduate of Princeton University, where he wrote an anonymous gossip column for the campus newspaper signed “Philo.” He told The Post that one item he wrote that mocked an alumni gift in a salacious way got him on probation, ended his scholarship and scuttled any desire to forge a career in journalism.

After a few years in the Coast Guard, he entered the Foreign Service in 1956. Over the years, while posted abroad with scant medical facilities and personnel available, he was treated for malaria, a tumor on his back and a bleeding ulcer.

Life in the places he was sent was not any easier on his family. At one point, his wife had been evacuated twice from Uganda, and once from Jordan. His daughter went to 11 different schools in the first 12 years of schooling, and by the end of high school his son went to 14.

Survivors include his wife of 64 years, Louise Schoonmaker Keeley of Washington; two children, Michal Keeley of Fleischmanns, N.Y., and Christopher Keeley of Washington; his brother; and four grandchildren.

Few American diplomats had a better firsthand view of how policy made in Washington is executed around the world. Based on what he had learned in the field, Mr. Keeley called for a greater role of diplomacy in defusing conflict and protecting the nation. A book putting forward that view was published in 2000 as “First Line of Defense — Ambassadors, Embassies and American Interests Abroad.”

His other books included “The Colonels’ Coup and the American Embassy: A Diplomat’s View of the Breakdown of Democracy in Cold War Greece” (2010).

After retiring from the Foreign Service in 1989, he served as president of the Middle East Institute in Washington and as board chairman of the Council for the National Interest Foundation, a group that tries to counter what it considers a pro-Israeli tilt in foreign affairs. He was a past president of the American Foreign Service Association and received its prestigious Christian Herter Award.

To people in the countries where he was posted, American policy may have seemed monolithic, with the entire staff of the embassy seeming to speak as one. However, behind the scenes, as his oral history interview revealed, the course of American diplomacy was vigorously debated. In these discussions, Mr. Keeley did not shrink from making his views known.

In his book “Sideshow: Kissinger, Nixon and the Destruction of Cambodia” (1979), journalist William Shawcross quoted Mr. Keeley at a dinner telling the guests, “one day, Henry Kissinger will write his memories. And we will all go out and buy them. And there will be a chapter on Cambodia. And I will write a footnote on every page.”

After his retirement, Mr. Keeley carried a business card that read “Consulting Iconoclast.”