By Farnaz Fassihi, New York Times–

They change offices every few months and store documents only in hard copy. They scan their businesses for covert listening devices and divert all office calls to their cellphones. They know they are under surveillance, and assume their electronics are hacked.

They are not spies or jewel thieves but Iran’s oil traders, and they are suddenly in the cross hairs of international intrigue and espionage.

“Sometimes I feel like I am an actor playing in a thriller spy movie,” said Meysam Sharafi, a veteran oil trader in Tehran.

Last month, Iran said it had dismantled a spy ring and arrested 17 Iranians it said were working for the C.I.A. The Iranian government was vague on the target of the espionage, for which some of the suspects were sentenced to death, but it now appears that it involved clandestine efforts to gather intelligence on oil sales.

[Where Iran is selling its oil. A New York Times investigation.]

President Trump denied that the suspects worked for the C.I.A., a highly unusual statement from a government that almost never confirms or denies such accusations. A spokesman for the C.I.A. declined to comment.

But American officials acknowledged that Iran’s oil sector is of intense interest to the United States and its intelligence agencies.

Whoever is doing the spying, there is little doubt that cloak-and-dagger tactics have buffeted the shrinking Iranian oil trade. Traders say they have been offered all kinds of enticements in exchange for information.

Eastern Europeans showed up in Tehran with cases of vodka and red wine, promising a steady flow of alcohol and cash and offering to double the broker’s fee. A man claiming to be an American academic offered a $5,000-a-month retainer for help with his research on the oil industry. Armenian prostitutes disguised as businesswomen proposed vacation getaways to Shiraz and Isfahan, ancient Iranian cities known for their history and culture.

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.

Separately, Iran said in June that it had arrested a woman who worked at a European energy firm, accusing her of obtaining oil sales documents by cultivating senior and middle managers at the Oil Ministry.

Because Iran’s economy depends on oil, and on evading American sanctions, keeping oil sales secret is considered crucial.

“How we evade sanctions to sell our oil and how we move the money is now the country’s most vital and sensitive information,” Mr. Soleimani, the editor, said. “Nothing is more important.”

Iran’s oil minister, Bijan Zanganeh, banned the release of oil data last year after Washington quit the Iran nuclear deal and imposed sanctions on Iran’s oil exports and financial transactions.

“Information about Iran’s oil exports is war information,” he said in July.

Of the 10 people who on average contact the Oil Ministry each day to inquire about purchasing oil, Mr. Zanganeh has said, seven are not genuine customers. “They are after figuring out our entire system,” he told Iranian news media in June.

The White House said the aim of the sanctions, which were tightened in May, was “to bring Iran’s oil exports to zero, denying the regime its principal source of revenue.”

While that goal has not been met, analysts estimate that Iran’s foreign oil sales have fallen steeply, from 2.5 million barrels a day before the first set of sanctions took effect in 2018 to about 500,000 barrels a day now.

The cold conflict has spilled into the seas, where Iran was blamed for sabotage attacks on six oil tankers, and the air, where the United States and Iran have each downed the other’s drone.

Last month, Britain seized an Iranian tanker in Gibraltar that it said was destined for Syria in violation of international sanctions against Syria. Iran retaliated by seizing a British tanker in the Persian Gulf, a pointed reminder that any military effort to enforce the oil sanctions could quickly heat up.

The information war has been quieter but no less vital. Information about Iran’s oil production, prices, sales and exports are a crucial tool for Washington to gauge the effect of the sanctions and carry out its “maximum pressure” campaign against Iran.

“The U.S. wants the information on oil exports so they can have a sense of how much hard currency Iran is earning,” said Elizabeth Rosenberg, an analyst at the Center for a New American Security and a former senior Treasury official in the Obama administration. “Then they can have a sense of how much they have to squeeze Iran to get its leaders to change their political calculus.”

Iran is a tough intelligence target because Iranians work through “personal relationships of trust,” she said, avoiding some of the telltale trappings and mechanisms of the international oil trade and operating with extreme discretion.

Iran has adopted an array of measures to circumvent sanctions, say traders and oil experts, including turning off the GPS locaters on its oil tankers, transferring oil from ship to ship in open waters, mixing its oil with Iraqi oil leaving the port of Basra, and falsifying shipping manifests to reflect a non-Iranian origin.

Iran has also tightened its oil trading system and increased security to make it more difficult to penetrate and track. Three Iranian oil traders described the changes to The New York Times, requesting anonymity over concerns for their safety.

The thousands of freestyle brokers who put together oil deals between buyers and the Oil Ministry were replaced by a handful of authorized, vetted traders. They report to four senior retired Oil Ministry officials, who have divided the market by region.

A former oil minister and Revolutionary Guards commander, Rostam Ghasemi, took charge of exports to Syria. The other three handled China, India and Europe.

Each purchase plan is customized depending on who is buying, how much they are buying and where the cargo is going — with the goal of constantly changing the method to elude sanctions monitors.

Buyers were required to send representatives to Tehran as a way to protect information and to identify serious clients.

Traders were ordered not to discuss price, shipping or payment with prospective clients. Their main job is to determine whether prospective buyers are legitimate, and then send a proposal to one of the four senior officials.

The Oil Ministry’s security wing holds regular workshops and briefing sessions to train the traders on security and counterespionage tactics.

“The space surrounding us has become intensely security oriented,” said Mr. Sharafi, one of the traders.

To encourage buyers, Iran typically sells its oil about $4 a barrel under the market price. It requires a 10 percent down payment and full payment before allowing the oil barrels to be offloaded at destination ports.

The payment phase is the most closely guarded step. Overseas bank accounts are opened and closed within a few hours, just long enough to make deposits and transfers. While those transactions are taking place, traders and buyers are kept under surveillance at a guesthouse belonging to the Oil Ministry. They are served kebabs and Persian tea and their phones are confiscated to prevent leaks.

Once the deal is complete, they are free to leave.

Oil traders say the new system is doing its job.

“Our worst fears about the economy collapsing did not materialize,” said Farshad Toomaj, a former trader who consults for the Oil Ministry from Sweden. “Iran has become very creative and sophisticated in coming up with dynamic ways to sell oil.”

Julian Barnes contributed reporting.