The oil traders say foreigners, who they assume are working on behalf of the United States, have offered astronomical sums, ranging from $100,000 to $1 million, just for the bank account numbers the Oil Ministry used in a sale. Some of the foreigners have promised visas to the United States, the traders said.

One trader admitted to having been duped: The Armenian prostitutes persuaded him to use their names to register front companies in Armenia to facilitate banking transactions. After the women were caught soliciting clients in Iran, he said, Iranian security forces called him in for questioning and he ended the relationship.

Foreign clients, too, are paranoid because of the secondary sanctions that the United States would place on them if they are caught buying Iranian oil. Traders said that on trips abroad, clients asked them to switch hotels in the middle of the night. Traders said it was not uncommon to be questioned at airports overseas. In at least one case, a foreign customer dispatched female agents, dressed in tight dresses and heels, to test what information a trader might divulge.

If the spying charges were intended to send a message to Iran’s oil traders, the message was heard.

One trader said he called the intelligence branch of the Oil Ministry and proactively gave him some information about a suspicious European who had visited his office. Another deleted text messages and blocked the number of a woman who introduced herself as a Swedish Ph.D. student researching Iran’s oil trade.

Hassan Soleimani, the editor in chief of Mashregh, a newspaper affiliated with the Iranian Revolutionary Guards Corps, confirmed that the spy ring arrests involved oil espionage. So did an Iranian politician and two oil traders, all of whom spoke on condition of anonymity.

Many of the 17 people accused of spying had worked in the oil and energy sector as traders and brokers, the two traders said. They had come under scrutiny because of contacts with foreigners on their trips abroad.