Former Secretary of State John Kerry said on Monday that the Iran nuclear deal could hold even if President Donald Trump pulls out, but he warned that imposing new economic sanctions against Tehran could be dangerous.

Kerry said new sanctions on people involved in Iran’s ballistic missile program could send a message to the Iranian people that the 2015 nuclear deal would be in no way beneficial to them. The landmark agreement eased economic sanctions in return for a freeze on Iranian nuclear development.

“If we become super provocative in ways that show the Iranian people there has been no advantage to this, that there is no gain, and our bellicosity is pushing them into a corner, that’s dangerous and that could bring a very different result,” Kerry said.

Last month, the Senate’s Foreign Relations Committee voted 18-3 in favor of legislation that would authorize Trump to impose mandatory sanctions on people involved in Iran’s ballistic missile program and anyone who does business with them. The measure also would apply terrorism sanctions to the country’s Revolutionary Guards and enforce an arms embargo.

Trump promised during his campaign to renegotiate or leave the Iran nuclear deal.

Kerry, who spoke in San Francisco at a fundraiser for Ploughshares Fund, an organization that works to reduce the threats posed by nuclear weapons, said he is hopeful Trump would listen to Secretary of Defense Jim Mattis and White House National Security Adviser H.R. McMaster.

“My hope is that they would in fact not just be the adults in the room but that they would be listened to,” Kerry said.

As Obama’s top diplomat, Kerry played a major role in achieving the historic nuclear deal with Iran involving six world powers.

Kerry added that there is a view that seems to dominate the Trump administration that “the United States can do anything that it needs to do all by itself” and he urged those in attendance to do more to fight for the government to recognize the value of diplomacy.