IT TOOK two years to negotiate a nuclear deal with Iran—and a few strokes of a pen to undo it. On August 6th President Donald Trump signed an executive order restoring sanctions aimed at Iran’s car industry, its trade in gold and its access to dollars, among other things. It makes good on the president’s promise to withdraw from the deal, signed in 2015, which gave Iran sanctions relief in exchange for limits on its nuclear programme. The sanctions will hurt. Whether they will accomplish anything else is up for debate.

Contrary to his campaign promise, Mr Trump cannot unilaterally “tear up” the deal. It has five other signatories: Britain, France, Germany, Russia and China. All say it is working, an assessment backed by the International Atomic Energy Agency, which certifies Iran’s compliance.

In an effort to preserve the agreement, the European Union has instructed EU firms not to comply with the sanctions and allowed them to sue in court to recover damages resulting from America’s action. But few think the so-called “blocking” measure will work. Firms are taking seriously Mr Trump’s threat that anyone doing business with Iran will not be allowed to do business with America. Total, a French energy giant, is almost certainly quitting a $2bn deal to develop Iran’s massive South Pars gasfield. Airbus may halt the planned delivery of 100 passenger jets. American firms, such as Boeing, which lost a $20bn contract, are already out of the door.

For months the looming sanctions and expected capital flight have exacerbated a currency crisis in Iran. Last summer a dollar fetched about 38,000 rials on the black market (the official rate has long been out of touch with reality). Since then the rial has lost more than 60% of its value. On July 30th it bottomed out at 119,000 rials to the dollar, a record low. Prices of some staple foods have increased by up to half.

Eager for a scapegoat, the president, Hassan Rouhani, sacked the central-bank governor and his deputy who oversaw foreign exchange. Ahmed Araghchi, the deputy, who served for barely a year, is the deputy foreign minister’s nephew. His bumbling tenure was one example of the nepotism that plagues Iran, which ranks near the bottom of Transparency International’s corruption index. Mr Rouhani has tried to make a show of arresting corrupt businessmen and politicians. Dozens of bankers have been jailed for dodgy loans.

Persian empires

But Iran’s problems run much deeper than a few dirty officials. Large chunks of the economy are dominated by bloated quasi-state enterprises. Take Astan Quds Razavi, a charitable trust, or bonyad, in the northeastern city of Mashhad. It was founded in the 16th century to maintain the shrine of a revered imam. Today it has more earthly concerns: mines, an oil company, even an insurance firm. By its own estimate, it controls 41% of the land in Mashhad. The bonyads sit on vast wealth, all of it tax-exempt. A single Tehran-based trust is thought to control some $13bn in assets, twice as much as the Vatican’s bank.

Every branch of the state has its own economic empire. Beneath Tehran, workers are digging the seventh line of the city’s metro. The lead contractor, Sepasad, is under American sanctions. The US Treasury says it is run by Iran’s Revolutionary Guards Corps (IRGC). It awarded much of the tunnelling to the Hara Company, also allegedly run by the Guards. If these firms need construction materials, they can turn to other IRGC-linked companies that make cement and steel. The state and the bonyads also control 40% of Iran’s private banks, many of them undercapitalised.

Mr Rouhani oversold the benefits of the nuclear deal, promising a flood of new investment. Even before Mr Trump took office, foreign firms were skittish about doing business in Iran. It is hard to compete with vertically integrated empires run by clerics or the IRGC. Iranians were already frustrated with the stagnant economy. Now it will get worse—especially in November, when America reimposes sanctions on Iran’s oil industry. Mr Trump’s predecessor, Barack Obama, did the same, in partnership with allies, and the volume of Iran’s oil exports fell by 58% between 2011 and 2014.

Mr Trump says he wants a better deal, one that limits Iran’s ballistic-missile programme and does not expire in a decade. It is hard to see how he will achieve that. Far from working with allies, he scorns them. He has a fanciful goal of bringing Iran’s oil exports, currently 2.5m barrels per day, down to zero. But India is looking for alternative payment methods to keep at least some of its 768,000 barrels per day from Iran flowing. Turkey says it will not comply with the sanctions. And China, which buys a quarter of Iran’s crude, is happy to play spoiler. CNPC, a Chinese state-run energy behemoth, has reportedly offered to pick up Total’s share in the South Pars field.

The president has offered to meet Iran’s leaders, perhaps hoping for a reprise of his summit with North Korea’s dictator, Kim Jong Un. Iran is cool to the idea. So the administration has fixed its hopes on the protests roiling the country. Small groups come out almost every day to complain about the economy. “We would like to see a change in the regime’s behaviour, and I think the Iranian people are looking for the same thing,” says an American official.

On this, the White House and the IRGC are in rare agreement. The commander of the Guards calls the protests “more serious than threats from abroad”. But, though they are persistent, the protests are also small and leaderless. Iran has no coherent opposition to challenge the regime.

At the beginning of the summer, residents of Khorramshahr province found themselves without water. The government arrested protesters, and then dispatched the Guards to install a 90km water pipeline. It was a telling sign. Mr Rouhani had hoped to weaken the IRGC’s grip on both politics and business. He failed. His relatively moderate government will now have to work with the arch-conservatives. This will not make Iran more amenable to Western interests, nor more responsive to its own people. Mr Trump may get a change in the regime’s behaviour—but not the one he says he wants.