The report said the two discussed significant worldwide issues and mutual interests, likely including both country's ongoing nuclear negotiations with the USA, and "welcomed further enhancement of relations", according to the state-owned Islamic Republic News Agency (IRNA).
In this photo released by an official website of the office of the Iranian Presidency, President Hassan Rouhani, right, greets North Korean Foreign Minister Ri Yong Ho at the start of their meeting, at the presidency office, in Tehran, Iran, Wednesday, Aug. 8, 2018.
The comments from Beijing and Berlin signaled growing anger from partners of the United States, which reimposed strict sanctions against Iran on Tuesday, over its threat to penalize businesses from third countries that continue to operate there.
The ministry also reminded Washington that Beijing follows a consistent policy of opposing any "unilateral sanctions and long-armed jurisdiction" indiscriminately practiced by the United States against members of the worldwide community.
Mr Zarif said European powers - who say the nuclear deal is working - were asking other countries to continue buying Iranian oil or even start doing so when the next batch of USA sanctions take effect.
"China's commercial cooperation with Iran is open and transparent, reasonable, fair and lawful, not violating any United Nations Security Council resolutions", it said. At current market rates, the imports are worth some $15 billion a year.
Saudi airline stops flights to Canada amid escalating diplomatic row
Within a day, Saudi Arabia expelled the Canadian ambassador , froze all new investment, and canceled all flights to Toronto . Canada's relationship with Saudi Arabia has been cordial in the past, which has sometimes stoked controversy at home.
In November, a second batch of potentially more damaging sanctions will be reinstated on Iran's port operators, and the energy, shipping, and shipbuilding sectors.
Iran has denounced as "U.S. unilateralism" the reimposition of sanctions in line with Trump's decision to pull out of the agreement over Iran's nuclear program.
On Tuesday, north Korean state media implored the U.S. to lift its sanctions accusing Washington of leveraging the punitive measures to "raise its negotiating power".
The nuclear deal was important "not only to the region's security but the world's security", he told the BBC.
Zarif did not specify what consequences the USA could face. Companies doing business with Iran will be barred from the United States, President Donald Trump said on Tuesday.
The Iranian rial fell to a record low late last month, dropping in value by half since April, leading to sharp price increases and fast-rising inflation.
"America has zigzagged constantly, so now no one trusts them", he said.