US Secretary of State John Kerry has said negotiating teams are close to a historic agreement over Iran's nuclear programme but cautioned that the talks could still go either way, and that Washington is still willing to walk away if an acceptable deal is not reached.
"It is now time to see whether or not we are able to close an agreement," Kerry told reporters on Sunday in Vienna, ahead of a July 7 deadline.
"We have made genuine progress. We want a good agreement. We are not going to shave anywhere in the margins just to get to an agreement."
On Monday, Mohammad Javad Zarif , the Iranian foreign minister, said that some differences still remained between the Islamic republic and the six powers over the country's disputed nuclear programme.
"Still nothing is clear. ... Some differences remain and we are trying and working hard," Zarif told reporters.
Related: Unveiling Iran, veiling America
Kerry said that other foreign ministers involved with the talks were returning to the Austrian capital on Sunday evening to further discuss the remaining unresolved issues.
Earlier on Sunday, Kerry met with Zarif to continue what have become marathon talks inside the Coburg Hotel, which has been hosting negotiations for the past nine days.
"Extending the talks is not an option for anyone... We are trying to finish the job," Iran's lead negotiator Abbas Araghchi had told Iranian TV late on Saturday, saying there was a "positive atmosphere".
But he added: "If we reach an agreement that respects our red lines then there will be a deal. Otherwise we prefer to return home to Tehran empty-handed."
On one of the thorniest issues, the ending of sanctions, a compromise may be emerging, at least among experts thrashing out the complex final accord.
Building on a framework deal reached last April, a complex web of sanctions against Iran will be progressively eased if Tehran massively scales down its nuclear programme for at least a decade.
This is aimed at extending the time needed by Iran to produce enough nuclear material for one bomb - it denies any such aim - to at least a year from several months at present.
Coupled with more stringent UN inspections, this will give ample time to stop any such "breakout" attempt, the powers believe, while keeping a modest civilian nuclear programme in place in Iran.
The deal between Iran and the P5+1 - Britain, China, France, Russia, the US plus Germany, would end a standoff dating back to 2002, when dissidents first revealed undeclared nuclear facilities in Iran.
Zarif, who has been meeting Kerry all week, earlier said in an English YouTube message that a deal could "open new horizons to address important common challenges".
On Saturday it appeared that another stumbling block to the deal - a stalled UN probe into allegations of past efforts by Iran to develop the bomb - may also be potentially close to being resolved.
Speaking after a whirlwind trip to Tehran, International Atomic Energy Agency (IAEA) chief Yukiya Amano said the UN watchdog aimed to issue a report by year's end on the "clarification of the issues" concerned.
Amano added, however, that this would still require "cooperation" from Iran, which has so far refused to allow the IAEA access to several people and sensitive sites, some of them military, and that "more work" was needed.
"Amano's statement was positive and a significant step towards resolution of the investigation," Arms Control Association expert Kelsey Davenport told the AFP news agency.
"If the IAEA is satisfied with parameters of the investigation, then it should be acceptable to the P5+1."
Source: Al Jazeera and agencies