TEHRAN - Iran's currency unexpectedly rallied Tuesday after weeks of depreciation linked to renewed American sanctions, sending Iranians rushing to exchange shops to cash in.

In the Iranian capital, money exchange shops offered 135,000 rials for one U.S. dollar at one point, drawing crowds of onlookers and those wanting to trade. Only the day before, the rial was selling at 170,000 to the dollar, with prices recently going as high as 190,000 to the dollar.

The currency plunged after President Donald Trump moved to restore tough U.S. sanctions after withdrawing from Tehran's nuclear accord with world powers in May. U.S. sanctions targeting the country's vital oil industry are set to take effect in early November, which will likely ramp up pressure on the economy.

Prices edged up to over 140,000 to the dollar later Tuesday, fueling suspicions among some Iranians.

“It does not make any sense at all that from four o'clock in the afternoon until the day after suddenly the price of the dollar plummets by 30 to 40 percent. It is not natural,” said Ruhollah Nikravesh, a dollar seller on the streets of Tehran. “It can be either the trick of the government or dealers who seek to collect the people's dollar savings. There is no management in this.”

Analysts offered various explanations for the rally, including a new policy allowing the Central Bank to intervene more strongly to support the rial and providing for the import of more foreign currency from abroad.

There is also hope in Iran that Europe will be able to shield the country from further U.S. sanctions, including those targeting the oil industry.

Rising oil prices also have some more hopeful about the Iranian economy. Benchmark Brent crude now trades near $85 a barrel, and some analysts believe it could reach $100 a barrel by the end of the year.

Iranian state TV showed people gathering late Monday in the market to sell their dollars. Many had sought hard currencies like the U.S. dollar and the euro amid the rial's slide, sending its value even lower. A year ago, the rial traded around 39,000 to $1.

Police also have cracked down on some illegal money changers in the streets and online.

“Managers of more than 15 websites that were announcing prices and caused irregularity in the economic situation were summoned or detained,” Tehran police chief Hossein Rahimi told state TV on Tuesday.

Seeking outside investors

In another effort to shore up the currency, the president's office said Tuesday that Iran will offer five-year residency permits to foreigners if they invest $250,000 in the country.

A prominent Iranian entrepreneur, Pedaram Soltani, saw the Central Bank's hand in the sudden rally.

“We should wait to see increase in prices of foreign currencies again, the Central Bank should allow that supply and demand decide the price,” he wrote on Twitter.

Iran's hardline Kayhan newspaper said court cases targeting corrupt traders also helped strengthen the country's economy. Meanwhile, Iran's parliament is considering a law to counter money laundering and terror financing that may encourage foreign investment and ease some international sanctions.

Iran's financial trouble has been fanned by Trump's decision to pull America from the nuclear deal in May. Under the accord, which the United Nations says Iran still complies with, Tehran limit its enrichment of uranium in exchange for the lifting of some economic sanctions.

The rial's rally could also partially be due to speculators realizing “the bubble has burst a little bit,” said Esfandyar Batmanghelidj, the founder of the Iranian economic website Bourse & Bazaar.

Others who sought the safety of the U.S. dollar likely want to cash in before the rial strengthens too much, he said.

“It's possible that in a week or two weeks, some other bit of news will come out and restart the whole process, but it's certainly a reprieve for the government right now,” Batmanghelidj said.

The restoration of sanctions on the oil industry next month could spark another exodus from the rial.

“It's largely sort of a herd mentality, kind of an emotional response,” Batmanghelidj said. “That will continue to be a risk because people are susceptible to bad news.”