The nuclear agreement with Iran probably won't be mentioned in the first paragraph of President Obama Wikipedia entry or his obituary. But if all goes well, it might earn a spot in the second.

More than most of his other foreign-policy initiatives, a successful deal to stop Iran from gaining a nuclear weapon has the ability to vindicate Obama's worldview and salvage his foreign-policy record while helping Americans feel a little better about the dangers faced on the world stage when he leaves office.

There's a few reasons for that, say foreign policy experts.

A Day One priority

From the moment he took office, the Obama doctrine -- to the extent that one exists -- basically boiled down to this: Diplomacy with so-called enemy countries can be effective, said Jeremy Shapiro, a foreign policy fellow at Brookings Institute and former State Department aide.

Obama has been testing that theory on Iran literally since Day One, in part because nuclear nonproliferation has also been a central focus of his presidency. He became the first U.S. president to use the word "Muslim" in his inaugural address, offering to extend a hand to world leaders "if you are willing to unclench your fist."

He repeated that offer a few months later in a video message addressed to Iranians on the country's new year, with an eye on a future nuclear deal. It was, at the time, rebuffed by Iranian leaders -- specifically then-President Mahmoud Ahmadinejad.

Other foreign policy problems

In fact, his diplomatic outreach to prickly world leaders hasn't had the best track record. Remember the reset with Russia (a country we're now imposing sanctions on because it annexed Crimea and quasi-invaded Ukraine)? There's also Obama's much-criticized "red line" he laid down on Syria's use of chemical weapons, his still-unmet promise to close the Guantanamo Bay prison in Cuba, and his "open feud" with Israeli Prime Minister Benjamin Netanyahu? None of these are viewed as particularly sterling foreign policy credentials. And overall, views of Obama's foreign policy are in negative territory (more critics than supporters) by double digits.

The notable exception to all this has been the historic opening of relations with Cuba.

And now, possibly Iran. If Obama can get the deal through Congress intact, and maybe squeeze in another deal or two before he leaves office, Shapiro said, "I think he can really validate the entire concept [of diplomacy], even it wasn't always successful."

The reason: The Iran deal has the potential to reach beyond how Obama is remembered and enter the territory of how Americans remember themselves. Since the Sept. 11, 2001, attacks, Americans have had a sense that their standing in the world is slipping -- that we aren't sure whether we can control what goes on out there anymore.
A successful Iran deal could make us all feel a little better about all
that. To hear Obama and his allies tell it, America just wrestled with a pariah state and won. If the deal blocks Iran from building a nuclear weapon and Iran doesn't use its newfound freedom from sanctions to fund terrorism, the United States would have played in a hand in making the Middle East a more stable place. Of course, that's the big "if."

Big rewards, big risks

Even if the deal isn't a 100 percent success, though, "almost any sort of visible accomplishment" would be good right about now for our collective self-esteem, Shapiro said. Perhaps that's a reflection of all the pessimism about Obama's foreign policy.

An unsuccessful deal on such a contentious issue, in contrast, could drag down Obama's domestic policy accomplishments, such as health-care reform and steering the nation away from a depression, said Georgetown University professor Michele Swers. If he's remembered as a failed president on foreign policy, it will be harder for him to argue that this domestic record made him a good president.

"If history looks kindly on some of his domestic accomplishments ... he doesn't want that colored by [the narrative of], 'Oh, he lost the Middle East,'" she said. (See: the Islamic State.)

There's a final reason Obama needs this deal so much. While incredibly complex in its specific details, its larger goal is also pretty easy comprehensible. Here, we spelled it out for you:

Iran + Nukes = Bad

Iran + Deal = Hopefully no nukes

Or, as Obama and his allies are selling it (perhaps with a dose of hyperbole): Iran - Deal = War

Its bumper-sticker simplicity makes the Iran deal the perfect vehicle to live in perpetuity as central part of Obama's foreign policy legacy. "Obama negotiated a deal with Iran to stop the pariah state from achieving nuclear weapons" is an easy-peasy Wikipedia entry to write. Conversely, "Obama lifted sanctions on Iran and went against the will of Congress on a deal that failed" is just as easy to write.

The last hurdle: Congress

We're still a long way away from that entry. Obama has a full-on battle on his hands to get the deal through Congress.

In the Senate, at least 58 senators are leaning against his deal, according to our whip count, and things don't look so great in the Republican-led House of Representative either. But all Obama needs is one-third of one of those chambers to back him up and uphold his veto to keep the deal intact.  (Even though moving forward with the deal over Congress's objections wouldn't be so great for his legacy either, Swers points out.)

The court of public opinion is a little easier but no less precarious for the president. A recent Washington Post-ABC News poll found 56 percent of Americans support the deal, even though more than six in 10 Americans say they're not that confident it will work. More recent polling is less friendly to the deal.

The president and his staff expected fight and are ready for it, Shapiro figures. They are working hard -- both in front of the cameras and behind the scenes -- to sell the deal to Congress and to you, the American people -- because they know a big chunk of the the president's foreign-policy legacy depends on it.

The history has yet to be written on whether it can be done.

The Iran deal: Who’s for it and who’s not

President Barack Obama, standing with Vice President Joe Biden, delivers remarks in the East Room of the White House in Washington, Tuesday, July 14, 2015, after an Iran nuclear deal is reached. After 18 days of intense and often fractious negotiation, diplomats Tuesday declared that world powers and Iran had struck a landmark deal to curb Iran's nuclear program in exchange for billions of dollars in relief from international sanctions. (AP Photo/Andrew Harnik, Pool)