Mr. Kerry appeared to secure another commitment that was not part of a preliminary agreement negotiated in Lausanne. Iranian officials agreed here on a multiyear ban on designing warheads and conducting tests, including with detonators and nuclear triggers, that would contribute to the design and manufacture of a nuclear weapon. Accusations that Tehran conducted that kind of research in the past led to a standoff with inspectors.

Diplomats also came up with unusual procedure to “snap back” the sanctions against Iran if an eight-member panel determines that Tehran is violating the nuclear provisions. The members of the panel are Britain, China, France, Germany, Russia, the United States, the European Union and Iran itself. A majority vote is required, meaning that Russia, China and Iran could not collectively block action.

With the announcement of the accord, Mr. Obama has now made major strides toward fundamentally changing the American diplomatic relationships with three nations: Cuba, Iran and Myanmar. Of the three, Iran is the most strategically important, the only one with a nuclear program, and it is still on the State Department’s list of state sponsors of terrorism.

While the agreement faces heavy opposition from Republicans in Congress, and even some Democrats, Mr. Obama’s chances of prevailing are considered high. Even if the accord is voted down by one or both houses, he could veto that action, and he is likely to have the votes he would need to override the veto. But he has told aides that for an accord as important as this one — which he hopes will usher in a virtual truce with a country that has been a major American adversary for 35 years — he wants a congressional endorsement.

[On June 17, 2019. Iran announced that it would soon exceed the limits on the nuclear fuel it is permitted to possess under the landmark 2015 nuclear deal.]

Mr. Obama will also have to manage the breach with Mr. Netanyahu and the leaders of Saudi Arabia and other Arab states who have warned against the deal, saying the relief of sanctions will ultimately empower the Iranians throughout the Middle East.