U.S. President Donald Trump risks driving Iran towards nuclear proliferation and worsening a standoff with North Korea if Washington ends a nuclear deal with Tehran, former U.S. Secretary of State John Kerry said late on Thursday.

Kerry, who negotiated the 2015 deal between Iran and world powers, was speaking a week after Trump refused to certify that Tehran was in compliance with it, amid growing tensions with Pyongyang over its nuclear and ballistic missile programs.

“If you want to negotiate with (North Korean leader) Kim Jong Un, and your goal is to avoid war and try to be able to have a diplomatic resolution, the worst thing you can do is first threaten to destroy his country in the United Nations,” Kerry said.

He was speaking in a private lecture delivered at Geneva’s Graduate Institute.

“And secondly, screw around with the deal that has already been made because the message is, don’t make a deal with the United States, they won’t keep their word,” he said.

The nuclear deal places Iran under tough restraints, including inspections, round-the-clock surveillance and tracking every ounce of uranium produced, Kerry said. “We would notice an uptick in their enrichment, like that,” he said, snapping his fingers.

“And nobody that I know of with common sense can understand what the virtue is in accelerating a confrontation with the possibility that they might decide they want to break out and make it (a nuclear bomb) now instead of 10 or 15 or 25 years from now.”

Kerry, a former Senator who headed the U.S. Senate Foreign Relations Committee, told Swiss media that Trump’s leaving the Iranian deal’s fate to Congress was “very dangerous” and opened the door to “party politics”.

Congress cannot unilaterally renegotiate a multilateral accord, the Geneva daily Le Temps quoted him as saying. “It is possible that Congress would make an unreasonable decision that would put Iran’s Supreme Leader Ayatollah Ali Khamenei in a very complicated political situation that could force him to retaliate. It’s a slippery slope.”

Khamenei said on Wednesday that Tehran would stick to its accord as long as the other signatories respected it, but would “shred” the deal if Washington pulled out, state TV reported.

If Iran violated the accord, U.N. sanctions would snap back into place, Kerry told the audience. “Moreover, at that point in time folks, we have a year of break-up. We have all the time that we need in the world to be able to bomb their facilities into submission.”

Ending the deal could lead to Iran hiding fissile production facilities “deep in a mountain where we have no insight”.

“So the scenario that Trump opens up by saying ‘let’s get rid of the deal’ is actually proliferation, far more damaging and dangerous,” Kerry said.