Such a comprehensive accord would build on the Joint Plan of Action signed last November. That was a preliminary deal in which Iran agreed to pause its nuclear program in return for some modest relief on sanctions. The deal is set to expire in July, but can be renewed for another six months.

Washington seems focused on limiting the numbers and types of centrifuges that Iran would be allowed to possess, as well as the quantities and qualities of uranium it would be allowed to keep. But those issues are not the keys to getting the best deal with Iran. They are important, but they should not be the White House’s highest priority.

Instead, the Obama administration should focus on three other factors: conducting intrusive inspections, designing a mechanism to easily reimpose sanctions if Iran cheats, and extending the duration of the agreement.

International inspectors must be a constant presence at Iran’s nuclear sites and they need to be able to go anywhere and see anything — immediately and without being blocked by the government. Iran has already agreed to abide by the Additional Protocol to the Nuclear Nonproliferation Treaty, which does establish somewhat more expansive inspections and monitoring, but given Iran’s history of lying about its nuclear program, America needs what it had in Iraq: the right of the inspectors to have completely unfettered access.

As important as highly intrusive inspections are, they can only be as effective as their enforcement mechanism. The history of arms control and arms limitation agreements suggests that states abide by them when they believe it is likely that they’ll get caught and might pay a heavy price for getting caught.

In Iraq, Libya and Iran today, that punishment has taken the form of powerful sanctions. And it is worth noting that the 1994 nuclear agreement with North Korea didn’t work because it was predicated mostly on offering Pyongyang carrots that could be withheld, while the threatened sticks were ephemeral and inadequate.

The biggest diplomatic obstacle America is likely to face after signing a comprehensive agreement with Iran would be getting the United Nations Security Council (and the European Union) to reimpose sanctions if Iran were to ever restart its prohibited nuclear programs — especially if the evidence of cheating was ambiguous.

That’s why it’s not enough just to have intrusive inspections. America also needs a “snap-back” mechanism to be able to quickly and easily reimpose the sanctions if the United States and its allies decide that Iran is violating the agreement.

The best way to create such a mechanism is to suspend the United Nations and European sanctions rather than lifting them outright. In both cases, a new resolution could be passed every six months that would suspend all of the effects of the sanctions for six months, renewable in perpetuity.

This would avoid the difficult process of going to the Security Council and getting a new sanctions resolution passed by a majority of the 15 members without any (Russian or Chinese) vetoes. As we have seen with Iraq, North Korea and elsewhere, that can be diplomatically impossible no matter how convincing the evidence.

Finally there is the question of duration. Although no one knows for sure, there is considerable evidence that Iran’s president, Hassan Rouhani, is sincere in his desire for a nuclear deal. But Mr. Rouhani will be president of Iran for another seven years at most and it is impossible to know who will succeed him. In 2005, the reformist Mohammed Khatami was replaced by a zealot, Mahmoud Ahmadinejad. America must therefore seek an enduring deal, one that will last beyond Mr. Rouhani’s term in office.

Although the terms are still being negotiated, the inevitable rumors suggest that Washington may be ready to agree to as little as 10 years. Twenty years would be better. And 30 or 50 would be better still.

Of course, the Iranians will probably object to all of this. They will protest that intrusive inspections violate their sovereignty. They will argue that last year’s Joint Plan of Action specified the lifting of sanctions, not merely their suspension. And they will complain that Western officials suggested to them in private that the agreement would only last for 10 to 12 years.

But the United States will have both legal and practical leverage with which to push back. The Joint Plan stated that in the final, comprehensive agreement, Iran would be treated as a normal nuclear power after the terms of that treaty had ended. That was an implicit acceptance by Iran that it would not be treated as a normal nuclear power until then.

More importantly, the Iranian government desperately needs to rid the economy of the burden of the sanctions. Suspension serves all of Iran’s real needs: It removes the impact of the sanctions as a practical matter, preserving only the West’s ability to reimpose them quickly if Iran is caught cheating. That creates exactly the kind of deterrent that has made the difference between success and failure in previous nuclear deals.

Iran’s leaders have already demonstrated that they are willing to sacrifice principles for practical benefits. There is no reason to believe that they cannot be convinced to do the same in a comprehensive agreement. Intrusive inspections coupled with sanctions suspension will grant them the economic revival, even prosperity, that they crave while giving America and its allies the greatest assurance that a future Iranian leadership won’t resume a prohibited weapons program.