In this photo visiting Iranian President Ebrahim Raisi, right, walks with Chinese President Xi Jinping after reviewing an honor guard during a welcome ceremony at the Great Hall of the People in Beijing, Tuesday, Feb. 14, 2023. AP
Xi "gladly accepted" an invitation by President Ebrahim Raisi to make a trip to Iran, both countries said in a joint statement issued on Thursday.
No date was given for the visit, which would be Xi's first to the Middle Eastern nation since 2016.
Beijing and Tehran reinforced their strong economic ties in 2021 by signing a 25-year "strategic cooperation pact" but have been under pressure from Western nations over their positions on Russia's invasion of Ukraine.
Teheran is also under strict US sanctions for its nuclear programme.
Iran agreed with major world powers in 2015 to rein in its nuclear programme in return for the lifting of punishing sanctions.
But then-President Donald Trump pulled the United States out of the deal in 2018 and reimposed sanctions, resulting in Tehran rolling back its commitments.
Efforts to revive the agreement have stalled for months, and the US and Israel continue to accuse Iran of seeking to build nuclear weapons -- a claim it denies.
Beijing and Tehran on Thursday called for an end to sanctions, blaming current tensions on Washington's "unilateral withdrawal" from the deal.
"Both sides emphasised that lifting sanctions and ensuring Iran's economic dividends are an important component of the agreement," they said in the joint communique.
"All relevant sanctions should be fully abolished in a verifiable manner, promoting the agreement's full and effective implementation," they said.
Beijing rolled out the red carpet for Raisi's arrival on Tuesday, with the Iranian leader trailed by a large trade and finance delegation in the first such visit for over 20 years.
Xi later hailed China's "solidarity and cooperation" with Iran "in the face of the current complex changes in the world, times, and history", Chinese state broadcaster CCTV reported.
Beijing "supports Iran in safeguarding national sovereignty, independence, territorial integrity and national dignity... and in resisting unilateralism and hegemonism", Xi said, according to CCTV.
China "opposes external forces interfering in Iran's internal affairs and undermining Iran's security and stability", he added.
The two sides signed a number of bilateral cooperation documents in the fields of agriculture, trade, tourism, environmental protection, health, disaster relief, culture and sport, CCTV reported.