He was a trusted adviser and a former son-in-law to the shah of Iran and one of the most influential diplomats in the pro-Western government that ruled in Tehran before the Islamic revolution. In Washington, where he served two stints as ambassador to the United States, he was also a suave bachelor who romanced actress Elizabeth Taylor, cultivated friendships with Secretary of State Henry A. Kissinger and Sen. Barry Goldwater, and threw lavish parties complete with conga lines, kissing games, Iranian caviar and Dom Pérignon.

“No other ambassador has ever given parties like that,” former Washington Post journalist Sally Quinn once said of Ardeshir Zahedi. “It was almost dancing on tables, it was that kind of thing. There was more caviar than you could eat.”

The dancing and dining came to an abrupt halt in 1979, when Mr. Zahedi was forced into exile by the overthrow of the shah and the rise of Ayatollah Khomeini. Mr. Zahedi, who liked to say that he presided over the golden age of U.S.-Iranian relations, faced a death sentence in the new Islamic republic and moved to a villa in Montreux, Switzerland, where he gave occasional interviews lamenting the acrimony between Washington and Tehran. Switzerland was still his home when he died Nov. 18 at age 93. His friend Abbas Milani, the director of Iranian studies at Stanford University, confirmed his death but did not give a cause.

Gossip columnist Doris Lilly, a frequent guest at Mr. Zahedi’s parties, once described him as “a terrific charmer, intelligent, well-spoken, sophisticated, wealthy, influential and powerful. He had haunting black eyes and a shiny black head of hair, and he flirted outrageously with everyone — everyone, that is, of importance on Washington’s power circuit.”

“Invitations to his embassy parties were coveted as a mark of social acceptance in Washington,” journalist Kitty Kelley wrote in a biography of Taylor. “Always there were music and feasts. Sometimes there were belly dancers, hashish and pornographic movies.”

Mr. Zahedi embraced the publicity, saying, “I don’t mind being known as a playboy.” He insisted that he combined “business and pleasure” at his parties, which helped him win friends and influence at a time when Iran supplied oil to the United States while also facing accusations of government corruption and human rights abuses. “I wanted to know the people,” he told The Post in 2013, “and I wanted them to know about my country.”

Mr. Zahedi came from a politically prominent family in Tehran, where his maternal grandfather was a longtime speaker of the parliament and his father, Gen. Fazlollah Zahedi, helped orchestrate a 1953 coup backed by the CIA and British intelligence. His father was installed as prime minister, and Mr. Zahedi served as his liaison with the shah, Mohammad Reza Pahlavi. He later married Shahnaz Pahlavi, the shah’s daughter from his marriage to Princess Fawzia Fuad of Egypt.

They divorced after seven years, and Mr. Zahedi’s father was forced from power not long after taking office. Yet Mr. Zahedi remained one of the shah’s closest confidants, introducing the monarch to his third wife, the French-educated Farah Diba. He typically addressed the shah as “the Shadow of my God” and concluded his letters to the king by offering “to kiss Your Royal Feet a thousand times,” according to Milani, who helped bring the ambassador’s vast archives to the Hoover Institution at Stanford University.

Mr. Zahedi came to Washington in 1960 and became his country’s top diplomat in London two years later. He later served as minister of foreign affairs — Milani credited him with helping to normalize Iran’s relationship with Egypt after years of conflict with President Gamal Abdel Nasser — and returned to Washington as the ambassador in 1973, arriving in the midst of a growing energy crisis.

Within two years, he was being hailed as the “playboy of the Western world,” described by syndicated columnist Marian Christy as “the Washington-international set’s most sought-after bachelor.” His parties were attended by guests including Barbara Walters, Jacqueline Kennedy Onassis, Liza Minnelli, Barbra Streisand, Mikhail Baryshnikov, Andy Warhol and Taylor, who came to Washington in April 1976, shortly after separating from her husband, Richard Burton.

She was soon spotted dancing with Mr. Zahedi, kicking off a whirlwind romance in which he accompanied her to the Washington premiere of “The Blue Bird,” her latest movie, and moved her into the embassy’s royal suite, according to “Liz,” a biography by C. David Heymann. Amid speculation that they would get married, Mr. Zahedi invited Taylor to join him and other celebrities on an all-expenses-paid trip to Iran. He withdrew from the vacation under pressure from the shah, who was said to have bristled at the prospect of his former son-in-law marrying a converted Jew.

A year later, Mr. Zahedi made headlines when he and two other ambassadors from predominantly Muslim countries helped negotiate an end to the Hanafi Muslim siege, when a dozen gunmen stormed three buildings in Washington and took about 150 people hostage. A journalist was shot and killed by the terrorists, and a security guard was wounded by a shotgun blast and later died of a heart attack.

The hostages were freed after two days, following negotiations between the gunmen and the diplomats, who were joined by a small group of local officials. The ambassadors “helped us tremendously,” D.C. Police Chief Maurice J. Cullinane said after the standoff. “This was a city problem,” he added, “but here were people from foreign countries wanting to help us.”

Mr. Zahedi slipped out of Washington in February 1979, as Khomeini’s supporters took over the embassy, but was investigated by the FBI later that year over allegations that he gave improper gifts and payments to public officials. Two Iranian diplomats alleged that he had a secret slush fund of about $25,000 a month. His gift-giving was by then legendary — during the Christmas holiday, he rented chauffeur-driven limousines to distribute presents, according to his personal secretary — but he was never charged with a crime.

Months after his departure, the embassy at 3005 Massachusetts Ave. NW was vacated, a casualty of severed diplomatic relations between Iran and the United States. During the brief period when representatives of the Islamic republic occupied the building, they dispensed with all the champagne, Scotch, vodka, vermouth, gin and wine that Mr. Zahedi had stocked in the cellar, in keeping with Iran’s new prohibitions on alcohol.

It took nine hours, according to a Toronto Globe and Mail report, for officials to uncork and empty more than 4,000 bottles, pouring them down the drain of a fountain in the embassy’s backyard.

Ardeshir Zahedi was born in Tehran on Oct. 16, 1928. His parents separated when he was about 7; his mother was a homemaker, and his father was a high-ranking army officer who was imprisoned by the British during World War II, accused of being a Nazi sympathizer. He was later appointed ambassador to the United Nations.

Mr. Zahedi finished his education abroad, studying in Beirut and at Utah State Agricultural College (now Utah State University), where in 1950 he received a bachelor’s degree in agricultural engineering. He returned to Iran to work in the Point Four Program, a foreign aid initiative launched by the Truman administration, and joined his father in the 1953 coup, which he described as a “national uprising.”

Survivors include a daughter from his marriage, Mahnaz Zahedi.

While Mr. Zahedi remained loyal to the shah, traveling to Cairo to be with him at his death in 1980, he sometimes spoke favorably of the new regime, defending the country’s nuclear program and praising Quds Force commander Qasem Soleimani, who was killed in a U.S. airstrike in Baghdad last year. He said he had a painting of the Iranian Embassy at his house in Montreux, and still hoped for better relations with the United States.

“Yes, it is sad,” he told the New York Times in 2016. “I hope that soon it will change, because I see the light at what I would call the end of the tunnel. Revenge is a horrible thing. To forgive is a beautiful thing.”