Iran Air Flight 655, which Mr. Rouhani invoked with the hashtag #IR655, had set out for Dubai from the port city of Bandar Abbas, on the Iranian side of the Persian Gulf. At the same time on that July morning, the Vincennes, an American missile cruiser, was engaged in combat with Iranian boats in the gulf.

The Navy said later that it mistook the passenger plane, an Airbus A300, for a hostile F-14 fighter jet. The chairman of the Joint Chiefs of Staff, Adm. William J. Crowe Jr., said that the Iranian plane was flying at low altitude and failed to respond to warnings or transmit radar signals identifying it as a civilian plane. The plane was brought down with a surface-to-air missile.

President Ronald Reagan issued a statement from Camp David, saying the United States regretted the loss of life but defending the judgment of the skipper, Capt. Will C. Rogers III. A subsequent Defense Department investigation also supported his actions, though it noted he was given inaccurate information as the plane approached. The investigators also faulted Iran for allowing the plane to fly into an active conflict zone.

In a strange twist, the following March, Captain Rogers’s wife, Sharon Lee Rogers, was driving near a shopping center in San Diego when what was believed to be a pipe bomb exploded in her car. She escaped uninjured. Investigators initially believed it was an act of terrorism related to Captain Rogers’s role in the deaths, but later “all but ruled out” the possibility, The Los Angeles Times reported.

Captain Rogers was later awarded the Legion of Merit for his service in the Persian Gulf; an accompanying citation praised the captain’s “dynamic leadership” and “logical judgment.”

A December 1988 report by an international panel of aviation experts faulted the Navy for failing to put in place procedures to keep civilian aircraft away from combat zones. The United States later paid millions to settle a lawsuit that Iran filed over the matter at the International Court of Justice.