Most world leaders reacted with cautious optimism on President Donald Trump’s meeting with Kim Jong Un — but Iran warned the North Korean leader to be wary.

South Korea was perhaps the most enthusiastic about the statement signed by Kim to reaffirm a previous promise made in April to "work toward complete denuclearization of the Korean Peninsula."

"Leaving dark days of war and conflict behind, we will write a new chapter of peace and cooperation," South Korea's President Moon Jae-in said in a statement released by his office. "We will be there together with North Korea along the way."

Iran urged Kim not to trust Trump. The president pulled the U.S. out of a 2015 nuclear deal with Iran last month, calling it deeply flawed and re-imposing unilateral sanctions.

"It is not clear that [Trump] would not cancel the agreement before returning back home," Iranian government spokesman Mohammad Bagher Nobakht was quoted as saying by local media. "We are facing a man who revokes his signature while abroad."

China, North Korea’s most important economic and diplomatic backer, noted that hopes for peace on the long-divided Korean Peninsula remain tempered by the many failed attempts in the past.

"The United States and North Korea have been in a state of antagonism for more than half a century," Chinese Foreign Minister Wang Yi said. "Today, that the two countries' highest leaders can sit together and have equal talks, has important and positive meaning, and is creating a new history."

Chinese Foreign Ministry spokesman Geng Shuang later called for U.N. sanctions against North Korea to be suspended or lifted in accordance with the North's actions. "We believe the Security Council should make efforts to support the diplomatic efforts at the present time," he said.

Beijing has key strategic interests when it comes to North Korea, and has long feared that a collapse of its isolated neighbor could push waves of refugees into northeastern China, or that nuclear war on the Korean Peninsula could contaminate swathes of the country.

Japanese Prime Minister Shinzo Abe welcomed the joint statement as a first step in North Korea’s denuclearization.

The headline of Japan's Mainichi Shimbun newspaper reads "North Korea promises to denuclearize" on Tuesday. Suo Takekuma / AP

"We see this as a step in a comprehensive resolution," Abe said in Tokyo. Japan wants North Korea to agree to a complete, verifiable and irreversible denuclearization.

Abe added that he "would like to thank the president (Trump) for raising the abduction issue," referring to Japan's demand that Pyongyang release any remaining Japanese people it abducted to train its spies.

Russia, which shares a border with North Korea, said that it is ready to assist in implementing the deal.

"Now we can only welcome the fact that an important step forward has been made. Of course the devil is in the detail, and we have yet to delve into specifics. But the impulse, as far as we understand, has been given," Deputy Foreign Minister Sergei Ryabkov said, according to the TASS news agency.