November 6, 1979 Washington Post front page.

But the militants also had an officially unstated objective, one that outlived the shah and was achieved with far-reaching success. They wanted to undermine the relatively moderate government of Prime Minister Mehdi Bazargan and scuttle relations with the United States, ending a U.S. effort to build new connections with Iran despite the Islamic revolution that had ousted the shah, a longtime American ally.

In some ways, Tuesday’s attack on the British Embassy in Tehran recalls that seizure three decades ago. But it appears to have a bit more in common with an earlier invasion of the U.S. Embassy — on Feb. 14, 1979 — when this reporter and a colleague from the Los Angeles Times happened to be in the building and ended up being held for hours.

That Valentine’s Day takeover was carried out by a leftist group, and it was preceded by heavy gunfire at the embassy building by attackers on surrounding rooftops. L.A. Times reporter Kenneth Freed and I took cover under desks on the ground floor as machine gun bullets smacked into the outer walls. We eventually ran up the stairs with embassy staffers to the second floor, where officers destroyed files and sensitive communications gear as Marines fired tear gas to try to keep the attackers at bay.

Ambassador William Sullivan and the rest of the staff — as well as Freed and I — were then taken captive at gunpoint. But after several harrowing hours, everyone was released when the Iranian government sent security forces who made the attackers stand down.

William Branigin of The Washington Post is searched and ordered out of the embassy building by left-wing guerillas during capture of the American Embassy. (Tom Karges/UPI)

The takeover that day foreshadowed the one nine months later — by a different group of militants — that proved much harder to resolve.

Shortly after the Nov. 4 embassy takeover, the Iranian revolutionary leader, Ayatollah Ruhollah Khomeini, endorsed the militants, and the Bazargan government resigned. U.S. diplomatic relations with Iran were formally severed in April 1980 and have never been restored.

Like the 1979 embassy takeover and hostage taking, Tuesday’s seizure of the British Embassy in Tehran highlights a rift not only between Iran and the West, but one within the Islamic Republic between the civilian government and the clerical leadership headed by Khomeini’s successor as supreme leader, Ayatollah Ali Khamenei. The hard-liners who attacked the British Embassy and a residential compound were reported to be student members of the paramilitary Basij force, which answers to Khamenei.

But unlike the hostage crisis that began 32 years ago, the latest embassy takeover appears to have limited popular support, and the government of President Mahmoud Ahmadinejad seems to be in a stronger position to control the situation and keep it from escalating.

Khamenei vigorously supported Ahmadinejad when largely middle-class protesters staged street demonstrations in Tehran to denounce his disputed reelection as president in June 2009. In recent months, however, the powerful supreme leader and other Shiite Muslim clerics have been at odds with Ahmadinejad, although they have been reluctant to get rid of him at a time of intense international pressure on Iran over its nuclear program.

After initially allowing the militants free rein to attack the British Embassy and residence Tuesday, Iranian police reportedly gained control of the sites and “rescued” six embassy employees who had been seized by the protesters as “spies.” Their ordeal apparently lasted a matter of hours, compared to the 444 days of captivity endured by 52 American hostages who were similarly accused of espionage three decades ago.

The U.S. government joined Britain in strongly condemning Tuesday’s attacks and demanded that Tehran prosecute those responsible. A White House statement said the United States stands “ready to support our allies at this difficult time.”

That response stood in sharp contrast to the cautious initial reaction from Washington in November 1979, when the administration of President Jimmy Carter apparently hoped that the Iranian government would quickly end the embassy takeover and that efforts to build a relationship would resume. Then, U.S. officials at first would not even characterize the captive Americans as hostages. In the months that followed, U.S. allies maintained diplomatic relations with Iran despite the hostage crisis, which ended on the day Carter left office.