FRANKFURT — European companies moved quickly to invest in Iran after it agreed in 2015 to mothball its nuclear weapons program in return for an end to economic sanctions.
Automakers like Daimler and PSA Peugeot Citroën linked up with Iranian partners to sell vehicles. Siemens of Germany struck a deal to deliver locomotives. Total of France began a project to explore offshore natural gas.
Yet even before President Trump pulled out of the agreement with Iran, many companies had already tempered their expectations and limited their investment. Now their prospects look murkier as European leaders try to determine whether there is a path forward without the United States.
Officials in Europe want to protect its companies by finding ways to shield them from American sanctions while they continue doing business in Iran. The United States ambassador to Germany, Richard Grenell, did not strike an optimistic note, however, saying on Twitter that "German companies doing business in Iran should wind down operations immediately."
With a population of about 82 million and substantial oil reserves, Iran represented a largely untouched market with the potential for fast growth, a rare opportunity for Western companies with global ambitions.
While players like General Electric and Boeing lined up orders, many American companies, including oil giants like Chevron and Exxon Mobil, had to watch from a distance; even with the deal in place, they were still effectively blocked by sanctions imposed by the United States from working in Iran. European businesses did not have the same restrictions.
For Europe, Iran was a particularly promising example of the kind of fast-growing emerging country that helped lift the region out of a severe debt crisis in recent years. German companies, for instance, have thrived by selling factory machinery, power grid infrastructure and construction equipment that growing nations need to build modern economies.
Despite its potential, however, Iran has largely been a disappointment for European investors. In a dysfunctional economy, many failed to gain traction in a huge bureaucracy rife with political power struggles. Companies have also been stifled by a reluctance of foreign banks to provide financing, and fears — fully justified, as it turned out — that the nuclear détente would not last.
Although exports from the European Union to Iran increased by about one-third last year to 10.8 billion euros, or about $12.8 billion, the country still ranked only 33rd among the bloc's trading partners, behind the likes of Kazakhstan and Serbia.
"German-Iranian economic relations are lagging their potential," Volker Treier, head of the exports department at the Association of German Chambers of Commerce and Industry, said in an email.
After Mr. Trump's decision not to extend a moratorium on sanctions, Mr. Treier said, "the moderately positive development in business with Iran comes with a big question mark."
In the end, expectations may simply have been too high.
After sanctions were lifted, Airbus of France signed a deal to remake Iran Air's aging fleet with more than 100 aircraft, including a dozen super jumbo A380s.
So far, Airbus has delivered just three jets, none of them super jumbos, a company spokesman said on Tuesday. Two of the three have been leased.
In 2016, Daimler signed an agreement with Iran Khodro, a vehicle maker based in Tehran, to distribute Fuso brand trucks. Demand has been limited, however, because of Iran's weak economy, Daimler spokesman Florian Martens said Tuesday.
Even the Iranian oil industry was having trouble attracting foreign investors — the only significant deal the country signed after sanctions were lifted was with Total for an offshore natural gas development.
"Even in advance of today's announcement, we saw Iran struggling to get the kinds of investment they had anticipated," said Richard Mallinson, an analyst at Energy Aspects, a London-based research firm.
Whether Total can stay in the deal is now open to question. Patrick Pouyanné, the company's chief executive, recently said that the company would argue that because it had signed its Iran deal before Mr. Trump's decision, Total should benefit from a "grandfather clause" and would ask for a waiver from the United States to continue. Total also might turn its share over to its minority partner CNPC, a Chinese state-owned oil company.
Total's experience will most likely be taken as a bad sign for other prospective investors in the Iranian energy industry. "This is not an environment in which other big companies will see any reason to commit capital," Mr. Mallinson said.
European Union officials said on Tuesday that they were making plans to blunt the impact of Mr. Trump's withdrawal — presumably helping insulate companies like Total. It was unclear what measures they might have in mind.
"We are working on plans to protect the interests of European companies," Maja Kocijancic, a spokeswoman for the European Commission, told reporters Tuesday. "At this stage, I am not in a position to offer any further details."
Mr. Trump's decision to pull out of the deal with Iran may not automatically prompt governments to choke off trade.
Having ripped up an international deal, the president may have trouble recruiting allies and cutting off exports of Iranian oil, the country's most valuable product. Iran's crude exports have risen to about 2.4 million barrels a day in recent months, after being around 1 million barrels a day in the months before sanctions were lifted.
"It is going to be hard to get people on board," said Richard Nephew, a former State Department official who was the lead sanctions expert in the Iran negotiations under President Barack Obama and who successfully persuaded other customers of Iran to stop buying its oil in the years leading up to the eventual nuclear deal.
Mr. Nephew, now a senior research scholar at Columbia University's Center on Global Energy Policy, forecast that of Iran's major customers, Japan and South Korea would most likely cooperate on sanctions because they are worried about Washington's negotiations with North Korea.
He said European customers, however, would probably be slower to come around. And China and India, which in some months have been buying more than 1 million barrels a day from Iran, may continue to buy Iranian crude in the same quantities.
All told, the impact of renewed sanctions would be an estimated loss of 300,000 to 500,000 barrels a day of Iranian exports, Mr. Nephew said. That would be a significant amount, but much less than the 1.4 million barrels a day or so that Mr. Obama's sanctions achieved.
In the meantime, Iran is running its oil industry at full tilt, analysts say. "It is obvious that they are anticipating potential new sanctions and running full speed before it happens," said Antoine Rostand, president of Kayrros, a Paris-based market research firm.
But the sanctions would nonetheless create major complications. Iran has quickly pumped up oil production in existing fields, but these will eventually become tapped out. It won't be able to bring new fields online without partners and capital.
Still, giant oil corporations have not given up on Iran.
"We continue to be interested in exploring the role Shell can play in developing Iran's energy potential within the boundaries of applicable laws," Royal Dutch Shell said in an emailed statement on Tuesday.
The same principle applies to other investors, provided they are big enough — and wealthy enough — to handle the risk, said Andreas Schweitzer, managing director of Arjan Capital Ltd., a firm in London that advises companies on investing in Iran.
"Those who want this 80 million-person market and have a long-term strategy," he said, "will go there with or without Mr. Trump."