China and Iran have signed a 25-year cooperation agreement which covers a wide range of sectors, including the economy.
Chinese Foreign Minister Wang Yi, who is on a six-nation tour in the Middle East, met his Iranian counterpart Mohammad Javad Zarif on Saturday.
The two signed the agreement, details of which have not been revealed by Iran's foreign ministry. But the country's conservative media reported that it covers security cooperation as well.
Wang also met President Hassan Rouhani. They discussed the 2015 nuclear deal.
The United States unilaterally withdrew in 2018 in a decision by former president Donald Trump and imposed sanctions.
According to Iran, Wang said China welcomes a possible US return to the nuclear accord.
But he added that the US should lift its sanctions.
China has been keenly watching the US, which has been enhancing ties with its allies and friendly nations.
The agreement with Iran apparently seeks to counter the US efforts.