Iran warned North Korean leader Kim Jong Un on Tuesday against trusting President Donald Trump, saying he could cancel their denuclearization agreement within hours.

Tehran cited its own experience in offering the advice to Kim a month after Washington withdrew from a similar deal with Iran.

Trump and Kim pledged at a meeting in Singapore on Tuesday to work toward complete denuclearization of the Korean peninsula while Washington committed to provide security guarantees for its old enemy.

"We don't know what type of person the North Korean leader is negotiating with. It is not clear that he would not cancel the agreement before returning home," Iranian government spokesman Mohammad Bagher Nobakht was quoted as saying by IRNA new agency.

Nobakht questioned Trump's credibility. "This man does not represent the American people, and they will surely distance themselves from him at the next elections," he said.

As well as pulling the United States out of the 2015 nuclear deal with Iran, Trump disowned on Saturday a joint communique issued by Group of Seven leaders, just hours after he had left their summit for the meeting with Kim.

Trump has said would be open to striking a new nuclear accord with Tehran. However, he says the existing deal negotiated under his predecessor Barack Obama had failed to address Iran’s ballistic missile program.

Trump-Kim Jong Un President Donald Trump and North Korean leader Kim Jong Un react at the Capella Hotel on Sentosa island in Singapore, June 12, 2018. Photo: REUTERS/Jonathan Ernst

On top of this, he also cited the terms under which international inspectors can visit suspectIranian nuclear sites and "sunset" clauses, under which limits on the nuclear program start to expire after 10 years.

Trump has insisted any deal with North Korea should include irreversible and verifiable denuclearization.

An Iranian foreign ministry spokesman also advised North Korean leaders on Monday to "exercise complete vigilance" in their negotiations with the United States.

"We are not optimistic about these talks ... The United States, especially Mr Trump, has undermined international agreements and has unilaterally withdrawn from them," Bahram Qasemi said.

Trump has also decided to pull the United States out of the Paris climate change accord.

Washington will reimpose a wide array of Iran-related sanctions after the expiry of 90- and 180-day wind-down periods, including measures aimed at the oil sector and transactions with its central bank.

Other remaining signatories of the deal - Britain, China, France, Germany and Russia- have criticized the U.S. exit and are still trying to salvage the accord.