Iran was the final stop of Xi's itinerary that earlier included Egypt and Saudi Arabia. He arrived in Iran on Friday to cement better relations, the first Chinese President to visit that country in 14 years.
The two nations agreed to a "comprehensive strategic partnership" that commits them to military-to-military communication; enhances consultations over Syria, Yemen, and elimination of weapons of mass destruction in the Middle East; and reiterates non-interference in handling international affairs, according to the two countries' foreign ministries.
Iranian President Hassan Rouhani and Xi witnessed high-ranking officials of their respective countries signing a total of 17 memorandums of understanding and other documents that establish "a maritime Silk Road of the 21st century" and the "peaceful use" of atomic energy, the Iranian presidency said.
The two countries also inked a treaty regarding mutual legal cooperation on criminal, civil and trade issues, according to Iranian officials.
Other signed agreements dealt with providing goods for confronting weather change; cementing industrial, mining, investment, communication and information technology cooperation; and providing funds for a Tehran-Mashhad express railway, officials said.
Xi: 'New ... opportunities in' China-Iran relations
In recent decades, Iran has been at odds with many leading countries around the world -- including the United States -- in part due to its nuclear program. Some of that tension has thawed lately, though, as evidenced by the recent lifting of international sanctions on Iran
after it was determined Tehran has done what's necessary to comply with a landmark nuclear deal.
China's openness to Iran, though, is not new. After all, it's been Iran's biggest trading partner for the past six years, Beijing's state-run Xinhua news agency reported.
Still, Xi -- capping his first Middle East tour since becoming President in 2013 -- on Saturday acknowledged both "China and Iran are faced with new development opportunities in their relations."
"China stands ready to work with Iran to seize the momentum and further elevate our relationship and practical cooperation, so as to usher in a new chapter for our ties featuring comprehensive, long-term and stable development," Xi said, according to Xinhua.
Chinese Vice Foreign Minister Zhang Ming described Xi's visit to Iran as "a milestone that will usher in a new era of bilateral ties featuring comprehensive, long-term and stable development."