At the heart of the sweeping nuclear deal sealed here Tuesday lies a trade-off: The U.S. and its allies will get much stronger leverage to prevent Iran from obtaining a nuclear bomb for more than a decade, but Iran's conventional power in the Middle East will almost certainly grow in ways that could make it more aggressive.
The deal, the product of almost two years of bargaining between Iran, the U.S. and five other world powers, tightens strictures on Iran's nuclear program and gives international agencies broad monitoring powers designed to detect any secret nuclear activities.
But the deal loosens other limits on Iran in ways that may make selling the agreement harder in Washington. It releases billions of dollars in frozen assets, eventually will free Iran to start buying more conventional arms and ballistic missiles and reduces the U.N. blacklist of Iranian officials.
Among the prominent Iranian officials who will be taken off the sanctions list is Qasem Soleimani, head of the Quds Force of Iran's Revolutionary Guards, as well as others in the Quds Force and Iranian Air Force.
Those provisions that strengthen Iran's conventional military power are the deal's "greatest political weakness," said Ilan Goldenberg, a former Obama administration official who believes that the deal overall is a major step forward.
The deal was built on concessions by both sides. The Obama administration dropped its opposition to Iran's production of any enriched uranium, abandoned demands that Iran roll back its missile program and stopped calling for complete dismantling of Iran's nuclear infrastructure.
Iran, in turn, gave ground on allowing United Nations inspectors to have wide access to its nuclear sites and scientists, accepted restrictions that will last years longer than it was originally willing to accede to and settled for a smaller inventory of centrifuges than it had demanded.
The U.S. and its allies won significant battles over how to resolve disputes over inspectors' access to Iranian facilities and the ability to "snap back" sanctions if Iran tries to cheat.
Those trade-offs won support from some figures who had remained undecided until now.
Robert Einhorn, a former top administration adviser on Iran who has recently been uncommitted on the deal, praised the agreement for the way it reduced the extent of Iran's key nuclear infrastructure and allowed "unprecedented" monitoring of nuclear activities.
"Taken as a whole, the deal will achieve the administration's stated objective of preventing a nuclear-armed Iran for a 10- to 15-year period," said Einhorn, now with the Brookings Institution.
The deal will shrink the number of centrifuges Iran has installed by two-thirds and require it to give up 98% of its stockpile of low-enriched uranium and to halt production of medium-enriched uranium, which can be turned into bomb fuel.
The six countries -- the United States, France, Britain, Germany, Russia and China -- also won a promise from Iran not to undertake activities associated with nuclear weapons development, such as computer modeling of nuclear explosions and experiments with certain sophisticated detonators.
Some crucial details of the deal remain unclear, Einhorn noted, including provisions that will govern Iran's nuclear research and development between years 10 and 15.
The U.S. and the other world powers gained ground in a tough struggle over international inspectors' access to Iran's military sites. The agreement sets up a system in which the International Atomic Energy Agency, the U.N.'s nuclear watchdog, can turn to a so-called joint commission to adjudicate disputes over access if Iran refuses to allow inspectors in.
That commission will have eight members, representing Iran, the six powers, and the European Union. Since access questions will be decided by simple majority, the U.S. and European allies will be in a strong position to prevent Russia, China and Iran from blocking inspections.
Disputes over access must be decided within 24 days under the terms of the agreement. U.S. officials say that is a short enough period that Iran wouldn't be able to hide major infractions, such as attempts to build a major uranium-enrichment plant, from inspectors. In the past, access issues have sometimes taken years to resolve.
That process will work to the advantage of the U.S., Einhorn said. In addition, he noted, Iran will not be permitted to get relief from sanctions until it has complied with all of its obligations. The Iranians had demanded sanctions relief at the outset.
Another key battle involved how to snap sanctions back into place in the event Iran cheats.
The U.N. Security Council resolution that will lay out the deal provides for the council to suspend sanctions once Iran comes into compliance with the terms of the deal. If the U.S. or another member of the Security Council believes Iran has violated the rules, it can force a vote within 65 days on whether to continue the suspension. That vote would be subject to a veto by the U.S. or other security council member, which would slap the sanctions back into place.
That is "an effective snap-back mechanism that the Russians and Chinese can't block," said Goldenberg, who is with the Center for a New American Security.
More worrisome to the administration's opponents and outside analysts are parts of the agreement that affect Iran's military activities in the Mideast.
One of Iran's top priorities was relief from the sanctions that have battered its economy, especially in the last five years. The agreement provides that once the U.N. certifies that Iran has mothballed its centrifuges, cut its uranium stockpile and taken other required steps, sanctions imposed by the U.S. and the European Union will be lifted and Iran's financial ties to the rest of the world will be restored.
On that day, which is being called "implementation day," Iran will gain access to some $100 billion to $150 billion that has been frozen in international accounts.
Iran says it intends to devote that money to domestic infrastructure projects, but officials in Israel and Arab countries allied with the U.S., as well as some U.S. analysts, worry that the money could be used, instead, to further support Iran's proxies in Yemen, Syria, Lebanon and elsewhere.
Dennis Ross, a former administration Middle East advisor, has argued recently that even if Iran spends only a fraction of the new money on military-related purposes, that would still represent a big boost in the Islamic Republic's military spending.
That worry combines with a concern that international restrictions on Iran's arms purchases and ballistic programs will be phased out. The U.N.'s restrictions on Iran's purchases of conventional arms would end in no more than five years, and restrictions on sale of ballistic missiles would end in eight. The restrictions could end earlier if the IAEA certifies that Iran has remained in full compliance with its obligations.
Members of Congress who support Israel are sensitive about ending the embargoes because they fear Iran could pump arms to the Hezbollah militia in Lebanon or other militant groups to help in attacks on Israel.
A longer-term concern for those who question the deal is whether Iran could use advanced centrifuges to begin sharply increasing its output of enriched uranium after the first 10 years.
Such an increase could quickly cut into a primary goal of the agreement, which is to extend the amount of time that Iran would need to produce enough nuclear fuel for a bomb. Currently, U.S. intelligence agencies believe Iran could produce enough fuel for a bomb in two to three months. The deal is designed to extend that so-called breakout period to a year or more.
With more sophisticated centrifuges spinning, the breakout time could fall sharply after year 10 of the agreement.
U.S. officials acknowledged to reporters in a briefing that Iran will be able to reduce its breakout time somewhat. But one U.S. official insisted the decline would be gradual, not abrupt, in part because the agreement will obligate Iran to keep its stockpile of enriched uranium below 300 kilograms for 15 years.