He insisted that the deal “cuts off every pathway” for Iran to develop a nuclear weapon and establishes the most intrusive inspection system in history. “If Iran cheats,” he said, “the world will know it.”

Under the accord, Iran agreed to cut the number of operating centrifuges it has by two-thirds, to 5,060, all of them first-generation, and to cut its current stockpile of low-enriched uranium from around 10,000 kilograms to 300 for 15 years. An American description of the deal also referred to inspections “anywhere in the country” that could “investigate suspicious sites or allegations of a covert enrichment facility.” But in a briefing, American officials talked about setting up a mechanism to resolve disputes that has not been explained in any detail.

In a move not seen since before the Iranian revolution in 1979, and to the surprise of many in both countries, Iranian government broadcasters aired Mr. Obama’s comments live. In parts of Tehran, people cheered and honked car horns as they began to contemplate a life without sanctions on oil and financial transactions, though the issue of when the sanctions are to be removed looms as one of the potential obstacles to a final agreement on June 30.

If that hurdle and the problem of ridding Iran of its huge nuclear fuel stockpile can be fully resolved in the next three months, the preliminary accord will still need to be sold to Iran’s neighbors. The prospect of a deal has inflamed Israel and the Gulf states, alarmed by Iranian muscle-flexing in the Middle East, most recently in Iraq, Syria and Yemen.