National security adviser Henry Kissinger talks with William H. Sullivan, center, and Mrs. Tran Kim Phuong, wife of the South Vietnamese ambassador, at the National Day celebration at the South Vietnam embassy on Nov. 1, 1972, in Washington. Sullivan, a U.S. ambassador to Laos, the Philippines and Iran, died Oct. 11. (Larry Morris/The Washington Post)

William H. Sullivan, a veteran diplomat who oversaw the “secret war” in Laos, later helped negotiate the end of U.S. military involvement in Vietnam and served as the last American ambassador to Iran, died Oct. 11 at the Grand Oaks assisted living facility in Washington. He was 90.

The family confirmed the death but did not provide a specific cause.

Known as cool and unflappable under fire, Mr. Sullivan was widely credited with saving dozens of American lives through his astute handling of an attack on the U.S. Embassy in Tehran by heavily armed militants on Feb. 14, 1979 — nearly nine months before the better-known seizure that resulted in the Iranian hostage crisis.

Mr. Sullivan was also renowned for his acerbic wit, and he famously clashed with Zbigniew Brzezinski, then national security adviser to President Jimmy Carter, over Iran policy. Asked by a Brzezinski aide on the phone whether he could arrange a coup against the Iranian revolution, which had just succeeded in toppling the shah of Iran, Mr. Sullivan delivered what he later described as an “unprintable” reply. Told that his comment was unhelpful, he retorted: “Do you want me to translate it into Polish?”

As ambassador to the Philippines earlier in the 1970s, Mr. Sullivan negotiated an extension of leases for military bases there, despite a sometimes testy relationship with Philippine President Ferdinand Marcos and his flighty, extravagant wife, Imelda. When Imelda Marcos once complained that she did not know what else she could do to help the country’s poor, Mr. Sullivan told her: “You could try feeding them cake.”

William Healy Sullivan was born Oct. 12, 1922, in Cranston, R.I., to a dental surgeon and a schoolteacher. After graduating from Brown University in 1943, he joined the Navy and served in the Atlantic, Mediterranean and Pacific during World War II. His ship, the destroyer Hambleton, participated in the D-Day invasion and later in the siege of Okinawa.

Mr. Sullivan earned a joint graduate degree in 1947 from Harvard University and Tufts University’s Fletcher School of Law and Diplomacy. He married a fellow Fletcher student, Marie Johnson, and joined the State Department, beginning a 32-year career in diplomacy that took him all over the world.

During his first assignment, as a consular officer in Bangkok in the late 1940s, he became the embassy’s Indochina expert and made contact with Vietnamese communist guerrillas who were then living in exile in northern Thailand. He was ordered to cease those contacts, but they nevertheless stood him in good stead when he later helped initiate peace talks with the North Vietnamese.

In the interim, Mr. Sullivan served in diplomatic posts in Calcutta and Tokyo, where he was a political adviser to Gen. Douglas MacArthur in post-war Japan. He also had assignments in Rome, The Hague and Saigon.

In 1964, President Lyndon B. Johnson named him ambassador to Laos, which was officially neutral in the conflict in neighboring Vietnam but was fighting its own communist insurgency with clandestine help from the United States.

As ambassador, Mr. Sullivan controlled a secret U.S. bombing campaign against North Vietnamese troops and supplies moving through Laotian territory along the Ho Chi Minh Trail. His power sparked resentment among U.S. military commanders in South Vietnam and led one U.S. senator to describe him as a “military proconsul.”

Such was Mr. Sullivan’s tight control over operations in the country that “there wasn’t a bag of rice dropped in Laos that he didn’t know about,” then-Assistant Secretary of State William Bundy said.

Since Laos was one of the few countries that maintained diplomatic relations with Washington and Hanoi, Mr. Sullivan was instrumental in opening discussions with the North Vietnamese that led to the Paris peace talks and, eventually, to the U.S. military withdrawal from South Vietnam. During those talks in 1972 and 1973, Mr. Sullivan served as the chief deputy to Henry A. Kissinger, President Richard M. Nixon’s national security adviser.

As ambassador to the Philippines from 1973 to 1977, Mr. Sullivan persuaded Marcos to receive South Vietnamese navy ships loaded with refugees fleeing communist rule after the 1975 fall of Saigon. He helped coordinate the reception and ultimate resettlement abroad of thousands of Vietnamese refugees who reached Philippine shores.

Named ambassador to Iran by Carter in 1977, Mr. Sullivan, a dapper, silver-haired patrician who looked every inch the part of a senior U.S. envoy, arrived in the country as turmoil was brewing against Shah Mohammad Reza Pahlavi.

A longtime U.S. ally, the shah faced gradually intensifying opposition from middle-class Iranians demanding greater political freedoms, and from Muslim fundamentalists aggrieved by increasing Western influence.

“I make no pretense of understanding these people,” Mr. Sullivan acknowledged to a fellow diplomat, according to Newsweek. “I find the Iranians a lot more inscrutable than Asians.”

He initially sought to forge a close relationship with the shah. State Department critics said he was dismissive of the opposition, slow to realize that the shah was in trouble and resistant to diplomatic reporting that warned of a deteriorating situation.

In a cable in late October 1978, he called the shah “the unique element which can, on the one hand, restrain the military and, on the other hand, lead a controlled transition.” And he strongly opposed “any overture” to Ayatollah Ruhollah Khomeini, the exiled Shiite Muslim revolutionary leader.

Less than two weeks later, he reversed course, urging Washington in a cable to “think the unthinkable,” expect the revolution to succeed, and prepare for a transfer of power from the shah to a coalition of Khomeini followers and the military.

Brzezinski emphatically rejected that advice, and Carter lost confidence in Mr. Sullivan, later complaining that a cable from him bordered on “insolence” for denouncing U.S. failure to make direct contact with Khomeini, who was then in exile outside Paris.

After the shah fled the country in January 1979 and Khomeini made a triumphant return on Feb. 1, an interim government quickly unraveled, and revolutionary forces toppled the monarchy on Feb. 11.

Three days later, heavily armed leftist guerrillas attacked the U.S. embassy, apparently hoping to trigger a response that would outrage Iranians and incite massive crowds to join the assault.

Mr. Sullivan, personally directing the defense of the embassy, ordered Marine guards to use tear gas to try to keep the attackers at bay while embassy personnel destroyed classified files, code gear and electronic equipment.

“If you need to protect yourselves, you may fire. If you can arrange to surrender, do so,” he told Marines by hand-held radio.

The attackers eventually broke into Mr. Sullivan’s second-floor embassy office and herded everyone out of the building at gunpoint. Forces from the new pro-Khomeini government showed up and were able to gain control from the leftists. At one point, a bearded, bayonet-wielding young man from the Khomeini forces conferred with Mr. Sullivan, their arms around each other’s shoulders.

Mr. Sullivan left Iran soon afterward and retired from the Foreign Service later in 1979. He headed the American Assembly, a public affairs forum at Columbia University, from 1979 to 1986, then moved to Cuernavaca, Mexico. He returned to the Washington area in 2000.

His wife died in 2010. Survivors include four children, Anne Sullivan of Washington, John Sullivan of Louisville, Ky., Mark Sullivan of Rochester Hills, Mich., and Peggy Sullivan of Bethesda; and six grandchildren.