WASHINGTON—The Obama administration secretly organized an airlift of $400 million worth of cash to Iran that coincided with the January release of four Americans detained in Tehran, according to U.S. and European officials and congressional staff briefed on the operation afterward.

Wooden pallets stacked with euros, Swiss francs and other currencies were flown into Iran on an unmarked cargo plane, according to these officials. The U.S. procured the money from the central banks of the Netherlands and Switzerland, they said.

The money represented the first installment of a $1.7 billion settlement the Obama administration reached with Iran to resolve a decades-old dispute over a failed arms deal signed just before the 1979 fall of Iran’s last monarch, Shah Mohammad Reza Pahlavi.

The settlement, which resolved claims before an international tribunal in The Hague, also coincided with the formal implementation that same weekend of the landmark nuclear agreement reached between Tehran, the U.S. and other global powers the summer before.

“With the nuclear deal done, prisoners released, the time was right to resolve this dispute as well,” President Barack Obama said at the White House on Jan. 17—without disclosing the $400 million cash payment.