WASHINGTON (Reuters) - If U.S. President Donald Trump tells Congress in October that Iran is not complying with a 2015 nuclear deal it brokered with world powers, that does not mean a U.S. withdrawal from the agreement, U.S. envoy to the U.N. Nikki Haley said on Tuesday.

Under U.S. law, the State Department must notify Congress every 90 days of Iran’s compliance with the nuclear deal. The next deadline is October, and Trump has said he thinks by then the United States will declare Iran to be non-compliant.

“If the President chooses not to certify Iranian compliance, that does not mean the United States is withdrawing from the JCPOA (the nuclear deal),” Haley told the American Enterprise Institute think tank in Washington.

“Should he decide to decertify he has grounds to stand on,” said Haley, adding that she did not know what Trump would decide. “We will stay in a deal as long as it protects the security of the United States.”

Most U.N. and Western sanctions were lifted 18 months ago under the nuclear deal. Iran is still subject to a U.N. arms embargo and other restrictions, which are not technically part of the deal.

In April, Trump ordered a review of whether a suspension of sanctions on Iran related to the nuclear deal, negotiated under President Barack Obama, was in the U.S. national security interest. He has called it “the worst deal ever negotiated.”

Iranian President Hassan Rouhani warned last month that Iran could abandon the nuclear agreement “within hours” if the United States imposes any more new unilateral sanctions.

Slideshow ( 6 images )

“(The nuclear deal) is a very flawed and very limited agreement ... Iran has been caught in multiple violations over the past year and a half,” Haley said. “The Iranian nuclear deal was designed to be too big to fail.”

The U.S. review of its policy toward Iran is also looking at Tehran’s behavior in the Middle East, which Washington has said undermines U.S. interests in Syria, Iraq, Yemen and Lebanon.

“Iran’s leaders want to use the nuclear deal to hold the world hostage to its bad behavior,” she said.

Haley traveled to Vienna last month to meet International Atomic Energy Agency (IAEA) officials for what she described as a fact-finding mission as part of Trump’s review. The IAEA polices restrictions the deal placed on Iran’s nuclear activities and reports quarterly.

While Haley asked if the IAEA planned to inspect Iranian military sites to verify Tehran’s compliance, something Tehran has said they would not allow, she said on Tuesday: “We never ask the IAEA to do anything.”