“Iran has undertaken significant steps that many people — and I do mean many — doubted would ever come to pass,” Secretary of State John Kerry said Saturday evening at the headquarters of the International Atomic Energy Agency, which earlier issued a report detailing how Iran had shipped 98 percent of its fuel to Russia, dismantled more than 12,000 centrifuges so they could not enrich uranium, and poured cement into the core of a reactor designed to produce plutonium.

But Mr. Kerry was clearly energized by the release of the Americans, an issue he took up on the edges of almost every nuclear negotiation, and pursued in separate, secret talks that many involved in the nuclear issue were only vaguely aware were happening.

The release of the “unjustly detained” Americans, as Mr. Kerry put it, came at some cost: Seven Iranians, either convicted or charged with breaking American embargoes, were released in the prisoner swap, and 14 others were removed from international wanted lists. Many of the presidential candidates, including Senator Marco Rubio of Florida and Donald J. Trump, denounced the swap as a sign of weakness, and they have long promised to review or withdraw from the nuclear agreement.

They particularly object to the release of about $100 billion in frozen assets — mostly from past oil sales — that Iran will now control, and the end of American and European restrictions on trade that had been imposed as part of the American-led effort to stop the program. It was not only sanctions that forced Iran to the table: the United States and Israel also developed one of the world’s most sophisticated cyberweapons to destroy the centrifuges that Iran has now been dismantling.