WASHINGTON – Richard B. Parker, 87, a career Foreign Service officer and Middle East expert who served in the 1970s as the U.S. ambassador to Algeria, Lebanon and Morocco, died Jan. 7 at a retirement facility in Washington. He had vascular disease.

He was the father of Alison Kenway of Portland, Maine.

Parker retired from the State Department in 1980 after more than 30 years of service. He also held diplomatic posts in Australia, Israel, Jordan and Egypt.

In retirement, he was a diplomat-in-residence at the University of Virginia, where he taught classes on foreign policy in the Arab world and served as an editor of the Middle East Journal.

The depth of his expertise in Arab culture led him to write scores of academic papers on a variety of topics, including Lebanese proverbs and Arabic graffiti in Middle Eastern men’s restrooms.

Parker’s interest in the Middle East began soon after his release from a prisoner-of-war camp during World War II.

An Army antitank platoon officer, Parker was captured by German soldiers after his unit was overwhelmed during the Battle of the Bulge.

He was sent to a prison camp in Poland and spent 34 days in captivity before the camp was liberated by Russian soldiers.

During his repatriation, Parker traveled through the present-day Ukrainian city of Odessa, the Turkish Straits and Port Said in Egypt. He became fascinated with the majesty of Istanbul’s architecture and the intricacies of Arab culture.

He joined the Foreign Service in 1949 and specialized as an Arabist. He spoke Arabic with native fluency and became a respected adviser on Middle Eastern politics to Presidents Gerald Ford and Jimmy Carter. In his diplomatic assessments, Parker was known to write with an acerbic wit and offer his opinions with blunt honesty.

In 1974, he became the first ambassador to Algeria since the United States severed formal diplomatic relations with that country seven years earlier. Parker was selected to become the U.S. ambassador to Lebanon in 1977 after the assassination of his predecessor, Francis Meloy. His last diplomatic position came in 1978 as ambassador to Morocco.

In a 2004 interview with Foreign Service Journal, Parker said his time in Morocco was cut short by the country’s monarch, who had survived two coup attempts during the ambassador’s tenure.

“The king was never fully persuaded that we weren’t involved somehow,” Parker said, noting that King Hassan II had told him “relations would not improve so long as I was there.”

Parker said he had a similar experience earlier in his career in Egypt, when President Gamal Abdel Nasser ordered his deportation from the country.

“He apparently thought I was the real CIA station chief and was personally responsible for all the bad things he thought the Americans had done to Egypt,” Parker said. “The Egyptians later explained that they thought I had not acted like a diplomat. I’m not sure what that meant but have taken it as an unintended compliment.”

Richard Bordeaux Parker was born July 3, 1923, in the Philippines, where his father served as an Army officer.

He graduated from Kansas State University in 1947 and received a master’s degree a year later.

Parker wrote a number of books on the Middle East, including “Uncle Sam in Barbary: A Diplomatic History” (2004), which recounted America’s first international hostage crisis, when North African pirates captured two U.S. ships off the coast of Portugal in 1785.

According to Parker’s book, the incident represented the country’s first challenge in the Arab world and spurred the formation of the U.S. Navy.

The work won the American Academy of Diplomacy’s Douglas Dillon Award in 2004 for distinguished writing.