Secretary of State F. John Kerry says difficult issues still remain to be sorted out to reach a nuclear deal with Iran. (Reuters)

Secretary of State John F. Kerry on Sunday tamped down growing optimism that agreement on a nuclear deal with Iran is near, saying that negotiations “can go either way” as a Tuesday deadline approached.

“I want to be absolutely clear,” Kerry told reporters after exiting a session with Iranian Foreign Minister Mohammad Javad Zarif, his third of the day. “We are not yet where we need to be on several of the most difficult issues.”

He spoke as diplomats here entered the final hours of more than 18 months of negotiations that will establish a new relationship between Iran and global powers or collapse amid recriminations and threats to world peace.

Foreign ministers from the five countries partnering with the United States in the talks were due to arrive later Sunday in the Austrian capital, in the hope that a deal will be ready for them to discuss and endorse. Tuesday was set as the deadline after negotiators failed to meet an initial date of June 30.

All sides say they are close to finalizing a comprehensive agreement that would place limits on Iran’s nuclear activities and prevent it from producing a nuclear weapon, in exchange for the lifting of international economic sanctions.

Secretary of State John F. Kerry, shown Thursday in Austria, had lengthy talks Sunday with Iran’s foreign minister. (Carlos Barria/AP)

Kerry said he agreed with Zarif’s assessment on Friday that the two sides “have never been closer” to a deal. But he appeared to be trying to play down any untoward optimism.

“If hard choices get made in the next couple of days, and made quickly,” Kerry said, “we could get an agreement this week. But if they are not made, we will not. . . . In the coming hours and days, we’re going to go as hard as we can.”

His remarks seemed at least indirectly addressed to Iran, as well as to U.S. critics who have accused the administration of capitulating to Iran on key issues. “If we don’t have a deal, if there’s absolute intransigence, if there’s not willingness to move on things that are important, President Obama has always said we would walk away,” Kerry said.

“We want a good agreement, only a good agreement. And we’re not going to shave anywhere at the margins in order just to get an agreement. This is something that the world will analyze,” he said, adding that “none of us . . . intend to do something that can’t pass scrutiny.”

Kerry began a fourth Sunday meeting with Zarif shortly after 8 p.m.

Kelsey Davenport, director for nonproliferation policy at the Arms Control Association, said she was still “optimistic” that a deal could be finalized by Tuesday. Although Kerry was clearly seeking to “manage expectations,” she said, “only a small number of manageable issues on sanctions and inspections remain, on which there has been progress.”

Kerry spent more than 3 1/2 hours Sunday with Zarif. U.S. Energy Secretary Ernest Moniz talked separately with his Iranian counterpart, Ali Akbar Salehi, suggesting that at the eleventh hour they are still working out technical details.

Negotiators have been trying in recent days to fill in the blanks of a framework agreement reached in early April. There are differences over the two main issues — the level of inspections and verification that Iran keeps its side of the bargain — as well as the pace and scope of sanctions relief Iran will get in exchange.

Beyond a general feeling that they have come too far to fail, diplomats have repeatedly cautioned that they may not succeed. In that case, they will have to decide whether to extend the talks further — something that could prove politically unsustainable for some, if not all, of the negotiating countries — or allow them to collapse.

“Extending the talks is not an option for anyone,” Iranian negotiator Abbas Araghchi told Iranian TV late Saturday. Negotiations were continuing in “a positive atmosphere,” he said. “We are trying to finish the job.”

“If we reach an agreement that respects our red lines, then there will be a deal,” Araghchi said. “Otherwise, we prefer to return home to Tehran empty-handed.”

Although the United States and its partners — Britain, France, Germany, China and Russia — have said little in public during the tense final days, Iranian officials have been publicly outspoken. Araghchi spoke after Zarif, the foreign minister, posted on YouTube on Friday an English-language video offering Iranian cooperation on a range of global issues — including the fight against terrorism — if those on the other side of the table acknowledge that Iran cannot be coerced.

In an interview reported Sunday by Iran’s Tasnim News Agency, a spokesman for the Atomic Energy Organization of Iran, Behrouz Kamalvandi, warned of severe consequences if the United States and its negotiating partners apply more pressure.

“The other party has tested all types of pressure, and if they decide to try the pressures again, Iran’s response, as President [Hassan] Rouhani said, will be more severe than what they could imagine,” Kamalvandi was quoted as saying.

Sen. Bob Corker (R-Tenn.) said Sunday that he believes Iran has already crossed a number of “red lines” — steps that he said the administration had pledged it would not permit.

Corker, speaking on CBS’s “Face the Nation,” said he urged Kerry in a telephone conversation Saturday to “try to make sure that these last remaining red lines . . . do not get crossed and qualitatively they don’t make it worse than where it already is.”

He said he was referring to concerns that Iran will not allow — “anywhere, anytime” — international inspections of its nuclear facilities and will prohibit inspections of any military facilities as well as interviews with nuclear scientists.

The State Department has said that those issues would be covered by Iran’s agreement to adhere to all verification requirements of the International Atomic Energy Agency under the Non-Proliferation Treaty and its additional protocol for inspections.

Corker was the prime mover behind compromise legislation giving Congress 30 days to review — and potentially reject — a completed deal before Obama can lift any sanctions under its terms. If lawmakers do not receive a full text by Friday, the review period increases to 60 days.

Read more:

Iran sets strict conditions for nuclear deal

Iran agrees to nuclear restrictions in framework deal with world powers