One unintended consequence of Donald Trump's decision to pull the United States out of the Iran nuclear agreement has been to bring Germany and Russia together again.

German-Russian relations had soured because of alleged Russian cyberattacks and the Kremlin's annexation of Crimea. But the US President's hardline policy on around the Joint Comprehensive Plan of Action (JCPOA) for Iran has intensified the search for common ground in Berlin and Moscow. German Chancellor Angela Merkel is scheduled to meet Russian President Vladimir Putin in Sochi on May 18, and on Friday morning the two spoke on the telephone.

"The importance of preserving the deal from a point of view of international and regional stability was highlighted," the Kremlin said in a statement following the call.

Read more: Israel divided over Donald Trump's withdrawal from Iran nuclear deal

Merkel's spokesman, Steffen Seibert, said that the two leaders had agreed to push for the other signatories to the deal — France, the UK and China — to continue abiding by it. Merkel also touched on the future of the agreement in remarks she made in the city of Münster on Friday.

"I believe it is not right that a deal which was agreed, which was voted upon in the UN Security Council and unanimously approved, should be unilaterally terminated," Merkel said, adding that the US decision "damages trust in the international order."

As permanent UN Security Council members, Russia and China are also part of the deal

Russia and China essential to the Iran deal

The foreign ministers of Germany, France and the UK will meet with their Iranian counterpart next Tuesday in Brussels. But equally important, if the JCPOA is to survive, would be coordination with Russia and China, since those two nations can offer Tehran the biggest incentives to stay in the nuclear deal.

China is the largest purchaser of Iranian oil, and the two countries agreed to increase their trade to $600 billion (€502 billion) over 10 years — by comparison, annual German-Iranian trade amounts to around €3 billion. In 2014, Russia signed a five-year, $20 billion energy deal with Iran that sidestepped then-applicable Western sanctions. Trade between the EU and Iran has remained sluggish even after the loosening of the sanctions in early 2016.

Read more: Iran nuclear deal: Germany's special role and plans

In Sochi, Merkel is likely to lobby Putin to give Tehran guarantees of future economic cooperation in return for abiding by the provisions of the JCPOA. In February, Russia's ambassador to Iran told the Tass news agency that the two countries were looking into alternatives to the US dollar as a trading currency.

For his part, Putin will probably want Germany to include Russia in any demands it makes to the US for exemptions of European firms to punitive secondary sanctions on countries doing business with Iran — the main crux of whether the JCPOA can survive Washington's withdrawal and a point on which Germany is itself unsure.

Total is one of many big European companies that could face secondary US sanctions

Legal advice but little else

In Münster, Merkel acknowledged that she was uncertain "to what extent this agreement can be kept alive, if a giant economic power doesn't join in."

Trump's decision on Tuesday triggered a process by which all sanctions upon Iran in place before the nuclear deal was agreed in 2015 are to be re-imposed. It is unclear to what extent the US will seek to punish German and European firms who don't fall in line, but theoretically any companies trading with Iran that also do business in or with the US could be affected.

"The United States is a big gorilla on the world stage," international trade lawyer Judith Lee told broadcaster CNN. "We try to not only control our companies, but also try to control what other countries' companies do."

Read more: Who will suffer when the US resumes Iran sanctions?

The list of major European firms that could be hit with millions in secondary sanctions includes Airbus, French energy giant Total, German electronics leader Siemens and carmakers Volkswagen and Peugeot. German Economy Minister Peter Altmaier, who's also headed to Russia next week, has promised firms doing business with Iran practical and legal advice, but little else. Even Altmaier acknowledges that this is nothing more than "damage limitation."

It's not hard to understand the reason for German reticence on this score. According to the US Census Bureau, Germany's annual exports to the US amounted to $118 billion in 2017 — a sum that dwarfs the business with Iran.

Both French President Emmanuel Macron and Merkel tried to no avail to change Trump's mind on the deal

The death of the West?

Trump's unilateralism — and in particular a brusque tweet by the new US ambassador to Germany — have been interpreted as attempts by Washington to impose its policy and law beyond its borders. That has led some commentators to diagnose a breakdown in solidarity between the US and Western Europe.

The Financial Times newspaper postulated that Tuesday "may be remembered as the day the US abandoned its belief in allies." Those sentiments were echoed by Elmar Brok, a conservative German Member of the European Parliament.

Read more: How will Iran's economy hold up if sanctions return?

"We have to acknowledge that on these and other issues that Western unity is crumbling, and there is no partnership," Brok told a German radio station. "This means that we now have to try, together with the Chinese and the Russians, to keep the Middle East free of nuclear weapons."

But Merkel has resisted any talk of the "death of the West."

"This is a serious event," Merkel said in Münster, referring to the US withdrawal from the nuclear deal. "But it is not a reason to call into question the entire trans-Atlantic partnership."

A more likely outcome is that Trump's decision will encourage more cooperation between Iran and China regardless of what the US or the Europeans want. China opened a new rail connection with Iran to transport goods on Thursday, and it's thought that Chinese companies are ready to swoop in, should Total cancel its contract with Iran.