Russian President Vladimir Putin urged the international community to rally in support of the Iranian nuclear accord after talks with leaders of the Islamic Republic. It was an effort to counter President Donald Trump’s move away from the multinational pact.

The nuclear deal is “working effectively,” and deserves support from all member states of the United Nations, Putin said in a joint statement Wednesday with Iranian President Hassan Rouhani and Ilham Aliyev, leader of Azerbaijan, after a summit in Tehran. Putin also held a separate meeting with Iran’s Supreme Leader Ali Khamenei.

“We oppose any unilateral change in the multilateral nuclear deal,” Putin said while meeting Khamenei. “We oppose linking Iran’s nuclear program with other issues including defensive issues.”

Trump last month disavowed the 2015 accord to curb Iran’s nuclear program that was negotiated between Tehran and the U.S., Russia, France, Germany, Britain and China. He accused Iran of violating the agreement multiple times, though he stopped short of abandoning the pact completely. All of the other participants, as well as inspectors from the International Atomic Energy Agency, say that Iran is complying with the deal.

“The demands made by President Trump in his recent speech are unrealistic,” said Russian Deputy Foreign Minister Sergei Ryabkov.

Russia has rejected Trump’s demand to renegotiate the agreement to curb Iran’s ballistic missile program. On Tuesday, Russian Foreign Minister Sergei Lavrov criticized “unpredictable” U.S. behavior, citing the refusal to uphold the Iranian agreement and threats to use force to resolve the crisis on the Korean Peninsula.

Russia and Iran are allies in Syria and the main backers of President Bashar Assad, deploying military forces to help his regime turn the tide against opponents backed by the U.S. and regional powers in a civil war that’s raged since 2011. Putin said that Russia and Iran as well as Turkey have achieved progress in their cease-fire efforts in Syria.

Russia and Iran also discussed energy cooperation. Rouhani and Putin said they hoped for an agreement on the division of the oil-rich Caspian Sea, where their countries and Kazakhstan and Turkmenistan have competing claims. The Russian leader called for more cooperation on the oil and gas markets, adding that his country was ready to export gas to northern Iran via Azerbaijan.

Putin, Rouhani and Aliyev also discussed plans for a railway line between Iran, Azerbaijan and Russia that could be used to move freight from Asia to Europe. The project would aim to grab a share of cargo now being shipped through the Suez Canal.

Aliyev opened a similar rail project on Monday that links his capital, Baku, to Turkey via Georgia, offering a transport corridor to move goods between China and Europe through Central Asia, in competition with existing routes through Russia and Iran.