President Obama walks to the Rose Garden of the White House to speak about the breakthrough in the Iranian nuclear talks on April 2, 2015. (Pablo Martinez Monsivais/AP)

President Obama, who for months had been battered, second-guessed and openly defied, had come to the Rose Garden to make his case to the American people.

A week of marathon negotiations had produced, finally, an agreement designed to prevent Iran from being able to build a nuclear bomb. Obama’s closest advisers stood off to his side, in the shade of the White House colonnade, relishing the moment. National security adviser Susan Rice fist-bumped another aide. Some staffers hugged.

But Obama, resolute and a little defensive, hadn’t come to celebrate; instead he wanted to make the case for the agreement to the American people and the world.

“When you hear the inevitable critics of the deal sound off, ask them a simple question,” Obama said. “Do you really think that this verifiable deal, if fully implemented, backed by the world’s major powers is a worse option than the risk of another war in the Middle East?”

For Obama, this was not a “mission accomplished” moment. In the 20-minute speech he acknowledged the withering criticism from skeptics. The event itself reflected the tenuous nature of a deal that only hours earlier had nearly collapsed.

In an agreement that he called "a long time coming," President Obama announced that the U.S., Iran and other countries have reached a historic framework to curb Iran's nuclear program. (AP)

Typically, Rose Garden addresses are planned weeks in advance and feature crowds of administration staffers and outside allies. On Thursday the audience consisted of a few dozen journalists.

The president’s remarks reflected the unfinished and fragile nature of the accord that was still missing key details and wouldn’t be in final form until June.

“If Iran cheats . . . If we see something suspicious . . . If there is backsliding . . . If the verification and inspection mechanisms don’t meet the specifications of our nuclear and security experts, there will be no deal,” the president said.

To that list of ifs, Obama added: “If we can get this done,” he said, “we will be able to resolve one of the greatest threats to our security and do so peacefully.”

Just a year ago the president outlined a modest international agenda that focused on avoiding errors, saying during a trip to Asia, “You hit singles, you hit doubles; every once in a while we may be able to hit a home run.” That philosophy of restraint and caution became shorthanded as: “Don’t do stupid stuff.”

More recently, though, Obama has used his office to broker a series of landmark agreements with foreign nations, including a historic climate pact with China in November and a rapprochement with Cuba in December.

Highlights of the Iran deal

He viewed the Iran deal as potentially an even larger part of his legacy, and had put more time and effort into brokering it than any other world leader.

“I don’t think either of us ever felt that we were lacking guidance from the president in terms of the various issues,” said one of the negotiators, who asked for anonymity in order to discuss details of the negotiating process.

Earlier this week, after the president’s initial deadline for an agreement had passed, he conferred with negotiators in Switzerland over a secure video link about the emerging deal.

Around midnight Wednesday he was on the phone from the White House residence with Rice and other aides discussing ways to overcome the roadblocks in front of the deal. “And his direction was, people know what my bottom lines are, and I have trust in the negotiating team out there that by the time I wake up they could come back and have this closed out,” an aide recalled Obama saying.

The president got his deal shortly after his 10 a.m. daily briefing.

Less than five hours later, Obama was defending it in the Rose Garden. He lectured critics who had insisted that tougher sanctions or more threatening rhetoric would produce a better outcome. “That’s not how the world works,” Obama said. “And that’s not what history shows us.”

He dismissed hawks who said that military strikes would work better than diplomacy. U.S. bombs, he argued, would set back Iran’s program for only a few years. “Meanwhile, we’d ensure that Iran would race ahead to try and build a bomb,” he said

To those who had suggested that he was naive to negotiate with the United States’ enemies, Obama cited the examples of former presidents Richard Nixon and Ronald Reagan, who had struck arms control agreements with the Soviet Union, “a far more dangerous adversary.”

Reagan’s mantra when negotiating with the Soviets was “trust but verify.” Obama articulated a different principle for dealing with the Iranians. “This deal is not based on trust,” Obama said. “It’s based on unprecedented verification.”

The skepticism reflected the limits of any agreement with Iran, which U.S. officials say continues to support terrorist groups and threaten the United States’ closest allies, including Israel.

Even after the agreement is ratified, there are no plans for an embassy in Tehran; there’s little likelihood of a phone call between Obama and Iran’s leaders.

Instead Obama offered the Iranian people the possibility of a fresh start. “We are willing to engage you on the basis of mutual interests and mutual respect,” he said.

His speech done, Obama headed for his limousine, which carried him past a cheering spring break crowd that had gathered on Pennsylvania Avenue, and then on to Andrews Air Force Base.

A few minutes later he was headed to Kentucky. “Sorry I’m late,” he told the audience in Louisville. “I had a couple of things I had to do.”