Top US military commanders have pushed back against any attempt by Donald Trump to withdraw from the July 2015 nuclear deal with Iran.

Trump, facing an October 15 deadline to recertify Iranian compliance, used his address to the UN General Assembly two weeks ago to declare the deal an “embarrassment” to the US, as he assailed the “corrupt dictatorship” of the Islamic Republic.

But Defense Secretary Jim Mattis (pictured) and the Chairman of the Joint Chiefs of Staff, Gen. Joseph F. Dunford Jr., told Congressional committees on Tuesday that they opposed any withdrawal.

Asked by Senator Angus King if he believed “it’s in our national security interest at the present time to remain” in the Joint Comprehensive Plan of Action, Mattis said, “Yes, senator, I do.”

Mattis told the House Armed Services Committee, “Overall, our intelligence community believes that they [Iran] have been compliant, and the IAEA [International Atomic Energy Agency] also says so.”

Since his inauguration, Trump has twice certified Iranian compliance, but he has indicated that he might not do so next week. In such an event, Congress will have 60 days to decide whether to reimpose sanctions.

Mattis made clear that, even if Trump refused certification, Congress does not have to impose the restrictions.

Dunford repeated testimony from last week “that Iran is not in material breach of the agreement” and that he believes the agreement between Tehran and the 5+1 Powers (US, UK, Germany, France, China, and Russia) “has delayed the development of a nuclear capability by Iran”.

Iranian leaders, including President Rouhani, have said that they will adopt “proportionate responses” if the US withdraws, including the return to enrichment of 20% uranium. But rather than looking at an Iranian departure from the JCPOA, they have focused on separating European powers from Washington.