Updated

The Trump administration told Congress for a second time Monday that Iran is complying with the nuclear deal and can keep enjoying sanctions relief, even as it insisted Tehran would face consequences for breaching "the spirit" of the deal.

President Donald Trump, who lambasted the 2015 pact as a candidate, gave himself more time to decide whether to scuttle it or let it stand. Instead, senior Trump administration officials sought to emphasize their deep concerns about Iran's non-nuclear behavior and vowed that those transgressions won't go unpunished.

In a shift from Trump's previous threat to "rip up" the deal, officials said the administration was working with U.S. allies to try to fix the deal's flaws, including the expiration of some nuclear restrictions after a decade or more. The officials also said the U.S. would slap Tehran with new sanctions penalizing it for developing ballistic missiles and other activity.

Trump, Secretary of State Rex Tillerson and "the entire administration judge that Iran is unquestionably in default of the spirit" of the agreement, one official said. That assessment carries no legal force, while Trump's certification that Iran is technically complying clears the way for sanctions to remain lifted.

The late-night announcement capped a day of frenzied, last-minute decision-making by the president, exposing deep and lingering divisions within his administration about how to deal with a top national security issue.

Since early last week, Trump's administration had been prepared to make the certification, a quarterly requirement. Trump first told Congress in April that Iran was indeed complying. With no final decision on his broader Iran policy, the White House had planned to let the status quo stand for another three months.

As planned, a public rollout began Monday morning involving close choreography among the White House, the State Department and other parts of government. The White House National Security Council distributed talking points to other agencies while national security adviser H.R. McMaster and Treasury Secretary Steven Mnuchin briefed outside policy experts who frequently comment on such issues in the media.

Then, just as the White House was preparing to brief reporters, the announcement was abruptly halted and the talking points temporarily recalled as the president reconsidered the decision, according to officials and others briefed by the administration. Among the options Trump discussed with Tillerson and other aides was to extend the sanctions relief but refuse to certify Iran's compliance, several officials said.

With a midnight deadline just hours away, officials disclosed the final decision to reporters on a chaotic conference call on the condition that it not be published until the White House had a chance to formally notify Congress.

Ultimately, the president's decision was the same on the substance to what his administration had been planning all along. Although the language was toughened to add the declaration that Iran is "in default of the spirit" of the deal, Iran will continue receiving the same sanctions relief that it did under former President Barack Obama.

In April, when Trump made his first certification, he paired it with new sanctions for non-nuclear behavior to show there was no softening of his stance toward the Islamic Republic. Earlier Monday, the White House had told outside experts it would repeat that playbook, by punishing more than a dozen Iranian individuals, organizations and procurement networks involved in ballistic missiles and other nefarious behavior.

But the day came and went with no such announcement, although officials said they expected more sanctions would eventually be coming. It was unclear why the administration held off or for how long, but typically the Treasury Department prefers to issue new sanctions during business hours.

"We receive contradictory signals," Iranian Foreign Minister Mohammad Javad Zarif said Monday at the Council on Foreign Relations before the decision was announced. "So we don't know which one to interpret in what way."

For Trump, a vocal critic of the deal, the obligation to report to Congress on Iran's conformity has created an unwelcome, tri-monthly headache. Still undecided about whether to withdraw from the deal, Trump must either vouch for Tehran's compliance or try to claim Iran is breaching it — even though the International Atomic Energy Agency that monitors the deal says it is not.

In its condemnation of Iran, senior officials emphasized several longstanding U.S. concerns about Iran's ballistic missile programs, human rights abuses and support for terrorism in the region. They also criticized Iran for detaining U.S. citizens and limiting freedom of navigation in the Persian Gulf.

Under the deal struck by Obama and other world leaders, Iran agreed to roll back its nuclear program — long suspected of being aimed at developing atomic weapons — in return for billions of dollars in sanctions relief. The deal does not address global concerns about Iran's non-nuclear activities, but also doesn't prevent the U.S. and others from punishing Iran for those activities. Iran remains on the State Department's list of state sponsors of terrorism for its support of anti-Israel groups.

Scuttling the deal would put further distance between Trump and foreign leaders who are already upset over his move to withdraw from the Paris global climate change accord. Other powers that brokered the nuclear deal along with the U.S. have said there's no appetite for renegotiating it.

___

AP Diplomatic Writer Matthew Lee in Washington and AP writer Edith M. Lederer at the United Nations contributed to this report.

___

Follow Josh Lederman on Twitter at http://twitter.com/joshledermanAP