An agreement on a deal with Iran on its disputed nuclear programme could be sealed this week, US Secretary of State John Kerry says.
He was speaking to reporters in Vienna, where Iran is negotiating with the US and five other powers.
But Mr Kerry also warned that the two sides were “not where we need to be on several of the most difficult issues”.
Negotiators face a 7 July deadline. Iran’s foreign minister said on Friday that a deal had never been closer.
“If hard choices get made in the next couple of days and made quickly, we could get agreement this week,” Mr Kerry said.
Over the past few days, “genuine progress” had been made, he added.
But the US was prepared to walk away “if we don’t have a deal and there is absolute intransigence and unwillingness to move on the things that are important”.
The so-called P5+1 group – the US, UK, France, China and Russia plus Germany – wants Iran to scale back its sensitive nuclear activities to ensure that it cannot build a nuclear weapon.
Iran, which wants international sanctions that have crippled its economy lifted in exchange, has always insisted that its nuclear work is peaceful.
Sticking points are still reported to be how sanctions are lifted and the amount of nuclear capability Iran is allowed to keep.
Iran’s Foreign Minister Javad Zarif said on Friday that Iran was ready to strike a deal and negotiators had “never been closer to a lasting outcome”.
But in a video message he also called for an end to “coercion and pressure” at the nuclear talks.
Iran’s Supreme Leader Ayatollah Ali Khamenei, who has the final say on all Iranian state matters, last week rejected some key demands of the P5+1, insisting Iran would only dismantle its nuclear infrastructure if the sanctions were lifted first.
The deadline for reaching a comprehensive agreement on Tehran’s nuclear programme has already been extended from the 30 June.
Once agreed, a deal has to be reviewed by the US Congress before it can be signed.