Hamid Aboutalebi looked like the ideal candidate to become Tehran's ambassador to the United Nations. He speaks fluent English and French, has served as ambassador to Italy, Australia, Belgium, and the European Union, and - in an ecumenical twist - got his Ph.D. from a Catholic university.

There was only one catch. As a 22-year-old, he occasionally served as an interpreter for the students who took U.S. embassy staff hostage in Tehran in 1979. That ordeal remains so vivid in Washington memory that Congress voted unanimously to deny him a visa.

Iran says the visa denial violates international law. But many in Washington were stunned that the Iranians didn't grasp the political risk of naming someone even slightly linked to the hostage-takers. Some wonder whether the choice was a deliberate attempt by hard-liners to derail talks on curbing Iran's nuclear program.

Those talks, which have a July 20 deadline but could be extended, are making slow but real progress. The greatest barrier - as the Aboutalebi flap shows - is the level of mistrust between Washington and Tehran.

"There has been real progress in the past year beyond what many of us expected," said retired Ambassador Thomas Pickering, one of America's premier diplomats. He believes a deal is within reach.

Speaking last week at the World Affairs Council of Philadelphia, Pickering recalled that when Iran developed its nuclear program between 1998 and 2003, it was involved in "activities . . . with clear military purposes."

Yet Iran's leaders deny they ever had a weapons program and haven't satisfactorily answered U.N. investigators' questions. Supreme Leader Ayatollah Ali Khamenei's fatwa against nuclear weapons (which skeptics believe could be rewritten) hasn't put the issue to rest.

U.S. intelligence agencies believe Iran halted its weapons program in 2003 - though not its nuclear energy program, which could ultimately produce fuel for weapons. They also believe Iran has made no decision to develop a weapon since then but is well positioned to do so.

Israel, which sees Iran as an immediate threat, would like to see its nuclear energy program dismantled altogether. That isn't going to happen. Nor would a preemptive military strike achieve that goal: With Iran's level of nuclear know-how and resources, it could rebuild the program and be even more likely to weaponize.

Yet the lack of Iranian openness about the past raises questions about a future deal.

In a six-month interim deal last fall, Iran agreed to limit its quantity of enriched uranium and convert the stockpile closest to weapons grade into less volatile forms. (It is fulfilling those obligations.) In return, it got limited sanctions relief, though the most onerous sanctions were left in place.

Pickering disagrees with those who say the deal busted sanctions on Iran. "This was a very favorable agreement for us," he said, "but disappointing to Iran because of the low level of sanctions relief."

However, the hardest part of the negotiations lies ahead. The big question: Can a deal be done that deters Iran's leaders from ever deciding to make nuclear weapons? One of the most lucid analysts on the issue, the Brookings Institution's Robert Einhorn, believes it can.

A top nonproliferation expert in the Clinton and Obama administrations, Einhorn lists three basic requirements for such a deal: imposing continuous, intensive U.N. inspections of the Iranian program beyond those seen so far; lengthening the time it would take Iran to break out of any deal by limiting its production of enriched uranium and plutonium; and making very clear the price Iran would pay for violating the deal, including restored sanctions and possible use of force.

There's no room to go into details here. (Wonks who want to read more should visit www.brookings.edu.) But Einhorn's bottom line is clear: If Iran won't come wholly clean about past work on weapons research, there must be firm guarantees to prevent future cheating.

Yes, it's a risk. Skeptics in Congress want more sanctions soon but that could scuttle the talks.

Better instead to test Iran's claim to want a peaceful nuclear program by holding out the prospect that it can produce the limited amounts of enriched uranium required for civilian uses. Better to test whether Iran wants to take up its rightful role as an economic leader in the Mideast or live as a pariah under sanctions.

The spoilers will be waiting (on both sides). "If this deal goes through, the Al-Quds Force [which runs Iran's operations in Lebanon, Syria, and Afghanistan] will try to throw a wrench in it," the American Enterprise Institute's Michael Rubin contended at the World Affairs Council.

In that case, it will be up to Iran's leaders to decide if they want to move beyond memories of CIA and British coup efforts in the 1950s and establish a productive relationship with the West. And it will be up to Americans to move beyond memories of the hostage-takers.

At that point, if it ever arrives, Hamid Aboutalebi would make a splendid ambassador to the United Nations, or even to the United States.