BRUSSELS (Reuters) - In 1996, when the United States tried to penalise foreign companies trading with Cuba, the European Union forced Washington to back down by threatening retaliatory sanctions.

Two decades later, the European Union is being driven to threaten such measures again, over Iran, and this time may follow through after U.S. President Donald Trump withdrew from the 2015 nuclear pact between Iran and world powers and reimposed an array of wide sanctions on the Islamic Republic.

This left dismayed European allies scrambling to salvage the international nuclear pact as Tehran said Trump had made a mistake and proved Washington could not be trusted.

The EU's so-called blocking statute is the most powerful tool at its immediate disposal because it bans any EU company from complying with U.S. sanctions and does not recognise any court rulings that enforce American penalties.

But it has never been used and is seen by European governments more as a political weapon than a regulation because its rules are vague and difficult to enforce, serving mainly as a warning to the United States. The international reach of the U.S. financial system and the U.S. presence of many European companies also raise questions about its effectiveness.

"It is a technical tool that worked with (U.S. President Bill) Clinton because it was coupled with a political strategy," said one senior EU source involved in Iran negotiations, referring to Clinton's decision to waive extra-territorial sanctions on EU companies related to Cuba, Iran and Libya.

EU officials say they are revamping the blocking statute to encompass Trump's May 8 decision to revive Iran-related sanctions, after the expiry of 90- and 180-day wind-down periods, including sanctions aimed at Iran's lifeblood oil sector and transactions with its central bank.

"The blocking statute is one of the main options; it's being updated to make it ready," said a second senior EU official.

European commissioners are expected to decide whether to go ahead next week in Brussels, setting the stage for EU government leaders to take a final decision at a summit in Sofia on May 17.

But diplomats say it will be difficult to gain the agreement of all 28 EU states. The blocking statute threat has less weight than in Clinton's era because U.S. sanctions targeting financial transactions have become more robust and costly for EU firms.

European companies with big operations in the United States, such as Shell , are pressuring their governments instead to pursue waivers on a case-by-case basis.

ENERGY DIPLOMACY

Europeans are most worried about how to sustain incentives for Iran to stick to the groundbreaking accord signed by world powers in July 2015, which lifted international sanctions on Iran in 2016 in return for Tehran shutting down its capacity, under strict surveillance by the U.N. nuclear watchdog, to stockpile enriched uranium for a possible atomic bomb.

Trump denounced the accord, completed under his predecessor Barack Obama, as a "horrible, one-sided deal that should have never, ever been made" as it did not cover Iran's ballistic missile programme or its role in Middle East conflicts.

The deal's proponents say it is crucial to forestalling a nuclear Iran and preventing wider war in the Middle East.

"The issue of incentives (to keep Iran in the deal) is completely absent from U.S. thinking. In meeting with U.S. diplomats, it's all about confrontation and isolation (of Tehran)," another official said.

Without the carrot of economic benefits, the EU worries it will also lose influence over Iran.

Once Iran's top trading partner and its second-biggest oil customer, the EU has sought to pour hundreds of billions of euros into the Islamic Republic since the bloc, along with the United Nations and United States, lifted blanket economic sanctions in 2016 that had lamed the Iranian economy.

Iran's exports of mainly fuel and other energy products to the EU in 2016 jumped 344 percent to 5.5 billion euros ($6.58 billion) compared with the previous year, while investment in Iran jumped to more than 20 billion euros.

European Energy Commissioner Miguel Arias Canete will meet Iranian officials in Tehran during a three-day trip from May 18 to try to reassure Iran and strengthen energy relations.

Other EU measures to try to keep EU money flowing into Iran include coordinating and increasing EU governments' export guarantee credits.

That could allow more euro-denominated loans, as well as free the European Investment Bank to invest in Iran for the first time. For its part, Italy has signed a framework credit agreement with Iran to fund investments worth up to 5 billion euros for projects carried out jointly by Italian and Iranian companies. France is considering a similar agreement.

(Additional reporting by John Irish in Paris; Editing by Mark Heinrich)