New York (CNN) French President Emmanuel Macron firmly rejected any military solution to the North Korean crisis and warned against scrapping the nuclear agreement with Iran, in an exclusive interview Tuesday with CNN.

Macron warned that Iran risked becoming a rogue nuclear state like North Korea without the deal.

"North Korea is a very good illustration of a 'what if' regarding Iran," he told CNN shortly before his maiden speech at the UN General Assembly.

"Why? Because we stopped everything with North Korea years and years ago. We stopped any monitoring, any discussions with them, and what's the result? They will probably get a nuclear weapon. I don't want to replicate that situation with Iran."

Macron spoke to CNN during and after what was also President Donald Trump's debut address at the United Nations on Tuesday. The US leader again called dictator Kim Jong Un "rocket man" and threatened to "totally destroy" North Korea.

Macron warned against harsh rhetoric. "My point is not to increase pressure by issuing words against words," he said. "We have to decrease tension and protect people in the region."

Any military solution to North Korea's drive to develop ballistic nuclear missiles would result in tragedy: "Look at the map, if we talk of a military solution we speak about a lot of victims. Building peace is what we have to do in this region," Macron said, speaking in English.

Macron said North Korea was a good example of how not to do things, and compared the example of the East Asian nation with the nuclear agreement with Iran, which Trump has described as "one of the worst" deals the United States has ever made and has threatened to tear up.

Macron said it would be a "big mistake" for the United States to withdraw from the agreement with Iran. "I don't think this Iran deal, this nuclear deal with Iran, is (the be-all and end-all) of everything to do with Iran. If President Trump considers it is not sufficient, I do agree with that. (But) we have this deal.

"I think that the outcome of this deal is that now we have the monitoring process with international urgency following the situation, and I think it is better than nothing. Why? Because if we stop with this deal ... if we just stop with the nuclear agreement, we will enter into a situation very similar to the North Korean situation."

Macron meets with Iranian President Hassan Rouhani on Monday in New York.

The 2015 nuclear agreement between Tehran, the United States, the European Union and other partners led to the lifting of most international sanctions against Iran in return for curbs on its nuclear program. As an EU country and a permanent member of the UN Security Council, France has been a vocal supporter of the deal.

"We need this framework -- if we stop with this agreement, what do you propose, nothing?" he asked.

Macron said the international community needed also to focus on developing a new strategy with Iran regarding the development of the country's ballistic missiles. "I want to know more about this strategy. We have to control it because it is a threat for the whole region -- we have to open discussions post-2025," when the deal runs out, he said.

Climate change agreement

Macron also said France will do all it can to convince Trump to reverse his stated decision to pull the United States out of the Paris accord to halt rising global temperatures.

"That's his choice and I do respect his choice, and he was elected on the basis of such a decision, but I do regret this decision, and I do want to convince him to come back to this agreement because for me that's the core agreement for climate," he said.

Macron said the hurricanes that have been pounding Caribbean islands, including French and US territories, were "the direct result of carbon dioxide emissions."

The United States is the second-biggest polluter behind China, and its potential exit has raised questions over whether the goals set by the agreement can still be met.

"The US is a very great contributor in terms (of carbon emissions)," Macron said. "If you don't fix the situation in the US, then you are not credible to tell the others what to do."

Macron grabbed international headlines in June, and reaffirmed his commitment to multilateralism and fighting climate change during a televised speech when he mocked Trump's campaign slogan "Make America Great Again" with his own call to "Make the planet great again."

Speech at UN General Assembly

Earlier Tuesday, Macron delivered his first official address before the UN General Assembly, where he reiterated his points about Iran, North Korea and climate change.

He also called for an end to Myanmar's military campaign that has driven some 400,000 Rohingya Muslims from the country, describing their plight as ethnic cleansing.

The French President made a moving case for the plight of refugees.

"The refugee, the displaced person, the person we sadly term the migrant, is today sadly, the symbol of our era, the symbol of our world where there are no barriers to the onwards march of despair," he said. "We need, we must change the road of need to the road of freedom."

Macron also urged a political settlement in Syria.

"Syrian people have now suffered enough at the international community to not acknowledge its collective failure," Macron said. "... We must act for peace in Syria. And we must also act against Islamic terrorism. We must fight against terrorism in Syria, in Iraq."

And finally, he called for the protection of journalists.

"We must protect the liberty of those who think, who express themselves, and we must preserve the freedom of the press."