WASHINGTON — The future of the Iran nuclear deal may hinge on a face-saving fix for President Donald Trump so he doesn’t have to recertify the Islamic republic’s compliance every 90 days, according to U.S. officials.

Several officials familiar with internal discussions say the periodic reviews mandated by Congress have become such a source of embarrassment for Trump that his national security aides are trying to find ways for him to stop signing off on the seven-nation accord without scuttling it entirely.

The president has called the agreement one of America’s “worst and most one-sided transactions” ever. Officials say what Trump hates most, however, is a provision in a 2015 U.S. law — known as the Iran Nuclear Agreement Review Act — that requires him to tell Congress every three months if Iran is meeting promises to scale back its nuclear program in exchange for broad international relief from oil, trade and financial sanctions.

Because the U.N. nuclear watchdog has found Iran in compliance, it’s difficult for the U.S. administration to say otherwise.

But Trump has said repeatedly that he doesn’t want to certify Iranian compliance again after having done so twice already, declaring last month he even had made his mind up about what he’ll do next. “Decertification” could lead Congress to reintroduce economic sanctions on Iran that were suspended under the deal. If that happens, Iran has threatened to walk away from the arrangement and restart activities that could take it closer to nuclear weapons.

“Iran is not in material breach of the agreement and I do believe the agreement to date has delayed the development of a nuclear capability by Iran,” Gen. Joseph Dunford, the chairman of the Joint Chiefs of Staff, told the Senate Armed Services Committee on Tuesday.

Asked if he believed staying in the deal was in America’s national security interest, Defense Secretary Jim Mattis said, “Yes, senator, I do.”

For U.S. officials involved in the decision-making process, the focus on finding a way for Trump to avoid anything looking like approval for the accord has become a source of frustration. Various options are in play to resolve the problem, but none are clean solutions, according to officials who weren’t authorized to discuss the private deliberations and demanded anonymity.

The most likely strategy centers on Trump not certifying Iran’s compliance when he faces another deadline Oct. 15. Below the president, diplomats and officials would then strive to manage any fallout with Tehran and America’s European allies by emphasizing that the U.S. isn’t leaving the deal or applying new nuclear sanctions on Iran. After that, Trump wouldn’t have to address the certification matter again, officials said.

The State Department and National Security Council declined to comment for this story.

The Iran review law provides a potential out for Trump. The president must determine that Iran is implementing the nuclear deal and hasn’t committed a “material breach,” or taken action that could advance its nuclear weapons program. It also demands the president’s verdict on a fourth question: whether suspending sanctions is “appropriate and proportionate,” and if doing so is “vital to the national security interests of the United States.”

Mattis hinted his boss may try to decertify without breaking the deal.

“You can talk about the conditions under one of those, and not walk away from the other,” he said. “They’re two different pieces.”

The goal would be to reinforce the administration’s argument that Iran’s technical compliance — meeting uranium stockpile limits, pouring cement into the core of a plutonium reactor and so on — doesn’t mean it’s living up to the “spirit” of the agreement. This lofty but ill-defined notion encompasses things not directly covered by the nuclear deal, such as Iran’s missile development, threats to America’s Middle East allies and support for U.S.-designated terrorist organizations.

While Mattis described the issues of certification and upholding the deal as “different pieces,” they overlap.

If Trump declares the nuclear deal isn’t in the nation’s security interests, how will his administration stick to it? In January, Secretary of State Rex Tillerson must again waive multiple sets of sanctions on Iran, and the national security question is relevant to those decisions.

As a possible solution, officials said the administration is weighing whether to send the question of sanctions back to Congress. But if lawmakers pass new economic penalties on Iran, the same risk to the overall deal applies.

Other alternatives are being weighed, too, according to officials.

One would involve Trump grudgingly certifying Iran’s compliance a final time and then persuading Congress to change the law so he wouldn’t have to do so again. Officials say this option is unlikely because no one expects already gridlocked lawmakers to pass anything quickly on so polarizing a topic — even if the objective isn’t to save or destroy the deal, but help Trump avoid the discomfort of the certification process.

A further, even more remote possibility, officials said, is Trump not saying anything in 12 days’ time. His silence would amount to decertification, but would seem to be the least Trumpian course of action for a president who has loudly and consistently railed against the merits of the deal.

Close observers of the Iran deal, both for and against, say Trump may even deliver a major foreign policy speech outlining his decision.