Picture this: an Arab country uses chemical weapons in an indiscriminate manner. The attacks kill and injure at least hundreds of people.

No, it’s not Syria in 2013–it’s Iraq in the 1980s, and the U.S. was complicit in the attacks. In sharp contrast to U.S. outrage over the chemical weapons attack that Syrian government forces allegedly launched last week in a Damascus suburb, the U.S. aided Iraqi forces who used chemical weapons attacks during the brutal Iran-Iraq War in the 1980s.

Foreign Policy magazine reports that recently declassified CIA documents and interview with former intelligence officials prove that “America's military and intelligence communities knew about and did nothing to stop a series of nerve gas attacks far more devastating than anything Syria has seen.”

Foreign Policy’s Shane Harris and Matthew Aid write that in 1988, the United States “learned through satellite imagery that Iran was about to gain a major strategic advantage by exploiting a hole in Iraqi defenses. U.S. intelligence officials conveyed the location of the Iranian troops to Iraq, fully aware that Hussein's military would attack with chemical weapons, including sarin, a lethal nerve agent.”

The use of chemical weapons by Iraq helped turn the tide of the war in favor of Saddam Hussein, then a U.S. ally. President Ronald Reagan wanted Iraq to win the war to strike a blow at Iran.

While the two situations are markedly different, the cases of Iraq back then and Syria right now are still instructive. The U.S. has said that the Syrian use of chemical weapons violates international law. In June 2013, when the U.S. first said Syria used chemical weapons, White House official Ben Rhodes said that “the use of chemical weapons violates international norms and crosses clear red lines that have existed within the international community for decades.” But the U.S., by aiding Iraq as it was set to blast Iranian troops with chemical weapons, also violated that international norm.

The drumbeat for punishing Syria over an alleged chemical weapons attack is not being welcomed by the American people. As the Washington Post's Max Fisher writes, attacking Syria is even less popular than Congress itself. Only nine percent of those polled by Reuters recently favor a U.S. military attack.

And the two cases of Iraq and Syria demonstrate that when chemical weapons are used by an American ally, the U.S. will turn a blind eye. But when a regime the U.S. wants to overthrow allegedly uses them, it’s time for war. The next time you hear about the international “norm” against chemical weapons, think about America and Iraq in the 1980s.