Story highlights China and Iran agree to a "comprehensive strategic partnership"

They commit to military-to-military communication and political consultations over Syria

"China and Iran are faced with new development opportunities in their relations," Xi says

(CNN) Chinese President Xi Jinping capped a three-nation tour of the Mideast by blessing wide agreements with Iran on regional politics, nuclear energy, trade and military communication, officials said Saturday.

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.

JUST WATCHED China registers weakest growth in 25 years Replay More Videos ... MUST WATCH China registers weakest growth in 25 years 02:05

The two countries also inked a treaty regarding mutual legal cooperation on criminal, civil and trade issues, according to Iranian officials.

Read More