Nikki Haley , the U.S. ambassador to the United Nations, spoke about the Iran nuclear deal at the American Enterprise Institute on Tuesday in Washington. (Aaron P. Bernstein/Reuters)

U.N. Ambassador Nikki Haley made a case Tuesday for how the United States could back away from the landmark 2015 nuclear deal with Iran and suggested that President Trump may toss the issue to Congress.

Haley did not directly champion a U.S. withdrawal, but she asserted that the nuclear restriction deal is a threat to U.S. national security because its structure leaves loopholes and discourages tough enforcement.

"You can't put lipstick on a pig," Haley said. "We have to look at the reality that this deal is flawed."

That appears to put her at odds with Secretary of State Rex Tillerson, who has argued that despite imperfections, the deal offers benefits including a reprieve from the imminent threat of an Iranian bomb and solidarity with European and Asian allies.

In an address to the conservative American Enterprise Institute, Haley left little doubt that she would support a presidential finding next month that Iran is not complying with the deal. That would be a first step toward a U.S. withdrawal and would trigger a 60-day congressional review that Haley said would be beneficial.

"Congress could debate whether the nuclear deal is in fact too big to fail," Haley said.

"We should welcome a debate over whether the JCPOA is in U.S. national security interests," she said, using the abbreviation for the deal's formal title, the Joint Comprehensive Plan of Action.

Haley criticized specifics of the deal and said Iran is trying to duck scrutiny by insisting that the U.N. nuclear watchdog, the International Atomic Energy Agency, cannot inspect military sites at will. She met with the agency's director and got a technical briefing about Iranian inspections last month that critics said was aimed at finding a peg for U.S. claims that Iran is cheating.

"#IAEA verification of Iran compliance with JCPOA is based on terms of agreement; not the ulterior motives of US officials, nor of lobbyists," Iranian Foreign Minister Mohammad Javad Zarif wrote Saturday on Twitter.

Haley's larger critique echoed Trump's "America first" rationale toward foreign policy.

"If the president finds that he cannot in good faith certify Iranian compliance, he would initiate a process whereby we move beyond narrow technicalities and look at the big picture," she said. "At issue is our national security. It's past time we had an Iran nuclear policy that acknowledged that."

Congress mandated a quarterly presidential certification that Iran is meeting its requirements, which Trump has twice signed off on with reluctance. After the last such certification, in July, Trump strongly suggested that he would say no at the next opportunity, in October.

If Trump did trigger a congressional review this fall, it would come on top of a long list of must-do legislation.

The congressional requirement was a compromise that President Barack Obama accepted to win legislative backing for the deal, which he chose not to submit to the Senate for ratification as a treaty.

Upon a finding that Iran is not complying, Congress would consider whether to reimpose U.S. sanctions lifted as part of the agreement, and U.S. participation in the international agreement would be in limbo.

Other parties to the agreement have said they would not walk away simply because Trump finds Iran out of compliance. But an understanding between the United States and Iran after more than three decades of enmity was the cornerstone of the agreement, and it is not clear how important or effective the deal would be without Washington's participation.

The deal is backed by the United Nations and includes the five major nuclear powers that are permanent members of the U.N. Security Council.

"Our allies very much know that we should be concerned" about Iran's compliance, Haley said. "No, they don't want us to get out of the deal. But this is the thing: Are we going to take care of our allies and making sure they're comfortable? Or are we going to look out for our U.S. security interests?"