By Sune Engel Rasmussen and Aresu Eqbali

Iran and China signed a wide-ranging economic and security cooperation agreement, defying U.S. attempts to isolate Iran and advancing Tehran's longstanding efforts to deepen diplomatic ties outside Western powers.

Foreign ministers Javad Zarif and Wang Yi signed on Saturday what both sides bill as a "strategic partnership" that will last for 25 years. The deal, which was five years in the making, was signed in Tehran.

Details about the agreement weren't immediately published, but a draft of the agreement circulated last year included Chinese investments in projects ranging from nuclear energy, ports, railroads and other infrastructure to transfer of military technology and investment in Iran's oil-and-gas industry.

In return for investments, China would receive steady supplies of Iranian oil, Iran's semiofficial Tasnim news agency said Saturday, adding that the two countries also agreed to establish an Iranian-Chinese bank. Such a bank could help Tehran evade U.S. sanctions that have effectively barred it from global banking systems.

"This cooperation is a basis for Iran and China to participate in major projects and infrastructure development," including Beijing's Belt and Road initiative, said Iranian President Hassan Rouhani on Friday ahead of the signing, referring to China's vast global investment and development strategy.

The deal deepens cooperation between Tehran and Beijing at a time when China is seeking more influence in the Middle East and when Iran is looking for ways to support an economy that has been battered by U.S. sanctions.

China has in recent years been a vital trading partner for Iran, offering a critical outlet amid the barrage of U.S. sanctions targeting its banking system and main exports, including oil. The Trump administration exited a 2015 international nuclear deal with Iran in 2018 and imposed those sanctions aimed at pushing Tehran to negotiate a new and broader agreement.

Iran and the U.S. are currently jostling over how to return to negotiations over the 2015 nuclear deal.

The accord offered the promise of opening Iran up to foreign investment, but the U.S. withdrawal from the pact, combined with harsh U.S. sanctions, has deterred and prevented many Western companies from sinking money into the country.

Now, the agreement with the Chinese offers Iran the prospect of much-needed foreign investment.

"It allows Iran to be a little bit more intransigent," said Dina Esfandiary, a a senior adviser at the International Crisis Group and co-author of a book on Iran's relations with China and Russia. "I think it will make Europe and the U.S. a little more nervous because it looks like Iran may have a way out of economic strangulation."

Chinese imports of Iranian oil have already increased sharply in recent months. China is expected to import 918,000 barrels a day from Iran in March, the highest volume since a full U.S. oil embargo was imposed against Tehran two years ago. Those reports prompted warnings from the Biden administration that it would enforce Trump-era sanctions on Iranian oil against China.

The resumption of some oil trade, alongside a strengthened domestic industry, has spurred modest growth in Iran and bought Tehran some leverage in potential nuclear negotiations with the Biden administration.

President Biden has said he is willing to return to the nuclear deal if Iran returns to its commitments in the accord, which it has gradually breached since 2019. Tehran demands sanctions relief before conceding to any of Washington's demands.

In February, Iran rejected a European Union invitation for informal talks with Washington without first getting sanctions relief. Since then, the two sides haven't budged.

Western diplomats were watching the Chinese visit to Tehran for signs that Beijing can help unlock the nuclear deadlock between Iran and the U.S.

The nuclear deal known as the Joint Comprehensive Plan of Action, or JCPOA, was forged between the U.S., China, Russia, France, the U.K. and Germany. Europe, Russia and China all favor trying to bring Iran and the U.S. back into compliance with the deal, European diplomats say.

Iran's relationship with China dates back decades, but its increased reliance on Beijing has prompted domestic criticism that the Iranian government is allowing China too much economic influence over critical sectors in the country. Anti-Chinese sentiment during the Covid-19 pandemic has amplified such criticism.

However, for Iran, the agreement with China sends a signal that it has strong allies, including a country with a permanent seat on the United Nations Security Council, said Ms. Esfandiary. But the partnership has limits, she said, and won't change the way China does business in the Middle East.

"China will back Iran when it suits it, and it will ignore Iran when it suits it," she said.

--Laurence Norman contributed to this article.

Corrections & Amplifications

This article was corrected March 28, 2021 to reflect that Dina Esfandiary is a senior adviser at the International Crisis Group. The original version incorrectly said she was a fellow with The Century Foundation.

(END) Dow Jones Newswires

03-27-21 1357ET