TEHRAN — Bedeviled by government mismanagement of the economy and international sanctions over its nuclear program, Iran is in the grip of spiraling inflation. Just ask Ali, a fruit vendor in the capital whose business has been slow for months.


People hurried by his lavish displays of red grapes, dark blue figs and ginger last week, with few stopping to make a purchase. “Who in Iran can afford to buy a pineapple costing $15?” he asked. “Nobody.”


But Ali is not complaining, because he is making a killing in his other line of work: currency speculation. “At least the dollars I bought are making a profit for me,” he said.


The imposition on Sunday of new international measures aimed at cutting Iran’s oil exports, its main source of income, threatens to make the distortion in the economy even worse. With the local currency, the rial, having lost 50 percent of its value in the last year against other currencies, consumer prices here are rising fast — officially by 25 percent annually, but even more than that, economists say.


Increasingly, the economy centers on speculation. In this evolving casino, the winners seize opportunities to make quick money on currency plays, while the losers watch their wealth and savings evaporate almost overnight.


At first glance, Tehran, the political and economical engine of Iran, is the same thriving metropolis it has long been, the city where Porsche sold more cars in 2011 than anywhere else in the Middle East. City parks are immaculately maintained, and streetlights are rarely broken. Supermarkets and stores brim with imported products, and homeless people are a rare sight on its streets.


But Iran’s diminishing ability to sell oil under sanctions, falling foreign currency reserves and President Mahmoud Ahmadinejad’s erratic economic policies have combined to create an atmosphere in which citizens, banks, businesses and state institutions have started fending for themselves.


“The fact that all those Porsches are sold here is an indicator that some people are profiting from the bad economy,” said Hossein Raghfar, an economist at Al Zahra University here. “Everybody has started hustling on the side, in order to generate extra income,” he said. “Everybody is speculating.”


Some, like Ali the fruit seller, who would not give his full name, exchange their rials for dollars and other foreign currencies as fast as they can. More sophisticated investors invest their cash in land, apartments, art, cars and other assets that will rise in value as the rial plunges.


For those on the losing end, however, every day brings more bad news. The steep price rises are turning visits by Tehran homemakers to their neighborhood supermarkets into nerve-racking experiences, with the price of bread, for example, increasing 16-fold since the withdrawal of state subsidies in 2010.


“My life feels like I’m trying to swim up a waterfall,” said Dariush Namazi, 50, the manager of a bookstore. Having saved for years to buy a small apartment, he has found the value of his savings cut in half by the inflation, and still falling. “I had moved some strokes up the waterfall, but now I fell down and am spinning in the water.”


Western sanctions have hurt, economists say, particularly in denying Iran access to foreign currency reserves, which it had used to prop up the rial. Yet economists also agree that much of the damage to the economy has been self-inflicted, saying that the Ahmadinejad government went on an import spending spree after oil revenues started hitting record levels from 2005 on.


With the government buying so many goods from abroad, many domestic producers were forced to lay off workers and close factories. That, in turn, has made Iran more vulnerable to international sanctions, they say. Companies that might have helped produce goods to replace those blocked by sanctions have long since gone out of business, as the owners shifted their wealth to speculation, building and selling properties, foreign currency or raw materials.


Near the industrial city of Pakdasht, outside Tehran, rows of factory buildings stood idle in the burning summer sun, heavy locks on their metal gates. In the distance, columns of Turkish trucks thundered past, swirling up clouds of dust. There were no buses bringing in new shifts of workers, and instead of mechanical clatter filling the air, stray dogs barked in the distance.