Iran and China have signed a 25-year agreement to expand ties as the Islamic republic struggles to prove the resilience of its economy against decades of US sanctions.

Mohammad Javad Zarif, Iran’s foreign minister, and his visiting Chinese counterpart, Wang Yi, signed the agreement on Saturday.

Details of the agreement were not disclosed and it was not clear how much it might have changed from an 18-page draft — seen by the Financial Times last year — which did not indicate any strategic shift in Iran’s foreign policy.

The draft covered co-operation in areas from energy, petrochemicals and nuclear power to the high-tech and military sectors as well as maritime projects to promote Iran’s role in China’s Belt and Road Initiative. It contained no information on China’s investments in Iran.

“This agreement will definitely help expand ties with China and will change the nature of business because Chinese companies will invest in Iran now more confidently than before,” said a business executive close to Iran’s hardline forces.

“Many lights in various sectors, notably the energy sector, will turn green for Chinese companies. This also shows to the US that Iran is not tied up with the rope of sanctions any more.”

China has enjoyed growing trade with Iran since the early 1990s and has been Iran’s most important commercial partner over the past decade partly as a result of US sanctions, which helped put an end to 30 years of Germany’s leading role.

China became a lifeline for Iran’s economy despite cutting oil imports after Donald Trump pulled the US out of the 2015 nuclear agreement that Tehran had signed with major powers including China.

Zarif, in a meeting with Wang, called China “a friend during difficult times” and thanked Beijing for its “actions and positions during the unjust sanctions”.

Iran’s markets have been kept supplied with Chinese products from machinery and spare parts to clothing, toys and stationery despite toughened sanctions which remain in place under the Biden administration.

A senior US official told the Financial Times this month that Iran’s oil exports to China had been increasing “for some time now” and that Washington had told Beijing it would enforce Trump-era sanctions.

During the last Iranian year, which ended on March 20, the country’s total trade figure was $73bn, with China the top partner, according to the customs administration.

Iran’s exports to China reached $8.9bn and imports from China stood at $9.7bn.

These figures do not include considerable volumes of Chinese products reimported from other destinations.

But scaling up business to multibillion-dollar projects and full implementation of any future agreement with China will remain dependent on negotiations with the new US administration and removal of sanctions, according to business figures.

Meanwhile, Iranian business figures say China has not proved reliable in bigger contracts and they fear history might repeat itself despite the new agreement.

China National Petroleum Corporation signed a contract to develop the South Azadegan oilfield in 2009 after Japan’s Inpex withdrew. Iran terminated the agreement due to alleged underperformance and delays.

CNPC also signed multibillion-dollar contracts in the South Pars gasfield after France’s Total pulled out under threat of the US sanctions, but subsequently abandoned the project for the same reason.

Saturday’s agreement dates back to president Xi Jinping’s visit to Iran in 2016, shortly after implementation of the nuclear agreement. He met supreme leader Ayatollah Ali Khamenei who hailed the prospect of a 25-year partnership as “more co-operation between independent states”.

Iranian people, however, lashed out at the prospect of an agreement last year and resorted to social media to urge the government of Hassan Rouhani not to sign the agreement which to many people was tantamount to selling the country. The signing of the documents during the Persian new year holidays and refusal to disclose any details could be intended to avoid public criticism, analysts said.

The Chinese foreign minister has been on a week-long regional tour since Wednesday. He has visited Saudi Arabia, Turkey and Iran, from where he will continue to the UAE, Oman and Bahrain.