Craig Ruttle/Associated Press Secretary of State John Kerry and Iranian Foreign Minister Mohammad Javad Zarif have been instrumental in getting their two countries to work together.

WASHINGTON -- For two countries that are not officially on speaking terms, the U.S. and Iran have had an impressive few weeks of diplomatic breakthroughs. That's largely because of the unique relationship between U.S. Secretary of State John Kerry and Iranian Foreign Minister Mohammad Javad Zarif.

After hours of last-minute delays, Kerry signed off on paperwork granting Iran sweeping sanctions relief on Jan. 16, once the U.N. nuclear watchdog verified that Iran had fulfilled its obligations to dismantle the bulk of its nuclear program under the historic July 2015 accord.

That same evening, Iran released four American prisoners in exchange for a U.S. offer of clemency for seven Iranians accused of sanctions violations. The swap was the culmination of 14 months of negotiations spearheaded by Kerry and Zarif.

The arrangement almost collapsed at the last minute when Iranian hardliners prevented the wife and mother of recently freed Washington Post correspondent Jason Rezaian from boarding the plane out of Iran -- but Kerry contacted his Iranian counterpart directly and smoothed things over, allowing Rezaian’s family to leave the country with him the following morning.

Iran released a fifth American, Matthew Trevithick, that same day, in a move also negotiated directly between Kerry and Zarif.

Once the American prisoners were back in the U.S., President Barack Obama announced new sanctions targeting Iran’s ballistic missile program.

The timing was significant. Zarif had warned Kerry directly that if the new sanctions were imposed before the completion of the prisoner swap, as was initially planned, the agreement might collapse.

Though they represent two countries that are deeply distrustful of one another, Kerry and Zarif have developed an effective working relationship over the past several years. They aren't exactly friends, but they are on a first-name basis, call each other directly on the phone, and describe one another with respect.

This month's events have underscored the value of this unique relationship -- while also highlighting the uncertainty that surrounds the future of U.S.-Iran relations once the two diplomats depart their posts.

Sanctions relief represents a major fulfillment of Iranian President Hassan Rouhani’s main campaign promises, which bodes well for his moderate administration in the 2017 elections. But in a country where elections are far from fair and free, it’s difficult to predict how long Rouhani and his top diplomat, Zarif, will be in office.

That means the first year of the next American presidency is critical for U.S.-Iran relations.

All of the Republican presidential candidates have described last year's nuclear accord as a giant mistake -- and several of the front-runners have pledged to pull out of the agreement entirely.

Many, including Kerry himself, dismiss the GOP threats to blow up the nuclear deal as campaign rhetoric that will fade with the election cycle. The secretary of state told The Huffington Post in September that if Iran is living up to its end of the deal by the time a new commander-in-chief takes office, 90 percent of the American public will support the deal.

If the deal appears to be working, it would be “absurd” for a future president to to tank it, Kerry said.

“It’s one thing to talk about Iran the way they do right now -- it’s a grant proposal to Sheldon Adelson,” said Trita Parsi, head of the National Iranian American Council, in reference to the fact that the casino mogul has yet to select which Republican candidate to throw his billions behind.

“It would be a very different thing once they come into office. If the deal is cemented by then, they can go back to Sheldon and say, ‘It’s done. There’s nothing we can do,” continued Parsi, who is writing a book on Obama’s legacy of diplomacy with Iran.

Yet even if a future Republican president decides to abide by the terms of the nuclear deal for practical reasons, it’s unlikely that any of the current GOP candidates would appoint a secretary of state who has Kerry’s ability and inclination to work closely with his or her Iranian counterpart.

Parsi, who is in contact with Iranian diplomats, said they have complained that Kerry is too tough a negotiator, but have always spoken about him with respect. “For the simple reason that he always spoke to them with respect,” Parsi said.

That level of mutual respect is not guaranteed to continue even if a Democrat takes office in 2017. Former Secretary of State Hillary Clinton, the leading Democratic candidate, supports the nuclear deal but often describes it as an arrangement imposed by the U.S. on Iran, rather than as a deal unanimously agreed to by all parties.

“I don’t see Iran as our partner in implementing the agreement. I believe that Iran is the subject of the agreement,” she told the Brookings Institution in September.

Clinton cites her efforts to convince Russian and China to join the international sanctions regime against Iran while she was secretary of state as the “roots” of the Iran nuclear deal. While coercive diplomacy arguably played a role in securing the final agreement, pressuring other countries to sanction Iran or risk losing access to the U.S. market is, of course, different than negotiating directly with Iranian diplomats to find common ground.

When Clinton's opponent, Sen. Bernie Sanders (I-Vt.), suggested that the U.S. should work to normalize relations with Iran as the Obama administration has with Cuba, Clinton aides accused him of moving too aggressively. Clinton’s national press secretary, Brian Fallon, told reporters that Sanders’ Iran proposal represents “that caricature that Republicans like to put forward.”

Part of Clinton’s hawkish Iran talk can be attributed to being on the campaign trail. She has said she supports the Iran deal and hasn't suggested a significantly different approach toward the country than the one the Obama administration has taken.

But in the early stages of thawing U.S.-Iran relations, even a subtle shift in rhetoric could reverse this past year’s progress. “I am worried about [Clinton's] instinct,” Parsi said. “She’s far too inclined to think that only pressure works."

"That type of approach will get you absolutely nowhere," he added. "It’s not terribly different than the way George [W.] Bush spoke, to be completely frank."

Also on HuffPost:

PHOTO GALLERY Responses To Iran Deal