Iranian President Hassan Rouhani on Saturday hailed a "new chapter" in relations with China after talks with President Xi Jinping, who is touring the region to boost Beijing's economic influence.
The Asian giant and the Middle East's foremost Shiite power aim to build economic ties worth up to $600 billion within the next 10 years, Rouhani announced.
The two leaders oversaw the signing of 17 agreements in areas including politics, the economy, security and cooperation on peaceful nuclear energy.
"With the Chinese president's visit to Tehran and our agreements, a new chapter has begun in Tehran-Beijing relations," Rouhani said in a televised speech, flanked by Xi.
It is the first visit to Iran by a Chinese president in 14 years, state news agency IRNA said, and comes just days after sanctions against Tehran were lifted under a historic nuclear deal with world powers.
"Iran is China's major partner in the Middle East and the two countries have chosen to boost bilateral relations," IRNA quoted Xi as saying.
"China and Iran are two important developing countries that must continue regional and international cooperation," Xi added.
Beijing has long taken a back seat to other diplomatic players in the Middle East, but analysts say the region is crucial to Xi's signature foreign policy initiative known as "One Belt One Road", touted as a revival of ancient Silk Road trade routes.
China, the world's second-largest economy, also relies heavily on energy imports from the Middle East.
Beijing is Tehran's top customer for oil exports, which in recent years were hit by US and EU sanctions over Tehran's nuclear programme.
Trade between the two countries was worth $52 billion in 2014. They did not elaborate on their goal of developing relations worth $600 billion over the next decade.
According to Iranian media, more than a third of Iran's foreign trade is with China.
The two presidents issued a joint statement outlining a long-term "comprehensive strategic partnership".
The two countries agreed to enhance cooperation including in fossil and renewable energy, transportation, railways, ports, industry, commerce and services, said the statement published by Mehr news agency.
In the statement Iran welcomed China's commercial "belt" and the "21st century Silk Seaway" projects, pledging to help the initiative.
China has committed to "invest and finance upstream and downstream energy projects in Iran", it said.
China "acknowledges Iran's constructive role in the fight against terrorism and maintaining peace and stability in the region", it added, while supporting Tehran's increased regional and international role.
China, along with the United States, Britain, France, Germany and Russia, was among the countries that agreed with Iran in July to curtail its nuclear activities in exchange for ending international sanctions.
Xi was accompanied by three deputy premiers, six ministers and a large business delegation.
Late Saturday he met supreme leader Ayatollah Ali Khamenei, who said Tehran "would never forget" Beijing's cooperation during the years of international sanctions against Iran.
"The Islamic Republic of Iran has always sought relations with reliable and independent states like China," Khamenei's website quoted him as saying.
That is why the agreement on long-term strategic relations is "very wise and prompt", and must be "seriously followed up" until it becomes operational, he said.
"Westerners have never been able to gain the trust of the Iranian nation," he added.
Xi was quoted as saying that "the economies of Iran and China complete one another".
Countries on the Silk Road route can "protect their interests against the American pattern of disrupting the regional economic balance by boosting cooperation," Xi added.
"Some superpowers seek the rule of monopoly... but the development of emerging economies has taken the power of monopoly from them."
Xi's tour, his first of the Middle East as China's president, has also taken him to Saudi Arabia and Egypt.
Riyadh and a number of its Sunni Arab allies broke diplomatic ties with Tehran this month after protesters angered by the execution of a prominent Shiite cleric ransacked Saudi diplomatic missions in Iran.
In Cairo, Xi offered $55 billion in loans and investments to the Middle East, a region where China wants to strengthen its economic presence.