According to Reuters, the judgment from the European Court of Justice (ECJ) in Luxembourg was prompted by a lawsuit from the German branch of Iran's state-owned Bank Melli against Deutsche Telekom after it terminated a contract with the bank in 2018 prior to its expiry.
The Higher Regional Court in Hamburg will have to decide whether upholding the contract with Bank Melli would expose Deutsche Telekom, which makes about half of its turnover with its US business, to such a disproportionate economic loss.
It is not clear when the Hamburg court will make its decision.
In 2018, then US president Donald Trump decided to withdraw unilaterally from the Iran nuclear deal and to reimpose sanctions on Iran.
To try to rescue the nuclear deal and its economic benefits for Iran, the European Union as a signatory issued a "blocking statute" that prohibited individuals and companies in the bloc from complying with the renewed U.S. sanctions.
The court on Tuesday backed the EU blocking statute in its ruling, saying "the prohibition imposed by EU law on complying with US secondary sanctions against Iran may be relied on in civil proceedings".
But the judges also said the rules of the blocking statute "cannot infringe the freedom to conduct a business...by leading to disproportionate economic loss".