But it appeared the problem continued even after the channel was erased from Telegram.

Some Iranians posted screenshots of emails they had received from accounts with addresses identical to the customer service departments at two of the banks. The emails showed the account holders’ personal identification details and warned them: “We are in control of your bank information and your bank is lying to you.”

The emails advised these customers to take immediate action but did not specify what it should be. One Iranian said on Twitter that some of these emails contained an attachment file with the numbers of millions of leaked accounts.

An Iranian cybersecurity expert based in New York, Amir Rashidi, said he had traced the emails to a server in Germany.

Cybersecurity experts said that a breach of this magnitude could have been the work of a state actor, although there have been sophisticated attacks on Western banking systems that turned out to be organized by criminal groups.

They also said there was always the possibility that the attack had been the work of an insider.

Iranian media said the attack was the largest banking security breach in Iran’s history.

While there is constant cyberconflict between the United States and Iran, American financial institutions and the Federal Reserve have long been leery of offensive actions by the United States government against other countries’ financial systems. They fear that might legitimize reprisals against American accounts.

For Iran, the breach is the latest in a wave of challenges.

In the past month, Iran announced it was facing a significant budget deficit because of American economic sanctions, it crushed nationwide demonstrations with a deadly response that has been widely criticized, and it contended with growing regional resentment. That is especially the case in Iraq, where Iran has exerted significant influence.